mirror of
https://github.com/vcmi/vcmi.git
synced 2025-08-13 19:54:17 +02:00
BattleInfo: update bonus tree when unit is moved
This is a semi-dirty hack to force uncaching a bonuses with UnitOnHexLimiter
This commit is contained in:
@@ -740,6 +740,9 @@ void BattleInfo::moveUnit(uint32_t id, BattleHex destination)
|
||||
return;
|
||||
}
|
||||
sta->position = destination;
|
||||
//Bonuses can be limited by unit placement, so, change tree version
|
||||
//to force updating a bonus. TODO: update version only when such bonuses are present
|
||||
CBonusSystemNode::treeHasChanged();
|
||||
}
|
||||
|
||||
void BattleInfo::setUnitState(uint32_t id, const JsonNode & data, int64_t healthDelta)
|
||||
|
Reference in New Issue
Block a user