1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-28 08:48:48 +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/ * Homepage: https://vcmi.eu/
* Wiki: https://wiki.vcmi.eu/ * Wiki: https://wiki.vcmi.eu/
* Forums: https://forum.vcmi.eu/ * Forums: https://forum.vcmi.eu/
* Bugtracker: https://bugs.vcmi.eu/ * Bugtracker: https://github.com/vcmi/vcmi/issues
* Slack: https://slack.vcmi.eu/ * Slack: https://slack.vcmi.eu/
## Installation guides ## Installation guides

View File

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