1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-03-17 20:58:07 +02:00

Fix few more missing BattleID's

This commit is contained in:
Ivan Savenko 2023-09-11 13:20:16 +03:00
parent c4e2417326
commit fd3217c875
2 changed files with 2 additions and 0 deletions

View File

@ -395,6 +395,7 @@ void CStack::spendMana(ServerCallback * server, const int spellCost) const
logGlobal->warn("Unexpected spell cost %d for creature", spellCost);
BattleSetStackProperty ssp;
ssp.battleID = battle->battleID;
ssp.stackID = unitId();
ssp.which = BattleSetStackProperty::CASTS;
ssp.val = -spellCost;

View File

@ -116,6 +116,7 @@ void Moat::apply(ServerCallback * server, const Mechanics * m, const EffectTarge
for(auto & b : converted)
{
GiveBonus gb(GiveBonus::ETarget::BATTLE);
gb.id = m->battle()->getBattle()->getBattleID().getNum();
gb.bonus = b;
server->apply(&gb);
}