feat(object): add CGObject::IsA

This commit is contained in:
fallenoak 2026-02-05 13:26:59 -06:00
parent aa22dd952a
commit aac8cf0855
No known key found for this signature in database
GPG Key ID: 7628F8E61AEA070D
2 changed files with 5 additions and 0 deletions

View File

@ -36,6 +36,10 @@ OBJECT_TYPE_ID CGObject::GetTypeID() const {
return this->m_typeID;
}
int32_t CGObject::IsA(OBJECT_TYPE type) const {
return (this->GetType() & type) != 0;
}
CGObjectData* CGObject::Obj() const {
return this->m_obj;
}

View File

@ -31,6 +31,7 @@ class CGObject {
WOWGUID GetGUID() const;
OBJECT_TYPE GetType() const;
OBJECT_TYPE_ID GetTypeID() const;
int32_t IsA(OBJECT_TYPE type) const;
protected:
// Protected member variables