mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-13 01:20:34 +02:00
Unit stack rebalancing rework
- CStackInstance::count is now private with accessor methods - CStackInstance::experience renamed to totalExperience and now stores total stack experience (multiplied by stack size) to reduce rounding errors - CStackInstance::totalExperience is now private with accessors methods - stack experience is now automatically reallocated on stack management - Removed buggy BulkSmartRebalanceStacks pack, that mostly duplicates BulkRebalanceStacks - Renamed BulkSmartSplitStack to BulkSplitAndRebalanceStack to drop unclear "smart" in name - Reworked split-and-rebalance logic to correctly reallocate stack experience
This commit is contained in:
@ -286,20 +286,20 @@ void CArmyTooltip::init(const InfoAboutArmy &army)
|
||||
std::string subtitle;
|
||||
if(army.army.isDetailed)
|
||||
{
|
||||
subtitle = TextOperations::formatMetric(slot.second.count, 4);
|
||||
subtitle = TextOperations::formatMetric(slot.second.getCount(), 4);
|
||||
}
|
||||
else
|
||||
{
|
||||
//if =0 - we have no information about stack size at all
|
||||
if(slot.second.count)
|
||||
if(slot.second.getCount())
|
||||
{
|
||||
if(settings["gameTweaks"]["numericCreaturesQuantities"].Bool())
|
||||
{
|
||||
subtitle = CCreature::getQuantityRangeStringForId((CCreature::CreatureQuantityId)slot.second.count);
|
||||
subtitle = CCreature::getQuantityRangeStringForId((CCreature::CreatureQuantityId)slot.second.getCount());
|
||||
}
|
||||
else
|
||||
{
|
||||
subtitle = LIBRARY->generaltexth->arraytxt[171 + 3*(slot.second.count)];
|
||||
subtitle = LIBRARY->generaltexth->arraytxt[171 + 3*(slot.second.getCount())];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user