aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Texts
diff options
context:
space:
mode:
authorPeter Keresztes Schmidt <carbenium@outlook.com>2020-08-15 15:29:43 +0200
committerShauren <shauren.trinity@gmail.com>2022-01-26 21:46:51 +0100
commit2e3c612c808bca7601b32ce5dca28b204e652773 (patch)
tree61f88efa0f2bc5781183ad5c8989b508f46b634c /src/server/game/Texts
parent595e89e02bec7300b3dd42afc5899a64f79aecba (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 (cherry picked from commit 6c7837f947ff4eb5110a116a371daa6f9e2b3bbe)
Diffstat (limited to 'src/server/game/Texts')
-rw-r--r--src/server/game/Texts/CreatureTextMgr.cpp2
-rw-r--r--src/server/game/Texts/CreatureTextMgr.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/server/game/Texts/CreatureTextMgr.cpp b/src/server/game/Texts/CreatureTextMgr.cpp
index 4d554b9232c..37ceba5032a 100644
--- a/src/server/game/Texts/CreatureTextMgr.cpp
+++ b/src/server/game/Texts/CreatureTextMgr.cpp
@@ -370,7 +370,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 084d9b40f1e..69302c0e8dd 100644
--- a/src/server/game/Texts/CreatureTextMgr.h
+++ b/src/server/game/Texts/CreatureTextMgr.h
@@ -103,7 +103,7 @@ class TC_GAME_API CreatureTextMgr
CreatureTextMap const& GetTextMap() const { return mTextMap; }
static void SendSound(Creature* source, uint32 sound, ChatMsg msgType, WorldObject const* whisperTarget = nullptr, CreatureTextRange range = TEXT_RANGE_NORMAL, Team team = TEAM_OTHER, bool gmOnly = false, uint32 keyBroadcastTextId = 0, SoundKitPlayType playType = SoundKitPlayType::Normal);
- static void SendEmote(Unit* source, uint32 emote);
+ static 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, SoundKitPlayType playType = SoundKitPlayType::Normal, Team team = TEAM_OTHER, bool gmOnly = false, Player* srcPlr = nullptr);