1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-06 09:09:40 +02:00

Removed pointer to VLC entity from CStackBasicDescriptor

This commit is contained in:
Ivan Savenko
2024-10-12 16:02:35 +00:00
parent c98ac01e7a
commit d3af9f1c67
38 changed files with 140 additions and 160 deletions

View File

@@ -312,7 +312,7 @@ int getDuplicatingSlots(const CArmedInstance * army)
for(auto stack : army->Slots())
{
if(stack.second->type && army->getSlotFor(stack.second->type) != stack.first)
if(stack.second->getCreature() && army->getSlotFor(stack.second->getCreature()) != stack.first)
duplicatingSlots++;
}
@@ -387,7 +387,7 @@ bool shouldVisit(const Nullkiller * ai, const CGHeroInstance * h, const CGObject
{
for(auto slot : h->Slots())
{
if(slot.second->type->hasUpgrades())
if(slot.second->getType()->hasUpgrades())
return true; //TODO: check price?
}
return false;