Core/CreatureAI: CheckBoundary -> IsInBoundary, better reflects what it does. Also moved to public so spellscript can use it.

This commit is contained in:
Treeston
2018-03-08 18:41:46 +01:00
parent 5df0a020fa
commit df639d85e4
8 changed files with 15 additions and 16 deletions

View File

@@ -767,7 +767,7 @@ class npc_halion_controller : public CreatureScript
Map::PlayerList const& players = me->GetMap()->GetPlayers();
for (Map::PlayerList::const_iterator i = players.begin(); i != players.end(); ++i)
if (Player* player = i->GetSource())
if (player->IsAlive() && CheckBoundary(player) && !player->IsGameMaster())
if (player->IsAlive() && IsInBoundary(player) && !player->IsGameMaster())
return;
EnterEvadeMode(EVADE_REASON_NO_HOSTILES);

View File

@@ -1245,7 +1245,7 @@ class npc_thorim_arena_phase : public CreatureScript
if (_isInArena && HeightPositionCheck(true)(who))
return false;
return CheckBoundary(who);
return IsInBoundary(who);
}
void Reset() override
@@ -1338,7 +1338,7 @@ struct npc_thorim_minibossAI : public ScriptedAI
bool CanAIAttack(Unit const* who) const final override
{
return CheckBoundary(who);
return IsInBoundary(who);
}
void JustSummoned(Creature* summon) final override

View File

@@ -1072,7 +1072,7 @@ class instance_ulduar : public InstanceMapScript
void AddDoor(GameObject* door, bool add) override
{
// Leviathan doors are South except the one it uses to enter the room
// which is North and should not be used for boundary checks in BossAI::CheckBoundary()
// which is North and should not be used for boundary checks in BossAI::IsInBoundary()
if (door->GetEntry() == GO_LEVIATHAN_DOOR && door->GetPositionX() > 400.f)
{
if (add)

View File

@@ -685,7 +685,7 @@ struct boss_illidan_stormrage : public BossAI
Map::PlayerList const& players = me->GetMap()->GetPlayers();
for (Map::PlayerList::const_iterator i = players.begin(); i != players.end(); ++i)
if (Player* player = i->GetSource())
if (player->IsAlive() && !player->IsGameMaster() && CheckBoundary(player))
if (player->IsAlive() && !player->IsGameMaster() && IsInBoundary(player))
return;
EnterEvadeMode(EVADE_REASON_NO_HOSTILES);

View File

@@ -288,7 +288,7 @@ struct boss_shade_of_akama : public BossAI
Map::PlayerList const& players = me->GetMap()->GetPlayers();
for (Map::PlayerList::const_iterator i = players.begin(); i != players.end(); ++i)
if (Player* player = i->GetSource())
if (player->IsAlive() && !player->IsGameMaster() && CheckBoundary(player))
if (player->IsAlive() && !player->IsGameMaster() && IsInBoundary(player))
return;
EnterEvadeMode(EVADE_REASON_NO_HOSTILES);