From 6b857e6e43086da2bd4f2220c26d5043b8e71322 Mon Sep 17 00:00:00 2001 From: Celtic Minstrel Date: Tue, 7 Feb 2017 22:17:58 -0500 Subject: [PATCH] Fix some isses with editing outdoor encounters --- src/scenedit/scen.townout.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/scenedit/scen.townout.cpp b/src/scenedit/scen.townout.cpp index 7d5d4138..458992a8 100644 --- a/src/scenedit/scen.townout.cpp +++ b/src/scenedit/scen.townout.cpp @@ -566,7 +566,7 @@ static bool edit_out_wand_event_filter(cDialog& me, std::string hit, short& whic return true; } -static bool edit_out_wand_spec(cDialog& me, std::string hit, short which, cOutdoors::cWandering wand) { +static bool edit_out_wand_spec(cDialog& me, std::string hit, short which, cOutdoors::cWandering& wand) { if(!me.toast(true)) return true; me.untoast(); save_out_wand(me, which, wand, 100); @@ -579,18 +579,18 @@ static bool edit_out_wand_spec(cDialog& me, std::string hit, short which, cOutdo return true; } -static bool edit_out_wand_monst(cDialog& me, std::string hit, short which, cOutdoors::cWandering wand) { +static bool edit_out_wand_monst(cDialog& me, std::string hit, short which, cOutdoors::cWandering& wand) { if(!me.toast(true)) return true; me.untoast(); save_out_wand(me, which, wand, 100); std::string fld = hit.substr(7); short i; if(fld[0] == 'f') { - i = choose_text(STRT_MONST,wand.monst[fld[3] - '0']-1,&me,"Choose Which Monster:") + 1; - if(i >= 0) wand.monst[fld[3] - '0'] = i; + i = choose_text(STRT_MONST,wand.monst[fld[3] - '1']-1,&me,"Choose Which Monster:") + 1; + if(i >= 0) wand.monst[fld[3] - '1'] = i; } else if(fld[0] == 'a') { - i = choose_text(STRT_MONST,wand.friendly[fld[4] - '0']-1,&me,"Choose Which Monster:") + 1; - if(i >= 0) wand.friendly[fld[4] - '0'] = i; + i = choose_text(STRT_MONST,wand.friendly[fld[4] - '1']-1,&me,"Choose Which Monster:") + 1; + if(i >= 0) wand.friendly[fld[4] - '1'] = i; } me[fld].setText(scenario.scen_monsters[i].m_name); return true;