[10518] Prevent emotes animation in feign death state.

In 3.x this has been posisble only with cheating tool.
This commit is contained in:
VladimirMangos 2010-09-22 14:05:27 +04:00
parent fa9c6e2e61
commit 14127b4d08
2 changed files with 8 additions and 2 deletions

View file

@ -494,7 +494,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;
@ -567,8 +567,14 @@ void WorldSession::HandleTextEmoteOpcode( WorldPacket & recv_data )
case EMOTE_ONESHOT_NONE:
break;
default:
{
// in feign death state allowed only text emotes.
if (GetPlayer()->hasUnitState(UNIT_STAT_DIED))
break;
GetPlayer()->HandleEmoteCommand(emote_id);
break;
}
}
Unit* unit = ObjectAccessor::GetUnit(*_player, guid);