aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Scripting/ScriptMgr.h
diff options
context:
space:
mode:
authorPeter Keresztes Schmidt <carbenium@outlook.com>2020-08-15 15:29:43 +0200
committerGitHub <noreply@github.com>2020-08-15 15:29:43 +0200
commit6c7837f947ff4eb5110a116a371daa6f9e2b3bbe (patch)
tree68c0338b65932b47b62903f8b09a3f573909b66e /src/server/game/Scripting/ScriptMgr.h
parent34d403e83f42304332f89ffc73549f6f2c695ccd (diff)
Core/Unit: Make HandleEmoteCommand typesafe (#25249)
* Scripts/ScarletMonastery: Fix wrong emote during Headless Horseman encounter * Scripts/HoR: Fix wrong emote during escape event * Core/Unit: Make improve type safety of HandleEmoteCommand Change argument type to the expected enum type Emote * Scripts/CoS: Use SetUInt32Value to set UNIT_NPC_EMOTESTATE UNIT_NPC_EMOTESTATE is no flag field
Diffstat (limited to 'src/server/game/Scripting/ScriptMgr.h')
-rw-r--r--src/server/game/Scripting/ScriptMgr.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/server/game/Scripting/ScriptMgr.h b/src/server/game/Scripting/ScriptMgr.h
index f255a3b06a3..be35f14448e 100644
--- a/src/server/game/Scripting/ScriptMgr.h
+++ b/src/server/game/Scripting/ScriptMgr.h
@@ -76,6 +76,7 @@ enum BattlegroundTypeId : uint32;
enum ContentLevels : uint8;
enum Difficulty : uint8;
enum DuelCompleteType : uint8;
+enum Emote : uint32;
enum QuestStatus : uint8;
enum RemoveMethod : uint8;
enum ShutdownExitCode : uint32;
@@ -682,7 +683,7 @@ class TC_GAME_API PlayerScript : public ScriptObject
virtual void OnChat(Player* /*player*/, uint32 /*type*/, uint32 /*lang*/, std::string& /*msg*/, Channel* /*channel*/) { }
// Both of the below are called on emote opcodes.
- virtual void OnEmote(Player* /*player*/, uint32 /*emote*/) { }
+ virtual void OnEmote(Player* /*player*/, Emote /*emote*/) { }
virtual void OnTextEmote(Player* /*player*/, uint32 /*textEmote*/, uint32 /*emoteNum*/, ObjectGuid /*guid*/) { }
@@ -1027,7 +1028,7 @@ class TC_GAME_API ScriptMgr
void OnPlayerChat(Player* player, uint32 type, uint32 lang, std::string& msg, Group* group);
void OnPlayerChat(Player* player, uint32 type, uint32 lang, std::string& msg, Guild* guild);
void OnPlayerChat(Player* player, uint32 type, uint32 lang, std::string& msg, Channel* channel);
- void OnPlayerEmote(Player* player, uint32 emote);
+ void OnPlayerEmote(Player* player, Emote emote);
void OnPlayerTextEmote(Player* player, uint32 textEmote, uint32 emoteNum, ObjectGuid guid);
void OnPlayerSpellCast(Player* player, Spell* spell, bool skipCheck);
void OnPlayerLogin(Player* player, bool firstLogin);