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:
@@ -805,6 +805,15 @@ uint32 BotBGAI::CountFriendlyAttackers(Unit* pTarget)
|
|||||||
|
|
||||||
Unit* BotBGAI::SearchEnemy(float range)
|
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;
|
NearPlayerList playersNearby;
|
||||||
QueryNearPlayerList(range, playersNearby);
|
QueryNearPlayerList(range, playersNearby);
|
||||||
NearPlayerVec enemyPlayers, invinciblePlayers;
|
NearPlayerVec enemyPlayers, invinciblePlayers;
|
||||||
@@ -1554,20 +1563,16 @@ void BotBGAI::UpdateBotAI(uint32 diff)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
m_CheckStoped.UpdatePosition(diff);
|
m_CheckStoped.UpdatePosition(diff);
|
||||||
TC_LOG_INFO("server.loading", "PBOT 1 %s %d %d", me->GetName().c_str(), m_AIBGStateType, me->GetBattleground()->GetStatus());
|
|
||||||
ClearMechanicAura();
|
ClearMechanicAura();
|
||||||
if (!IsNotMovement())
|
if (!IsNotMovement())
|
||||||
ProcessHorror(diff);
|
ProcessHorror(diff);
|
||||||
|
|
||||||
if (NeedWaitSpecialSpell(BOTAI_UPDATE_TICK))
|
if (NeedWaitSpecialSpell(BOTAI_UPDATE_TICK))
|
||||||
return;
|
return;
|
||||||
TC_LOG_INFO("server.loading", "PBOT 2");
|
|
||||||
if (m_FastAid.TryDoingFastAidForMe())
|
if (m_FastAid.TryDoingFastAidForMe())
|
||||||
return;
|
return;
|
||||||
TC_LOG_INFO("server.loading", "PBOT 3");
|
|
||||||
if (!me->IsInCombat() && ProcessNormalSpell())
|
if (!me->IsInCombat() && ProcessNormalSpell())
|
||||||
return;
|
return;
|
||||||
TC_LOG_INFO("server.loading", "PBOT 4");
|
|
||||||
Battleground* pBattleground = me->GetBattleground();
|
Battleground* pBattleground = me->GetBattleground();
|
||||||
BattlegroundStatus bgStatus = pBattleground->GetStatus();
|
BattlegroundStatus bgStatus = pBattleground->GetStatus();
|
||||||
if (m_AIBGStateType == BotAIBGState::AIBGState_Ready && bgStatus == BattlegroundStatus::STATUS_WAIT_JOIN)
|
if (m_AIBGStateType == BotAIBGState::AIBGState_Ready && bgStatus == BattlegroundStatus::STATUS_WAIT_JOIN)
|
||||||
|
|||||||
Reference in New Issue
Block a user