mirror of
https://github.com/whoahq/whoa.git
synced 2026-03-05 15:42:17 +03:00
feat(object): add CGObject::IsA
This commit is contained in:
parent
aa22dd952a
commit
aac8cf0855
@ -36,6 +36,10 @@ OBJECT_TYPE_ID CGObject::GetTypeID() const {
|
|||||||
return this->m_typeID;
|
return this->m_typeID;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int32_t CGObject::IsA(OBJECT_TYPE type) const {
|
||||||
|
return (this->GetType() & type) != 0;
|
||||||
|
}
|
||||||
|
|
||||||
CGObjectData* CGObject::Obj() const {
|
CGObjectData* CGObject::Obj() const {
|
||||||
return this->m_obj;
|
return this->m_obj;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -31,6 +31,7 @@ class CGObject {
|
|||||||
WOWGUID GetGUID() const;
|
WOWGUID GetGUID() const;
|
||||||
OBJECT_TYPE GetType() const;
|
OBJECT_TYPE GetType() const;
|
||||||
OBJECT_TYPE_ID GetTypeID() const;
|
OBJECT_TYPE_ID GetTypeID() const;
|
||||||
|
int32_t IsA(OBJECT_TYPE type) const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// Protected member variables
|
// Protected member variables
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user