diff options
| author | Peter Keresztes Schmidt <carbenium@outlook.com> | 2020-08-15 15:29:43 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-08-15 15:29:43 +0200 |
| commit | 6c7837f947ff4eb5110a116a371daa6f9e2b3bbe (patch) | |
| tree | 68c0338b65932b47b62903f8b09a3f573909b66e /src/server/game/Texts | |
| parent | 34d403e83f42304332f89ffc73549f6f2c695ccd (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/Texts')
| -rw-r--r-- | src/server/game/Texts/CreatureTextMgr.cpp | 2 | ||||
| -rw-r--r-- | src/server/game/Texts/CreatureTextMgr.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/server/game/Texts/CreatureTextMgr.cpp b/src/server/game/Texts/CreatureTextMgr.cpp index 9d7efaa71ac..5d37aa2f507 100644 --- a/src/server/game/Texts/CreatureTextMgr.cpp +++ b/src/server/game/Texts/CreatureTextMgr.cpp @@ -382,7 +382,7 @@ void CreatureTextMgr::SendNonChatPacket(WorldObject* source, WorldPacket const* source->SendMessageToSetInRange(data, dist, true); } -void CreatureTextMgr::SendEmote(Unit* source, uint32 emote) +void CreatureTextMgr::SendEmote(Unit* source, Emote emote) { if (!source) return; diff --git a/src/server/game/Texts/CreatureTextMgr.h b/src/server/game/Texts/CreatureTextMgr.h index 7b14188a410..263685566aa 100644 --- a/src/server/game/Texts/CreatureTextMgr.h +++ b/src/server/game/Texts/CreatureTextMgr.h @@ -94,7 +94,7 @@ class TC_GAME_API CreatureTextMgr CreatureTextMap const& GetTextMap() const { return mTextMap; } void SendSound(Creature* source, uint32 sound, ChatMsg msgType, WorldObject const* whisperTarget, CreatureTextRange range, Team team, bool gmOnly); - void SendEmote(Unit* source, uint32 emote); + void SendEmote(Unit* source, Emote emote); //if sent, returns the 'duration' of the text else 0 if error uint32 SendChat(Creature* source, uint8 textGroup, WorldObject const* whisperTarget = nullptr, ChatMsg msgType = CHAT_MSG_ADDON, Language language = LANG_ADDON, CreatureTextRange range = TEXT_RANGE_NORMAL, uint32 sound = 0, Team team = TEAM_OTHER, bool gmOnly = false, Player* srcPlr = nullptr); |
