Initial refactoring to encapsulate adventure map
This commit is contained in:
1 parent
ee12685748
commit
f1902ab247
13 files changed
+215
-236
No files matched your search
@@ -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