Skip to content

Commit

Permalink
potential fix for liyunfan1223#94 (not 100% sure as can't reproduce)
Browse files Browse the repository at this point in the history
  • Loading branch information
fuzzdeveloper committed Aug 15, 2024
1 parent f7d229d commit 780934a
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/strategy/actions/BattleGroundTactics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4089,13 +4089,17 @@ bool BGTactics::atFlag(std::vector<BattleBotPath*> const& vPaths, std::vector<ui
{
for (auto& guid : closePlayers)
{
Unit* pFriend = botAI->GetUnit(guid);
if (pFriend->GetCurrentSpell(CURRENT_GENERIC_SPELL) &&
pFriend->GetCurrentSpell(CURRENT_GENERIC_SPELL)->m_spellInfo->Id == SPELL_CAPTURE_BANNER)
if (Unit* pFriend = botAI->GetUnit(guid))
{
resetObjective();
startNewPathBegin(vPaths);
return false;
if (Spell* spell = pFriend->GetCurrentSpell(CURRENT_GENERIC_SPELL))
{
if (spell->m_spellInfo->Id == SPELL_CAPTURE_BANNER)
{
resetObjective();
startNewPathBegin(vPaths);
return false;
}
}
}
}
}
Expand Down

0 comments on commit 780934a

Please sign in to comment.