1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-14 10:12:59 +02:00
This commit is contained in:
Laserlicht 2024-11-02 15:46:20 +01:00
parent 74b4fbfceb
commit 988d36bd13
2 changed files with 4 additions and 1 deletions

View File

@ -29,7 +29,7 @@
"vcmi.adventureMap.replayOpponentTurnNotImplemented" : "Sorry, replay opponent turn is not implemented yet!",
"vcmi.bonusSource.artifact" : "Artifact",
"vcmi.bonusSource.creature" : "Creature",
"vcmi.bonusSource.creature" : "Ability",
"vcmi.bonusSource.spell" : "Spell",
"vcmi.bonusSource.hero" : "Hero",
"vcmi.bonusSource.commander" : "Commander",

View File

@ -829,6 +829,9 @@ void CStackWindow::initBonusesList()
BonusList output;
BonusList input;
input = *(info->stackNode->getBonuses(CSelector(Bonus::Permanent), Selector::all));
std::sort(input.begin(), input.end(), [this](std::shared_ptr<Bonus> v1, std::shared_ptr<Bonus> & v2){
return v1->source == v2->source ? info->stackNode->bonusToString(v1, false) < info->stackNode->bonusToString(v2, false) : v1->source == BonusSource::CREATURE_ABILITY || (v1->source < v2->source);
});
while(!input.empty())
{