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);