From c9f26b6666f33e23504e231dcdf06e499a42b9a6 Mon Sep 17 00:00:00 2001 From: fallenoak Date: Thu, 5 Feb 2026 14:53:58 -0600 Subject: [PATCH] feat(object): add CGObject::IsExactlyA --- 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 64d8359..153cce1 100644 --- a/src/object/client/CGObject.cpp +++ b/src/object/client/CGObject.cpp @@ -40,6 +40,10 @@ int32_t CGObject::IsA(OBJECT_TYPE type) const { return (this->GetType() & type) != 0; } +int32_t CGObject::IsExactlyA(OBJECT_TYPE_ID typeID) const { + return this->m_typeID == typeID; +} + CGObjectData* CGObject::Obj() const { return this->m_obj; } diff --git a/src/object/client/CGObject.hpp b/src/object/client/CGObject.hpp index 4331157..506cddd 100644 --- a/src/object/client/CGObject.hpp +++ b/src/object/client/CGObject.hpp @@ -32,6 +32,7 @@ class CGObject { OBJECT_TYPE GetType() const; OBJECT_TYPE_ID GetTypeID() const; int32_t IsA(OBJECT_TYPE type) const; + int32_t IsExactlyA(OBJECT_TYPE_ID typeID) const; protected: // Protected member variables