diff --git a/client/PlayerLocalState.cpp b/client/PlayerLocalState.cpp index 5fb7ed65f..de734ee16 100644 --- a/client/PlayerLocalState.cpp +++ b/client/PlayerLocalState.cpp @@ -239,6 +239,8 @@ void PlayerLocalState::swapWanderingHero(int pos1, int pos2) { assert(wanderingHeroes[pos1] && wanderingHeroes[pos2]); std::swap(wanderingHeroes[pos1], wanderingHeroes[pos2]); + + adventureInt->onHeroOrderChanged(); } const std::vector & PlayerLocalState::getOwnedTowns() diff --git a/client/adventureMap/AdventureMapInterface.cpp b/client/adventureMap/AdventureMapInterface.cpp index c4199dde1..3ac27b79e 100644 --- a/client/adventureMap/AdventureMapInterface.cpp +++ b/client/adventureMap/AdventureMapInterface.cpp @@ -331,6 +331,11 @@ void AdventureMapInterface::onTownOrderChanged() widget->getTownList()->updateWidget(); } +void AdventureMapInterface::onHeroOrderChanged() +{ + widget->getHeroList()->updateWidget(); +} + void AdventureMapInterface::onMapTilesChanged(boost::optional> positions) { if (positions) diff --git a/client/adventureMap/AdventureMapInterface.h b/client/adventureMap/AdventureMapInterface.h index 3a8c96add..bc1752c3a 100644 --- a/client/adventureMap/AdventureMapInterface.h +++ b/client/adventureMap/AdventureMapInterface.h @@ -149,6 +149,9 @@ public: /// Called when town order changes void onTownOrderChanged(); + /// Called when hero order changes + void onHeroOrderChanged(); + /// Called when map audio should be paused, e.g. on combat or town screen access void onAudioPaused();