fix: channel id in PLAYER_EVENT_ON_CHANNEL_CHAT (#101)

This commit is contained in:
Axel Cocat
2023-03-01 10:51:29 +01:00
committed by GitHub
parent 2d915de6bc
commit f126d4d828
3 changed files with 3 additions and 3 deletions

View File

@@ -692,7 +692,7 @@ namespace LuaGlobalFunctions
* PLAYER_EVENT_ON_WHISPER = 19, // (event, player, msg, Type, lang, receiver) - Can return false, newMessage
* PLAYER_EVENT_ON_GROUP_CHAT = 20, // (event, player, msg, Type, lang, group) - Can return false, newMessage
* PLAYER_EVENT_ON_GUILD_CHAT = 21, // (event, player, msg, Type, lang, guild) - Can return false, newMessage
* PLAYER_EVENT_ON_CHANNEL_CHAT = 22, // (event, player, msg, Type, lang, channel) - Can return false, newMessage
* PLAYER_EVENT_ON_CHANNEL_CHAT = 22, // (event, player, msg, Type, lang, channel) - channel is negative for custom channels. Can return false, newMessage
* PLAYER_EVENT_ON_EMOTE = 23, // (event, player, emote) - Not triggered on any known emote
* PLAYER_EVENT_ON_TEXT_EMOTE = 24, // (event, player, textEmote, emoteNum, guid)
* PLAYER_EVENT_ON_SAVE = 25, // (event, player)

View File

@@ -181,7 +181,7 @@ namespace Hooks
PLAYER_EVENT_ON_WHISPER = 19, // (event, player, msg, Type, lang, receiver) - Can return false, newMessage
PLAYER_EVENT_ON_GROUP_CHAT = 20, // (event, player, msg, Type, lang, group) - Can return false, newMessage
PLAYER_EVENT_ON_GUILD_CHAT = 21, // (event, player, msg, Type, lang, guild) - Can return false, newMessage
PLAYER_EVENT_ON_CHANNEL_CHAT = 22, // (event, player, msg, Type, lang, channel) - Can return false, newMessage
PLAYER_EVENT_ON_CHANNEL_CHAT = 22, // (event, player, msg, Type, lang, channel) - channel is negative for custom channels. Can return false, newMessage
PLAYER_EVENT_ON_EMOTE = 23, // (event, player, emote) - Not triggered on any known emote
PLAYER_EVENT_ON_TEXT_EMOTE = 24, // (event, player, textEmote, emoteNum, guid)
PLAYER_EVENT_ON_SAVE = 25, // (event, player)

View File

@@ -509,7 +509,7 @@ bool Eluna::OnChat(Player* pPlayer, uint32 type, uint32 lang, std::string& msg,
Push(msg);
Push(type);
Push(lang);
Push(pChannel->GetChannelId());
Push(pChannel->IsConstant() ? static_cast<int32>(pChannel->GetChannelId()) : -static_cast<int32>(pChannel->GetChannelDBId()));
int n = SetupStack(PlayerEventBindings, key, 5);
while (n > 0)