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)
|
void WorldSession::HandleEmoteOpcode(WorldPacket & recv_data)
|
||||||
{
|
{
|
||||||
if (!GetPlayer()->isAlive())
|
if (!GetPlayer()->isAlive() || GetPlayer()->hasUnitState(UNIT_STAT_DIED))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
uint32 emote;
|
uint32 emote;
|
||||||
@@ -656,6 +656,9 @@ void WorldSession::HandleTextEmoteOpcode(WorldPacket & recv_data)
|
|||||||
case EMOTE_ONESHOT_NONE:
|
case EMOTE_ONESHOT_NONE:
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
// Only allow text-emotes for "dead" entities (feign death included)
|
||||||
|
if (GetPlayer()->hasUnitState(UNIT_STAT_DIED))
|
||||||
|
break;
|
||||||
GetPlayer()->HandleEmoteCommand(emote_anim);
|
GetPlayer()->HandleEmoteCommand(emote_anim);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user