mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-26 22:57:00 +02:00
Merge pull request #2616 from dydzio0614/battle-hero-window-mana-fix
Fix updating opponent hero spellpoints in battle window
This commit is contained in:
commit
b92e45d7b4
@ -476,9 +476,6 @@ void CPlayerInterface::heroManaPointsChanged(const CGHeroInstance * hero)
|
||||
adventureInt->onHeroChanged(hero);
|
||||
if (makingTurn && hero->tempOwner == playerID)
|
||||
adventureInt->onHeroChanged(hero);
|
||||
|
||||
for (auto window : GH.windows().findWindows<BattleWindow>())
|
||||
window->heroManaPointsChanged(hero);
|
||||
}
|
||||
void CPlayerInterface::heroMovePointsChanged(const CGHeroInstance * hero)
|
||||
{
|
||||
|
@ -17,7 +17,9 @@
|
||||
#include "mapView/mapHandler.h"
|
||||
#include "adventureMap/CInGameConsole.h"
|
||||
#include "battle/BattleInterface.h"
|
||||
#include "battle/BattleWindow.h"
|
||||
#include "gui/CGuiHandler.h"
|
||||
#include "gui/WindowHandler.h"
|
||||
#include "widgets/MiscWidgets.h"
|
||||
#include "CMT.h"
|
||||
#include "CServerHandler.h"
|
||||
@ -153,6 +155,9 @@ void ApplyClientNetPackVisitor::visitSetMana(SetMana & pack)
|
||||
{
|
||||
const CGHeroInstance *h = cl.getHero(pack.hid);
|
||||
callInterfaceIfPresent(cl, h->tempOwner, &IGameEventsReceiver::heroManaPointsChanged, h);
|
||||
|
||||
for (auto window : GH.windows().findWindows<BattleWindow>())
|
||||
window->heroManaPointsChanged(h);
|
||||
}
|
||||
|
||||
void ApplyClientNetPackVisitor::visitSetMovePoints(SetMovePoints & pack)
|
||||
|
Loading…
Reference in New Issue
Block a user