1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-17 01:32:21 +02:00

Moved current selection to local state class

This commit is contained in:
Ivan Savenko
2023-04-17 13:06:58 +03:00
parent f6d480cbb2
commit 6a46138617
14 changed files with 141 additions and 113 deletions

View File

@ -15,6 +15,7 @@
#include "adventureMap/CInGameConsole.h"
#include "adventureMap/CAdventureMapInterface.h"
#include "CPlayerInterface.h"
#include "PlayerLocalState.h"
#include "CServerHandler.h"
#include "gui/CGuiHandler.h"
#include "../lib/NetPacks.h"
@ -387,12 +388,12 @@ void ClientCommandManager::handleBonusesCommand(std::istringstream & singleWordB
ss << b;
return ss.str();
};
printCommandMessage("Bonuses of " + adventureInt->getCurrentArmy()->getObjectName() + "\n");
printCommandMessage(format(adventureInt->getCurrentArmy()->getBonusList()) + "\n");
printCommandMessage("Bonuses of " + LOCPLINT->localState->getCurrentArmy()->getObjectName() + "\n");
printCommandMessage(format(LOCPLINT->localState->getCurrentArmy()->getBonusList()) + "\n");
printCommandMessage("\nInherited bonuses:\n");
TCNodes parents;
adventureInt->getCurrentArmy()->getParents(parents);
LOCPLINT->localState->getCurrentArmy()->getParents(parents);
for(const CBonusSystemNode *parent : parents)
{
printCommandMessage(std::string("\nBonuses from ") + typeid(*parent).name() + "\n" + format(*parent->getAllBonuses(Selector::all, Selector::all)) + "\n");