refactor(Core/PlayerScript): Delete OnPlayerChat, use OnPlayerCanUseChat (#23617)

This commit is contained in:
天鹭 2025-11-12 17:13:26 +08:00 committed by GitHub
parent 9429817e82
commit 50f8f145d2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 23 additions and 118 deletions

View file

@ -55,12 +55,7 @@ enum PlayerHook
PLAYERHOOK_ON_DUEL_REQUEST,
PLAYERHOOK_ON_DUEL_START,
PLAYERHOOK_ON_DUEL_END,
PLAYERHOOK_ON_CHAT,
PLAYERHOOK_ON_BEFORE_SEND_CHAT_MESSAGE,
PLAYERHOOK_ON_CHAT_WITH_RECEIVER,
PLAYERHOOK_ON_CHAT_WITH_GROUP,
PLAYERHOOK_ON_CHAT_WITH_GUILD,
PLAYERHOOK_ON_CHAT_WITH_CHANNEL,
PLAYERHOOK_ON_EMOTE,
PLAYERHOOK_ON_TEXT_EMOTE,
PLAYERHOOK_ON_SPELL_CAST,
@ -303,18 +298,8 @@ public:
virtual void OnPlayerDuelEnd(Player* /*winner*/, Player* /*loser*/, DuelCompleteType /*type*/) { }
// The following methods are called when a player sends a chat message.
virtual void OnPlayerChat(Player* /*player*/, uint32 /*type*/, uint32 /*lang*/, std::string& /*msg*/) { }
virtual void OnPlayerBeforeSendChatMessage(Player* /*player*/, uint32& /*type*/, uint32& /*lang*/, std::string& /*msg*/) { }
virtual void OnPlayerChat(Player* /*player*/, uint32 /*type*/, uint32 /*lang*/, std::string& /*msg*/, Player* /*receiver*/) { }
virtual void OnPlayerChat(Player* /*player*/, uint32 /*type*/, uint32 /*lang*/, std::string& /*msg*/, Group* /*group*/) { }
virtual void OnPlayerChat(Player* /*player*/, uint32 /*type*/, uint32 /*lang*/, std::string& /*msg*/, Guild* /*guild*/) { }
virtual void OnPlayerChat(Player* /*player*/, uint32 /*type*/, uint32 /*lang*/, std::string& /*msg*/, Channel* /*channel*/) { }
// Both of the below are called on emote opcodes.
virtual void OnPlayerEmote(Player* /*player*/, uint32 /*emote*/) { }