1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

Reduced number of accesses to CGObjectInstance::subID

This commit is contained in:
Ivan Savenko
2023-10-24 17:11:25 +03:00
parent 455d8d4738
commit 03e1169781
27 changed files with 135 additions and 97 deletions

View File

@@ -40,12 +40,12 @@ CGObjectInstance::CGObjectInstance():
//must be instantiated in .cpp file for access to complete types of all member fields
CGObjectInstance::~CGObjectInstance() = default;
int32_t CGObjectInstance::getObjGroupIndex() const
MapObjectID CGObjectInstance::getObjGroupIndex() const
{
return ID.num;
return ID;
}
int32_t CGObjectInstance::getObjTypeIndex() const
MapObjectSubID CGObjectInstance::getObjTypeIndex() const
{
return subID;
}
@@ -197,6 +197,11 @@ void CGObjectInstance::setProperty( ui8 what, ui32 val )
}
}
TObjectTypeHandler CGObjectInstance::getObjectHandler() const
{
return VLC->objtypeh->getHandlerFor(ID, subID);
}
void CGObjectInstance::setPropertyDer( ui8 what, ui32 val )
{}