mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 00:48:56 +01:00
Core/Chat: Disallow visual emotes when an entity is in dead-state (thanks to Vladimir)
Closes issue 4942. --HG-- branch : trunk
This commit is contained in:
@@ -580,7 +580,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket & recv_data)
|
||||
|
||||
void WorldSession::HandleEmoteOpcode(WorldPacket & recv_data)
|
||||
{
|
||||
if (!GetPlayer()->isAlive())
|
||||
if (!GetPlayer()->isAlive() || GetPlayer()->hasUnitState(UNIT_STAT_DIED))
|
||||
return;
|
||||
|
||||
uint32 emote;
|
||||
@@ -656,8 +656,11 @@ void WorldSession::HandleTextEmoteOpcode(WorldPacket & recv_data)
|
||||
case EMOTE_ONESHOT_NONE:
|
||||
break;
|
||||
default:
|
||||
GetPlayer()->HandleEmoteCommand(emote_anim);
|
||||
break;
|
||||
// Only allow text-emotes for "dead" entities (feign death included)
|
||||
if (GetPlayer()->hasUnitState(UNIT_STAT_DIED))
|
||||
break;
|
||||
GetPlayer()->HandleEmoteCommand(emote_anim);
|
||||
break;
|
||||
}
|
||||
|
||||
Unit* unit = ObjectAccessor::GetUnit(*_player, guid);
|
||||
|
||||
Reference in New Issue
Block a user