Commit 5aaf32d9 authored by DailyShana's avatar DailyShana

fix

parent f1cbf333
...@@ -1014,13 +1014,19 @@ int32 field::control_adjust(uint16 step) { ...@@ -1014,13 +1014,19 @@ int32 field::control_adjust(uint16 step) {
card_set* adjust_set = (card_set*)core.units.begin()->ptarget; card_set* adjust_set = (card_set*)core.units.begin()->ptarget;
delete adjust_set; delete adjust_set;
core.control_adjust_set[0].insert(core.control_adjust_set[1].begin(), core.control_adjust_set[1].end()); core.control_adjust_set[0].insert(core.control_adjust_set[1].begin(), core.control_adjust_set[1].end());
for(auto cit = core.control_adjust_set[0].begin(); cit != core.control_adjust_set[0].end(); ++cit) { for(auto cit = core.control_adjust_set[0].begin(); cit != core.control_adjust_set[0].end(); ) {
(*cit)->filter_disable_related_cards(); card* pcard = *cit++;
if((*cit)->unique_code) if(!(pcard->current.location & LOCATION_ONFIELD)) {
add_unique_card(*cit); core.control_adjust_set[0].erase(pcard);
raise_single_event((*cit), 0, EVENT_CONTROL_CHANGED, 0, REASON_RULE, 0, 0, 0); continue;
}
pcard->filter_disable_related_cards();
if(pcard->unique_code)
add_unique_card(pcard);
raise_single_event(pcard, 0, EVENT_CONTROL_CHANGED, 0, REASON_RULE, 0, 0, 0);
} }
raise_event(&core.control_adjust_set[0], EVENT_CONTROL_CHANGED, 0, 0, 0, 0, 0); if(core.control_adjust_set[0].size())
raise_event(&core.control_adjust_set[0], EVENT_CONTROL_CHANGED, 0, 0, 0, 0, 0);
process_single_event(); process_single_event();
process_instant_event(); process_instant_event();
return FALSE; return FALSE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment