1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-17 00:07:41 +02:00

vcmi: massive refactoring v1

This commit is contained in:
Konstantin
2023-04-05 03:26:29 +03:00
parent ee489f18d2
commit 11b237a23c
129 changed files with 803 additions and 762 deletions

View File

@ -1759,7 +1759,7 @@ void RebalanceStacks::applyGs(CGameState * gs)
else //split stack to an empty slot
{
src.army->changeStackCount(src.slot, -count);
dst.army->addToSlot(dst.slot, srcType->idNumber, count, false);
dst.army->addToSlot(dst.slot, srcType->getId(), count, false);
if (stackExp)
dst.army->setStackExp(dst.slot, src.army->getStackExperience(src.slot));
}
@ -2508,7 +2508,7 @@ void YourTurn::applyGs(CGameState * gs) const
Component::Component(const CStackBasicDescriptor & stack)
: id(EComponentType::CREATURE)
, subtype(stack.type->idNumber)
, subtype(stack.type->getId())
, val(stack.count)
{
}