1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-24 08:32:34 +02:00

Merge pull request #1006 from AgostonSzepessy/dev/agos/small-fixes

Small misc fixes
This commit is contained in:
Andrii Danylchenko 2022-09-29 19:53:27 +03:00 committed by GitHub
commit 557512b308
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 4 deletions

View File

@ -9,7 +9,7 @@ VCMI is work-in-progress attempt to recreate engine for Heroes III, giving it ne
* Homepage: https://vcmi.eu/
* Wiki: https://wiki.vcmi.eu/
* Forums: https://forum.vcmi.eu/
* Bugtracker: https://bugs.vcmi.eu/
* Bugtracker: https://github.com/vcmi/vcmi/issues
* Slack: https://slack.vcmi.eu/
## Installation guides

View File

@ -825,11 +825,10 @@ CStackBasicDescriptor CGHeroInstance::calculateNecromancy (const BattleResult &b
}
else
{
auto quality = [getCreatureID](std::shared_ptr<Bonus> pick) -> std::vector<int>
auto quality = [getCreatureID](std::shared_ptr<Bonus> pick) -> std::tuple<int, int, int>
{
const CCreature * c = VLC->creh->objects[getCreatureID(pick)];
std::vector<int> v = {c->level, static_cast<int>(c->cost.marketValue()), -pick->additionalInfo[1]};
return v;
return std::tuple<int, int, int> {c->level, static_cast<int>(c->cost.marketValue()), -pick->additionalInfo[1]};
};
if(quality(topPick) < quality(newPick))
topPick = newPick;