add optional fire_event parameter to get_village

This commit is contained in:
gfgtdf 2015-09-27 01:15:00 +02:00
parent 263f6668d2
commit 0f6584780a
2 changed files with 3 additions and 3 deletions

View file

@ -136,7 +136,7 @@ void move_unit_spectator::set_unit(const unit_map::const_iterator &u)
}
bool get_village(const map_location& loc, int side, int *action_timebonus)
bool get_village(const map_location& loc, int side, int *action_timebonus, bool fire_event)
{
std::vector<team> &teams = *resources::teams;
team *t = unsigned(side - 1) < teams.size() ? &teams[side - 1] : NULL;
@ -174,7 +174,7 @@ bool get_village(const map_location& loc, int side, int *action_timebonus)
if (resources::screen != NULL) {
resources::screen->invalidate(loc);
}
return t->get_village(loc, old_owner_side);
return t->get_village(loc, old_owner_side, fire_event);
}
return false;

View file

@ -96,7 +96,7 @@ private:
* Makes it so the village at the given location is owned by the given side.
* Returns true if getting the village triggered a mutating event.
*/
bool get_village(const map_location& loc, int side, int *time_bonus = NULL);
bool get_village(const map_location& loc, int side, int *time_bonus = NULL, bool fire_event = true);
/// Moves a unit across the board.
/// And enters the synced context.