BG BotFill : doctrine du porteur de drapeau + fin du spam de log par tick

1. Un porteur de drapeau ne selectionne plus de cible : il court au but
   pendant que son escorte le protege (doctrine PvP). Auparavant il engageait
   le premier ennemi croise et mourait au milieu du terrain avec le drapeau.
2. Retrait de 4 traces PBOT heritees de l upstream, emises a chaque tick de
   chaque bot (80 bots en Alterac) : formatage et ecriture disque inutiles a
   chaque passage, et l une d elles dereferencait GetBattleground() sans
   controle de nullite.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
SylvaniaCore deploy
2026-08-17 11:22:03 +02:00
parent 0bb8fb7d90
commit 49e3c727d6
+9 -4
View File
@@ -805,6 +805,15 @@ uint32 BotBGAI::CountFriendlyAttackers(Unit* pTarget)
Unit* BotBGAI::SearchEnemy(float range)
{
// SylvaniaCore (module BG BotFill): doctrine du porteur de drapeau. Un FC ne s arrete
// jamais pour combattre : il court au but pendant que son escorte le protege. Sans
// cette regle il engageait le premier ennemi croise et mourait au milieu du terrain.
if (me->IsPlayer() && TargetIsFlagCarrier(me->ToPlayer()))
{
me->SetSelection(ObjectGuid::Empty);
return NULL;
}
NearPlayerList playersNearby;
QueryNearPlayerList(range, playersNearby);
NearPlayerVec enemyPlayers, invinciblePlayers;
@@ -1554,20 +1563,16 @@ void BotBGAI::UpdateBotAI(uint32 diff)
return;
}
m_CheckStoped.UpdatePosition(diff);
TC_LOG_INFO("server.loading", "PBOT 1 %s %d %d", me->GetName().c_str(), m_AIBGStateType, me->GetBattleground()->GetStatus());
ClearMechanicAura();
if (!IsNotMovement())
ProcessHorror(diff);
if (NeedWaitSpecialSpell(BOTAI_UPDATE_TICK))
return;
TC_LOG_INFO("server.loading", "PBOT 2");
if (m_FastAid.TryDoingFastAidForMe())
return;
TC_LOG_INFO("server.loading", "PBOT 3");
if (!me->IsInCombat() && ProcessNormalSpell())
return;
TC_LOG_INFO("server.loading", "PBOT 4");
Battleground* pBattleground = me->GetBattleground();
BattlegroundStatus bgStatus = pBattleground->GetStatus();
if (m_AIBGStateType == BotAIBGState::AIBGState_Ready && bgStatus == BattlegroundStatus::STATUS_WAIT_JOIN)