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:
@@ -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 )
|
||||
{}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user