mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-29 23:07:48 +02:00
Unified CStack ammo, casts and counterattacks
* it is possible now to add casts and shoots OTF (f.e. with spell bonus) Centralized stack 'ammo' loading from bonus system. * introduced small proxy class for local bonus cache (no need to use global cache if particular selector used on node only in one place) * handle killing resurrected creatures * use IBonusBearer::MaxHealth() where possible * Fixed https://bugs.vcmi.eu/view.php?id=2486 * Possible fix for 0 HP after resurrection. * Hack-fixed https://bugs.vcmi.eu/view.php?id=2584 * Unified CStack health API * Use CHealth for CStack count and health points * increased SERIALIZATION_VERSION
This commit is contained in:
@@ -728,12 +728,12 @@ void BattleResultsApplied::applyCl(CClient *cl)
|
||||
INTERFACE_CALL_IF_PRESENT(PlayerColor::SPECTATOR, battleResultsApplied);
|
||||
}
|
||||
|
||||
void StacksHealedOrResurrected::applyCl(CClient *cl)
|
||||
void StacksHealedOrResurrected::applyCl(CClient * cl)
|
||||
{
|
||||
std::vector<std::pair<ui32, ui32> > shiftedHealed;
|
||||
for(auto & elem : healedStacks)
|
||||
{
|
||||
shiftedHealed.push_back(std::make_pair(elem.stackID, elem.healedHP));
|
||||
shiftedHealed.push_back(std::make_pair(elem.stackId, (ui32)elem.delta));
|
||||
}
|
||||
BATTLE_INTERFACE_CALL_IF_PRESENT_FOR_BOTH_SIDES(battleStacksHealedRes, shiftedHealed, lifeDrain, tentHealing, drainedFrom);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user