mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 02:25:38 +01:00
Core/Emote: Fix an issue with EMOTE_STATE_READ, which persisted after closing the map
This commit is contained in:
@@ -529,8 +529,10 @@ void WorldSession::HandleEmoteOpcode(WorldPackets::Chat::EmoteClient& /* packet
|
||||
if (!GetPlayer()->IsAlive() || GetPlayer()->HasUnitState(UNIT_STATE_DIED))
|
||||
return;
|
||||
|
||||
sScriptMgr->OnPlayerEmote(GetPlayer(), 0);
|
||||
GetPlayer()->HandleEmoteCommand(0);
|
||||
sScriptMgr->OnPlayerClearEmote(GetPlayer());
|
||||
|
||||
if (_player->GetUInt32Value(UNIT_NPC_EMOTESTATE))
|
||||
_player->SetUInt32Value(UNIT_NPC_EMOTESTATE, 0);
|
||||
}
|
||||
|
||||
void WorldSession::HandleTextEmoteOpcode(WorldPackets::Chat::CTextEmote& packet)
|
||||
|
||||
@@ -1257,9 +1257,9 @@ void ScriptMgr::OnPlayerChat(Player* player, uint32 type, uint32 lang, std::stri
|
||||
FOREACH_SCRIPT(PlayerScript)->OnChat(player, type, lang, msg, channel);
|
||||
}
|
||||
|
||||
void ScriptMgr::OnPlayerEmote(Player* player, uint32 emote)
|
||||
void ScriptMgr::OnPlayerClearEmote(Player* player)
|
||||
{
|
||||
FOREACH_SCRIPT(PlayerScript)->OnEmote(player, emote);
|
||||
FOREACH_SCRIPT(PlayerScript)->OnClearEmote(player);
|
||||
}
|
||||
|
||||
void ScriptMgr::OnPlayerTextEmote(Player* player, uint32 textEmote, uint32 emoteNum, ObjectGuid guid)
|
||||
|
||||
@@ -735,7 +735,7 @@ class PlayerScript : public UnitScript
|
||||
virtual void OnChat(Player* /*player*/, uint32 /*type*/, uint32 /*lang*/, std::string& /*msg*/, Channel* /*channel*/) { }
|
||||
|
||||
// Both of the below are called on emote opcodes.
|
||||
virtual void OnEmote(Player* /*player*/, uint32 /*emote*/) { }
|
||||
virtual void OnClearEmote(Player* /*player*/) { }
|
||||
|
||||
virtual void OnTextEmote(Player* /*player*/, uint32 /*textEmote*/, uint32 /*emoteNum*/, ObjectGuid /*guid*/) { }
|
||||
|
||||
@@ -1076,7 +1076,7 @@ class ScriptMgr
|
||||
void OnPlayerChat(Player* player, uint32 type, uint32 lang, std::string& msg, Group* group);
|
||||
void OnPlayerChat(Player* player, uint32 type, uint32 lang, std::string& msg, Guild* guild);
|
||||
void OnPlayerChat(Player* player, uint32 type, uint32 lang, std::string& msg, Channel* channel);
|
||||
void OnPlayerEmote(Player* player, uint32 emote);
|
||||
void OnPlayerClearEmote(Player* player);
|
||||
void OnPlayerTextEmote(Player* player, uint32 textEmote, uint32 emoteNum, ObjectGuid guid);
|
||||
void OnPlayerSpellCast(Player* player, Spell* spell, bool skipCheck);
|
||||
void OnPlayerLogin(Player* player, bool firstLogin);
|
||||
|
||||
Reference in New Issue
Block a user