Kill broadcast

This commit is contained in:
Yunfan Li
2024-08-25 11:19:36 +08:00
parent af228565fd
commit 63e596431b

View File

@@ -15,8 +15,6 @@ bool XpGainAction::Execute(Event event)
{ {
context->GetValue<uint32>("death count")->Set(0); context->GetValue<uint32>("death count")->Set(0);
if (!sRandomPlayerbotMgr->IsRandomBot(bot) || sPlayerbotAIConfig->playerbotsXPrate == 1)
return true;
WorldPacket p(event.getPacket()); // (8+4+1+4+8) WorldPacket p(event.getPacket()); // (8+4+1+4+8)
ObjectGuid guid; ObjectGuid guid;
@@ -42,6 +40,9 @@ bool XpGainAction::Execute(Event event)
BroadcastHelper::BroadcastKill(botAI, bot, creature); BroadcastHelper::BroadcastKill(botAI, bot, creature);
} }
if (!sRandomPlayerbotMgr->IsRandomBot(bot) || sPlayerbotAIConfig->playerbotsXPrate == 1)
return true;
Unit* victim = nullptr; Unit* victim = nullptr;
if (guid) if (guid)
victim = botAI->GetUnit(guid); victim = botAI->GetUnit(guid);