Skip to content

Commit

Permalink
fixup! Support location_id in [recall] and [unstore_unit]
Browse files Browse the repository at this point in the history
(cherry-picked from commit ea6578a)
  • Loading branch information
CelticMinstrel committed Oct 7, 2018
1 parent 4812346 commit 6d322cf
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/game_events/action_wml.cpp
Expand Up @@ -495,9 +495,14 @@ WML_HANDLER_FUNCTION(recall,, cfg)
const unit_ptr to_recruit = *u;
const unit* pass_check = to_recruit.get();
if(!cfg["check_passability"].to_bool(true)) pass_check = nullptr;
const map_location cfg_loc = cfg.has_attribute("location_id")
? resources::gameboard->map().special_locations().left[cfg["location_id"]]
: cfg_to_loc(cfg);
map_location cfg_loc = cfg_to_loc(cfg);
if(cfg.has_attribute("location_id")) {
const auto& special_locs = resources::gameboard->map().special_locations().left;
auto& iter = special_locs.find(cfg["location_id"])
if(iter != special_locs.end()) {
cfg_loc = iter->second;
}
}

/// @todo fendrin: comment this monster
for (unit_map::const_unit_iterator leader : leaders) {
Expand Down

0 comments on commit 6d322cf

Please sign in to comment.