1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

Remove CStack::type pointer to VLC entity

This commit is contained in:
Ivan Savenko
2024-10-12 16:52:58 +00:00
parent d3af9f1c67
commit c1e125b186
2 changed files with 11 additions and 11 deletions

View File

@@ -27,7 +27,7 @@ class DLL_LINKAGE CStack : public CBonusSystemNode, public battle::CUnitState, p
{
private:
ui32 ID = -1; //unique ID of stack
const CCreature * type = nullptr;
CreatureID typeID;
TerrainId nativeTerrain; //tmp variable to save native terrain value on battle init
ui32 baseAmount = -1;
@@ -98,7 +98,7 @@ public:
//stackState is not serialized here
assert(isIndependentNode());
h & static_cast<CBonusSystemNode&>(*this);
h & type;
h & typeID;
h & ID;
h & baseAmount;
h & owner;
@@ -133,7 +133,7 @@ public:
else if(!army || extSlot == SlotID() || !army->hasStackAtSlot(extSlot))
{
base = nullptr;
logGlobal->warn("%s doesn't have a base stack!", type->getNameSingularTranslated());
logGlobal->warn("%s doesn't have a base stack!", typeID.toEntity(VLC)->getNameSingularTranslated());
}
else
{