mirror of
				https://github.com/vcmi/vcmi.git
				synced 2025-10-31 00:07:39 +02:00 
			
		
		
		
	sorted
This commit is contained in:
		| @@ -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", | ||||
|   | ||||
| @@ -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()) | ||||
| 	{ | ||||
|   | ||||
		Reference in New Issue
	
	Block a user