1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +02:00

heroes and more buttons

This commit is contained in:
Laserlicht
2023-10-17 21:13:08 +02:00
committed by GitHub
parent d5b16ac96c
commit e05102192b
8 changed files with 72 additions and 8 deletions

View File

@@ -235,6 +235,12 @@ void PlayerLocalState::removeWanderingHero(const CGHeroInstance * hero)
setSelection(ownedTowns.front());
}
void PlayerLocalState::swapWanderingHero(int pos1, int pos2)
{
assert(wanderingHeroes[pos1] && wanderingHeroes[pos2]);
std::swap(wanderingHeroes[pos1], wanderingHeroes[pos2]);
}
const std::vector<const CGTownInstance *> & PlayerLocalState::getOwnedTowns()
{
return ownedTowns;