mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 18:15:31 +01:00
Core/Players: merged a fix for frozen emotes in specific circumstances
This commit is contained in:
@@ -700,8 +700,10 @@ void WorldSession::HandleEmoteOpcode(WorldPacket& recvData)
|
||||
|
||||
uint32 emote;
|
||||
recvData >> emote;
|
||||
sScriptMgr->OnPlayerEmote(GetPlayer(), emote);
|
||||
GetPlayer()->HandleEmoteCommand(emote);
|
||||
sScriptMgr->OnPlayerClearEmote(GetPlayer());
|
||||
|
||||
if (_player->GetUInt32Value(UNIT_NPC_EMOTESTATE))
|
||||
_player->SetUInt32Value(UNIT_NPC_EMOTESTATE, 0);
|
||||
}
|
||||
|
||||
namespace Trinity
|
||||
|
||||
@@ -1904,9 +1904,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)
|
||||
|
||||
@@ -662,7 +662,7 @@ class TC_GAME_API 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*/) { }
|
||||
|
||||
@@ -998,7 +998,7 @@ class TC_GAME_API 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