mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-21 07:22:02 -04:00
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
This commit is contained in:
committed by
GitHub
parent
34d403e83f
commit
6c7837f947
@@ -1243,14 +1243,10 @@ public:
|
||||
}
|
||||
|
||||
//show animation
|
||||
static bool HandleDebugAnimCommand(ChatHandler* handler, char const* args)
|
||||
static bool HandleDebugAnimCommand(ChatHandler* handler, uint32 emoteId)
|
||||
{
|
||||
if (!*args)
|
||||
return false;
|
||||
|
||||
uint32 animId = atoi((char*)args);
|
||||
if (Unit* unit = handler->getSelectedUnit())
|
||||
unit->HandleEmoteCommand(animId);
|
||||
unit->HandleEmoteCommand(static_cast<Emote>(emoteId));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user