mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-15 00:05:02 +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:
@ -360,13 +360,13 @@ bool CGameInfoCallback::getHeroInfo(const CGObjectInstance * hero, InfoAboutHero
|
||||
doBasicDisguise(info);
|
||||
|
||||
for(auto & elem : info.army)
|
||||
elem.second.count = 0;
|
||||
elem.second.setCount(0);
|
||||
};
|
||||
|
||||
auto doExpertDisguise = [this,h](InfoAboutHero & info)
|
||||
{
|
||||
for(auto & elem : info.army)
|
||||
elem.second.count = 0;
|
||||
elem.second.setCount(0);
|
||||
|
||||
const auto factionIndex = getStartInfo()->playerInfos.at(h->tempOwner).castle;
|
||||
|
||||
|
Reference in New Issue
Block a user