From aac8cf0855322eedf049b62f1490c72ba51543f5 Mon Sep 17 00:00:00 2001 From: fallenoak Date: Thu, 5 Feb 2026 13:26:59 -0600 Subject: [PATCH] feat(object): add CGObject::IsA --- src/object/client/CGObject.cpp | 4 ++++ src/object/client/CGObject.hpp | 1 + 2 files changed, 5 insertions(+) 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