mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-13 23:43:44 +00:00
refactor(Core): Clean-up after FD (#8586)
This commit is contained in:
@@ -289,7 +289,7 @@ struct boss_twinemperorsAI : public ScriptedAI
|
||||
if (!who || me->GetVictim())
|
||||
return;
|
||||
|
||||
if (me->_CanDetectFeignDeathOf(who) && me->CanCreatureAttack(who))
|
||||
if (me->CanCreatureAttack(who))
|
||||
{
|
||||
if (me->IsWithinDistInMap(who, PULL_RANGE, true, false) && me->GetDistanceZ(who) <= /*CREATURE_Z_ATTACK_RANGE*/7 /*there are stairs*/)
|
||||
{
|
||||
|
||||
@@ -150,7 +150,7 @@ public:
|
||||
{
|
||||
Map::PlayerList const& playerList = me->GetMap()->GetPlayers();
|
||||
for(Map::PlayerList::const_iterator itr = playerList.begin(); itr != playerList.end(); ++itr)
|
||||
if (me->GetDistance(itr->GetSource()) < 130.0f && itr->GetSource()->IsAlive() && !itr->GetSource()->IsGameMaster() && me->CanCreatureAttack(itr->GetSource()) && me->_CanDetectFeignDeathOf(itr->GetSource()))
|
||||
if (me->GetDistance(itr->GetSource()) < 130.0f && itr->GetSource()->IsAlive() && !itr->GetSource()->IsGameMaster() && me->CanCreatureAttack(itr->GetSource()))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
||||
@@ -474,7 +474,7 @@ public:
|
||||
Map::PlayerList const& pl = me->GetMap()->GetPlayers();
|
||||
for (Map::PlayerList::const_iterator itr = pl.begin(); itr != pl.end(); ++itr)
|
||||
if (Player* p = itr->GetSource())
|
||||
if (p != me->GetVictim() && summon->GetExactDist(p) < minrange && me->CanCreatureAttack(p) && me->_CanDetectFeignDeathOf(p))
|
||||
if (p != me->GetVictim() && summon->GetExactDist(p) < minrange && me->CanCreatureAttack(p))
|
||||
{
|
||||
target = p;
|
||||
minrange = summon->GetExactDist(p);
|
||||
|
||||
@@ -61,7 +61,7 @@ struct npc_pet_shaman_earth_elemental : public ScriptedAI
|
||||
if (!me->IsInCombat())
|
||||
if (Player* owner = me->GetCharmerOrOwnerPlayerOrPlayerItself())
|
||||
if (Unit* target = owner->GetSelectedUnit())
|
||||
if (me->_CanDetectFeignDeathOf(target) && me->CanCreatureAttack(target))
|
||||
if (me->CanCreatureAttack(target))
|
||||
AttackStart(target);
|
||||
_initAttack = false;
|
||||
}
|
||||
@@ -109,7 +109,7 @@ struct npc_pet_shaman_fire_elemental : public ScriptedAI
|
||||
if (!me->IsInCombat())
|
||||
if (Player* owner = me->GetCharmerOrOwnerPlayerOrPlayerItself())
|
||||
if (Unit* target = owner->GetSelectedUnit())
|
||||
if (me->_CanDetectFeignDeathOf(target) && me->CanCreatureAttack(target))
|
||||
if (me->CanCreatureAttack(target))
|
||||
AttackStart(target);
|
||||
_initAttack = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user