BG BotFill : les bots acceptent l invitation au BG (schedule EnterBG jamais pousse)

BGSType_EnterBG n avait aucun site d emission : les bots restaient invites
jusqu a expiration et le joueur entrait seul dans le BG. InviteGroupToBG
pousse desormais le schedule aux sessions bots, et ProcessEnterBG utilise
le slot de file reel comme Ticket.Id (attendu par HandleBattleFieldPort).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
SylvaniaCore deploy
2026-08-11 23:46:22 +02:00
parent f7c82f0089
commit 366768cc95
2 changed files with 13 additions and 2 deletions
@@ -496,6 +496,16 @@ bool BattlegroundQueue::InviteGroupToBG(GroupQueueInfo* ginfo, Battleground* bg,
WorldPackets::Battleground::BattlefieldStatusNeedConfirmation battlefieldStatus;
sBattlegroundMgr->BuildBattlegroundStatusNeedConfirmation(&battlefieldStatus, bg, player, queueSlot, player->GetBattlegroundQueueJoinTime(bgQueueTypeId), INVITE_ACCEPT_WAIT_TIME, ginfo->ArenaType);
player->SendDirectMessage(battlefieldStatus.Write());
// SylvaniaCore (module BG BotFill): un vrai client repond a l invitation par
// CMSG_BATTLEFIELD_PORT ; pour un bot, personne ne poussait le schedule
// d acceptation -> les bots restaient invites jusqu a expiration.
if (PlayerBotSession* botSession = dynamic_cast<PlayerBotSession*>(player->GetSession()))
{
BotGlobleSchedule enterSchedule(BotGlobleScheduleType::BGSType_EnterBG, player->GetGUID());
enterSchedule.parameter1 = queueSlot;
botSession->PushScheduleToQueue(enterSchedule);
}
}
return true;
}
+3 -2
View File
@@ -509,8 +509,9 @@ bool PlayerBotSession::ProcessEnterBG(BotGlobleSchedule& schedule)
WorldPacket cmd(CMSG_BATTLEFIELD_PORT);
WorldPackets::Battleground::BattlefieldPort packet(std::move(cmd));
packet.Ticket.Id = schedule.parameter1;
packet.Ticket.RequesterGuid = schedule.playerGUID;
// SylvaniaCore (module BG BotFill): le handler attend le slot de file
packet.Ticket.Id = i;
packet.Ticket.RequesterGuid = player->GetGUID();
packet.Ticket.Type = WorldPackets::LFG::RideType::Battlegrounds;
packet.Ticket.Time = time(0);
packet.AcceptedInvite = true;