spell recording handle multi-target cast early
This commit is contained in:
@@ -688,9 +688,17 @@ static void handle_talk(location destination, bool& did_something, bool& need_re
|
||||
|
||||
void handle_target_space(location destination, bool& did_something, bool& need_redraw, bool& need_reprint) {
|
||||
if(recording){
|
||||
std::map<std::string,std::string> info;
|
||||
|
||||
std::ostringstream sstr;
|
||||
sstr << destination;
|
||||
record_action("handle_target_space", sstr.str());
|
||||
info["destination"] = sstr.str();
|
||||
|
||||
sstr.str("");
|
||||
sstr << num_targets_left;
|
||||
info["num_targets_left"] = sstr.str();
|
||||
|
||||
record_action("handle_target_space", info);
|
||||
}
|
||||
if(overall_mode == MODE_SPELL_TARGET)
|
||||
do_combat_cast(destination);
|
||||
|
@@ -440,7 +440,16 @@ static void replay_next_action() {
|
||||
|
||||
handle_spellcast(which_type, did_something, need_redraw, need_reprint);
|
||||
}else if(t == "handle_target_space"){
|
||||
location destination = location_from_action(next_action);
|
||||
auto info = info_from_action(next_action);
|
||||
|
||||
std::istringstream sstr(info["destination"]);
|
||||
location destination;
|
||||
sstr >> destination;
|
||||
|
||||
sstr.str(info["num_targets_left"]);
|
||||
sstr.seekg(0);
|
||||
sstr >> num_targets_left;
|
||||
|
||||
handle_target_space(destination, did_something, need_redraw, need_reprint);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user