aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Entities/GameObject
diff options
context:
space:
mode:
authorModoX <moardox@gmail.com>2024-04-09 16:33:39 +0200
committerShauren <shauren.trinity@gmail.com>2024-10-05 17:55:14 +0200
commitd900e0e9558d310e7ca35a18dadac76310d47d77 (patch)
tree4cbc135f110fecce9a7ad180fceed4cd650b21e7 /src/server/game/Entities/GameObject
parent6e6454860cac701ffa8a921677239b9b13e0e5de (diff)
Core/Entities: Added GetStringId helper methods
(cherry picked from commit 5cea37153eb6675bf0a25320a1c11cd0ec4969b6)
Diffstat (limited to 'src/server/game/Entities/GameObject')
-rw-r--r--src/server/game/Entities/GameObject/GameObject.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/server/game/Entities/GameObject/GameObject.h b/src/server/game/Entities/GameObject/GameObject.h
index 882146faab9..af5261be1b1 100644
--- a/src/server/game/Entities/GameObject/GameObject.h
+++ b/src/server/game/Entities/GameObject/GameObject.h
@@ -277,6 +277,7 @@ class TC_GAME_API GameObject : public WorldObject, public GridObject<GameObject>
bool HasStringId(std::string_view id) const;
void SetScriptStringId(std::string id);
std::array<std::string_view, 3> const& GetStringIds() const { return m_stringIds; }
+ std::string_view const& GetStringId(StringIdType type) const { return m_stringIds[AsUnderlyingType(type)]; }
void SetDisplayId(uint32 displayid);
uint32 GetDisplayId() const { return GetUInt32Value(GAMEOBJECT_DISPLAYID); }