mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 10:05:32 +01:00
Core/CreatureAI: CheckBoundary -> IsInBoundary, better reflects what it does. Also moved to public so spellscript can use it.
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user