Skip to content

Commit

Permalink
NPCBots: Improve target selection & DPS interruption during Sindarago…
Browse files Browse the repository at this point in the history
…sa's Ice Tomb in phase 2 & 1 respectively
  • Loading branch information
trickerer committed Oct 25, 2024
1 parent 03def08 commit 3f5bfd7
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/server/game/AI/NpcBots/bot_ai.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4071,11 +4071,16 @@ std::tuple<Unit*, Unit*> bot_ai::_getTargets(bool byspell, bool ranged, bool &re
if (icetomb)
{
bool air_phase = sindragosa && sindragosa->GetReactState() == REACT_PASSIVE;
bool above35 = GetHealthPCT(icetomb) > 35;
if (!air_phase || above35)
return { icetomb, nullptr };
uint8 pct = GetHealthPCT(icetomb);
if (!air_phase || pct > 50)
{
if (air_phase || !IsTank())
return { icetomb, nullptr };
}
else if (mytar == icetomb || !master->GetVictim())
{
if (IsCasting())
me->InterruptNonMeleeSpells(false);
if (botPet && botPet->GetVictim())
botPet->AttackStop();
return { nullptr, nullptr };
Expand Down

0 comments on commit 3f5bfd7

Please sign in to comment.