mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-13 01:20:34 +02:00
sorted
This commit is contained in:
@ -29,7 +29,7 @@
|
|||||||
"vcmi.adventureMap.replayOpponentTurnNotImplemented" : "Sorry, replay opponent turn is not implemented yet!",
|
"vcmi.adventureMap.replayOpponentTurnNotImplemented" : "Sorry, replay opponent turn is not implemented yet!",
|
||||||
|
|
||||||
"vcmi.bonusSource.artifact" : "Artifact",
|
"vcmi.bonusSource.artifact" : "Artifact",
|
||||||
"vcmi.bonusSource.creature" : "Creature",
|
"vcmi.bonusSource.creature" : "Ability",
|
||||||
"vcmi.bonusSource.spell" : "Spell",
|
"vcmi.bonusSource.spell" : "Spell",
|
||||||
"vcmi.bonusSource.hero" : "Hero",
|
"vcmi.bonusSource.hero" : "Hero",
|
||||||
"vcmi.bonusSource.commander" : "Commander",
|
"vcmi.bonusSource.commander" : "Commander",
|
||||||
|
@ -829,6 +829,9 @@ void CStackWindow::initBonusesList()
|
|||||||
BonusList output;
|
BonusList output;
|
||||||
BonusList input;
|
BonusList input;
|
||||||
input = *(info->stackNode->getBonuses(CSelector(Bonus::Permanent), Selector::all));
|
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())
|
while(!input.empty())
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user