From fd3217c87520da29172efe25d58fb93ee4088f99 Mon Sep 17 00:00:00 2001 From: Ivan Savenko Date: Mon, 11 Sep 2023 13:20:16 +0300 Subject: [PATCH] Fix few more missing BattleID's --- lib/CStack.cpp | 1 + lib/spells/effects/Moat.cpp | 1 + 2 files changed, 2 insertions(+) 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); }