1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +02:00

Fix regressions from previous PR

This commit is contained in:
Ivan Savenko
2024-11-07 12:07:45 +00:00
parent 697d63d2b8
commit b9ff192a91
4 changed files with 14 additions and 7 deletions

View File

@@ -1005,12 +1005,12 @@ CStackBasicDescriptor::CStackBasicDescriptor(const CCreature *c, TQuantity Count
const CCreature * CStackBasicDescriptor::getCreature() const
{
return typeID.toCreature();
return typeID.hasValue() ? typeID.toCreature() : nullptr;
}
const Creature * CStackBasicDescriptor::getType() const
{
return typeID.toEntity(VLC);
return typeID.hasValue() ? typeID.toEntity(VLC) : nullptr;
}
CreatureID CStackBasicDescriptor::getId() const