From 63e596431bbb09beccb773ca96abf9b9abd5789e Mon Sep 17 00:00:00 2001 From: Yunfan Li Date: Sun, 25 Aug 2024 11:19:36 +0800 Subject: [PATCH] Kill broadcast --- src/strategy/actions/XpGainAction.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/strategy/actions/XpGainAction.cpp b/src/strategy/actions/XpGainAction.cpp index 53fc38e7..c271def4 100644 --- a/src/strategy/actions/XpGainAction.cpp +++ b/src/strategy/actions/XpGainAction.cpp @@ -15,8 +15,6 @@ bool XpGainAction::Execute(Event event) { context->GetValue("death count")->Set(0); - if (!sRandomPlayerbotMgr->IsRandomBot(bot) || sPlayerbotAIConfig->playerbotsXPrate == 1) - return true; WorldPacket p(event.getPacket()); // (8+4+1+4+8) ObjectGuid guid; @@ -42,6 +40,9 @@ bool XpGainAction::Execute(Event event) BroadcastHelper::BroadcastKill(botAI, bot, creature); } + if (!sRandomPlayerbotMgr->IsRandomBot(bot) || sPlayerbotAIConfig->playerbotsXPrate == 1) + return true; + Unit* victim = nullptr; if (guid) victim = botAI->GetUnit(guid);