mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-27 00:41:08 +02:00
Initial refactoring to encapsulate adventure map
This commit is contained in:
@ -387,12 +387,12 @@ void ClientCommandManager::handleBonusesCommand(std::istringstream & singleWordB
|
||||
ss << b;
|
||||
return ss.str();
|
||||
};
|
||||
printCommandMessage("Bonuses of " + adventureInt->curArmy()->getObjectName() + "\n");
|
||||
printCommandMessage(format(adventureInt->curArmy()->getBonusList()) + "\n");
|
||||
printCommandMessage("Bonuses of " + adventureInt->getCurrentArmy()->getObjectName() + "\n");
|
||||
printCommandMessage(format(adventureInt->getCurrentArmy()->getBonusList()) + "\n");
|
||||
|
||||
printCommandMessage("\nInherited bonuses:\n");
|
||||
TCNodes parents;
|
||||
adventureInt->curArmy()->getParents(parents);
|
||||
adventureInt->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");
|
||||
@ -416,7 +416,7 @@ void ClientCommandManager::handleTellCommand(std::istringstream& singleWordBuffe
|
||||
|
||||
void ClientCommandManager::handleMpCommand()
|
||||
{
|
||||
if(const CGHeroInstance* h = adventureInt->curHero())
|
||||
if(const CGHeroInstance* h = adventureInt->getCurrentHero())
|
||||
printCommandMessage(std::to_string(h->movement) + "; max: " + std::to_string(h->maxMovePoints(true)) + "/" + std::to_string(h->maxMovePoints(false)) + "\n");
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user