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:
commit
557512b308
@ -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
|
||||||
|
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user