From cf743a186a41ce37947e9ef0f4b4dd838c4c0144 Mon Sep 17 00:00:00 2001 From: Crow Date: Sun, 23 Nov 2025 03:06:19 -0600 Subject: [PATCH 1/3] Fix Wrong Misdirection Spell ID for Gruul's Lair and Magtheridon Strategies (#1867) Lol oops. Confirmed with logs/in-game that the prior one was wrong (and thus always returning false) and current one is correct. --- src/strategy/raids/gruulslair/RaidGruulsLairHelpers.h | 2 +- src/strategy/raids/magtheridon/RaidMagtheridonHelpers.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/strategy/raids/gruulslair/RaidGruulsLairHelpers.h b/src/strategy/raids/gruulslair/RaidGruulsLairHelpers.h index 8cd01c2e6b..c7becc8362 100644 --- a/src/strategy/raids/gruulslair/RaidGruulsLairHelpers.h +++ b/src/strategy/raids/gruulslair/RaidGruulsLairHelpers.h @@ -15,7 +15,7 @@ namespace GruulsLairHelpers SPELL_SPELL_SHIELD = 33054, // Hunter - SPELL_MISDIRECTION = 34477, + SPELL_MISDIRECTION = 35079, // Warlock SPELL_BANISH = 18647, // Rank 2 diff --git a/src/strategy/raids/magtheridon/RaidMagtheridonHelpers.h b/src/strategy/raids/magtheridon/RaidMagtheridonHelpers.h index 21fd9d459c..80c3a47e09 100644 --- a/src/strategy/raids/magtheridon/RaidMagtheridonHelpers.h +++ b/src/strategy/raids/magtheridon/RaidMagtheridonHelpers.h @@ -24,7 +24,7 @@ namespace MagtheridonHelpers SPELL_FEAR = 6215, // Hunter - SPELL_MISDIRECTION = 34477, + SPELL_MISDIRECTION = 35079, }; enum MagtheridonNPCs From 2424f73bc487a7520a16ffb2dd67316209174485 Mon Sep 17 00:00:00 2001 From: Keleborn <22352763+Celandriel@users.noreply.github.com> Date: Sun, 23 Nov 2025 11:45:31 -0800 Subject: [PATCH 2/3] Core Merge PR - Replace OnPlayerChat with OnPlayerCanUseChat (#1838) First stab at getting this working. Im not sure if Im missing something, but it seemed to be a pretty simple change overall. Based on testing the bots do respond to commands via whisper and group. Edit: Relevant PR this addresses. https://github.com/azerothcore/azerothcore-wotlk/commit/50f8f145d224037be9a29c4390c5088816639868#diff-baadebd8cd1117ca48225f316a5ab3fd5fd55b20963394d302341147183db067 --- src/Playerbots.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Playerbots.cpp b/src/Playerbots.cpp index 136d4e6166..ecaaa5839a 100644 --- a/src/Playerbots.cpp +++ b/src/Playerbots.cpp @@ -82,12 +82,12 @@ class PlayerbotsPlayerScript : public PlayerScript PlayerbotsPlayerScript() : PlayerScript("PlayerbotsPlayerScript", { PLAYERHOOK_ON_LOGIN, PLAYERHOOK_ON_AFTER_UPDATE, - PLAYERHOOK_ON_CHAT, - PLAYERHOOK_ON_CHAT_WITH_CHANNEL, - PLAYERHOOK_ON_CHAT_WITH_GROUP, PLAYERHOOK_ON_BEFORE_CRITERIA_PROGRESS, PLAYERHOOK_ON_BEFORE_ACHI_COMPLETE, PLAYERHOOK_CAN_PLAYER_USE_PRIVATE_CHAT, + PLAYERHOOK_CAN_PLAYER_USE_GROUP_CHAT, + PLAYERHOOK_CAN_PLAYER_USE_GUILD_CHAT, + PLAYERHOOK_CAN_PLAYER_USE_CHANNEL_CHAT, PLAYERHOOK_ON_GIVE_EXP, PLAYERHOOK_ON_BEFORE_TELEPORT }) {} @@ -163,15 +163,12 @@ class PlayerbotsPlayerScript : public PlayerScript if (PlayerbotAI* botAI = GET_PLAYERBOT_AI(receiver)) { botAI->HandleCommand(type, msg, player); - - return false; } } - return true; } - void OnPlayerChat(Player* player, uint32 type, uint32 /*lang*/, std::string& msg, Group* group) override + bool OnPlayerCanUseChat(Player* player, uint32 type, uint32 /*lang*/, std::string& msg, Group* group) override { for (GroupReference* itr = group->GetFirstMember(); itr != nullptr; itr = itr->next()) { @@ -183,9 +180,10 @@ class PlayerbotsPlayerScript : public PlayerScript } } } + return true; } - void OnPlayerChat(Player* player, uint32 type, uint32 /*lang*/, std::string& msg) override + bool OnPlayerCanUseChat(Player* player, uint32 type, uint32 /*lang*/, std::string& msg, Guild* guild) override { if (type == CHAT_MSG_GUILD) { @@ -204,9 +202,10 @@ class PlayerbotsPlayerScript : public PlayerScript } } } + return true; } - void OnPlayerChat(Player* player, uint32 type, uint32 /*lang*/, std::string& msg, Channel* channel) override + bool OnPlayerCanUseChat(Player* player, uint32 type, uint32 /*lang*/, std::string& msg, Channel* channel) override { if (PlayerbotMgr* playerbotMgr = GET_PLAYERBOT_MGR(player)) { @@ -217,6 +216,7 @@ class PlayerbotsPlayerScript : public PlayerScript } sRandomPlayerbotMgr->HandleCommand(type, msg, player); + return true; } bool OnPlayerBeforeAchievementComplete(Player* player, AchievementEntry const* achievement) override From d5dbc4ddd70c021175451f55befbcb1411361b38 Mon Sep 17 00:00:00 2001 From: Keleborn <22352763+Celandriel@users.noreply.github.com> Date: Mon, 24 Nov 2025 12:49:55 -0800 Subject: [PATCH 3/3] Hotfix: prevent server crash when whisper 'logout' (#1874) Temp Hotfix to resolve #1870. --- src/Playerbots.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Playerbots.cpp b/src/Playerbots.cpp index ecaaa5839a..ed4e482636 100644 --- a/src/Playerbots.cpp +++ b/src/Playerbots.cpp @@ -163,6 +163,12 @@ class PlayerbotsPlayerScript : public PlayerScript if (PlayerbotAI* botAI = GET_PLAYERBOT_AI(receiver)) { botAI->HandleCommand(type, msg, player); + + // hotfix; otherwise the server will crash when whispering logout + // https://github.com/mod-playerbots/mod-playerbots/pull/1838 + // TODO: find the root cause and solve it. (does not happen in party chat) + if (msg == "logout") + return false; } } return true;