diff --git a/lib/CStack.cpp b/lib/CStack.cpp index 9343340cf..ed18eb3a2 100644 --- a/lib/CStack.cpp +++ b/lib/CStack.cpp @@ -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; diff --git a/lib/spells/effects/Moat.cpp b/lib/spells/effects/Moat.cpp index bb80b9d08..0ef725589 100644 --- a/lib/spells/effects/Moat.cpp +++ b/lib/spells/effects/Moat.cpp @@ -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); }