diff --git a/src/object/client/CGObject.cpp b/src/object/client/CGObject.cpp index 41236cf..64d8359 100644 --- a/src/object/client/CGObject.cpp +++ b/src/object/client/CGObject.cpp @@ -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; } diff --git a/src/object/client/CGObject.hpp b/src/object/client/CGObject.hpp index 55f4514..4331157 100644 --- a/src/object/client/CGObject.hpp +++ b/src/object/client/CGObject.hpp @@ -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