From b10aa126c78522c2913d4853186eda8169b8868e Mon Sep 17 00:00:00 2001 From: Nay Date: Tue, 26 Feb 2013 02:34:45 +0000 Subject: [PATCH] Core/BossAI: Fix a typo in CheckBoundary Method was using "me" (the boss) instead of the function's argument Props to @Horn for finding the 4 year's old error Ref #7194 --- .../game/AI/ScriptedAI/ScriptedCreature.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp b/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp index 5ef9ee09f1..e36916deca 100644 --- a/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp +++ b/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp @@ -515,35 +515,35 @@ bool BossAI::CheckBoundary(Unit* who) switch (itr->first) { case BOUNDARY_N: - if (me->GetPositionX() > itr->second) + if (who->GetPositionX() > itr->second) return false; break; case BOUNDARY_S: - if (me->GetPositionX() < itr->second) + if (who->GetPositionX() < itr->second) return false; break; case BOUNDARY_E: - if (me->GetPositionY() < itr->second) + if (who->GetPositionY() < itr->second) return false; break; case BOUNDARY_W: - if (me->GetPositionY() > itr->second) + if (who->GetPositionY() > itr->second) return false; break; case BOUNDARY_NW: - if (me->GetPositionX() + me->GetPositionY() > itr->second) + if (who->GetPositionX() + who->GetPositionY() > itr->second) return false; break; case BOUNDARY_SE: - if (me->GetPositionX() + me->GetPositionY() < itr->second) + if (who->GetPositionX() + who->GetPositionY() < itr->second) return false; break; case BOUNDARY_NE: - if (me->GetPositionX() - me->GetPositionY() > itr->second) + if (who->GetPositionX() - who->GetPositionY() > itr->second) return false; break; case BOUNDARY_SW: - if (me->GetPositionX() - me->GetPositionY() < itr->second) + if (who->GetPositionX() - who->GetPositionY() < itr->second) return false; break; default: