diff options
Diffstat (limited to 'src/server/game/AI/SmartScripts')
| -rw-r--r-- | src/server/game/AI/SmartScripts/SmartAI.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/server/game/AI/SmartScripts/SmartAI.cpp b/src/server/game/AI/SmartScripts/SmartAI.cpp index 3b055cabbfa..521f39171af 100644 --- a/src/server/game/AI/SmartScripts/SmartAI.cpp +++ b/src/server/game/AI/SmartScripts/SmartAI.cpp @@ -47,7 +47,7 @@ SmartAI::SmartAI(Creature* c) : CreatureAI(c) me->SetWalk(false); mRun = false; - me->GetPosition(&mLastOOCPos); + mLastOOCPos = me->GetPosition(); mCanAutoAttack = true; mCanCombatMove = true; @@ -132,7 +132,7 @@ void SmartAI::StartPath(bool run, uint32 path, bool repeat, Unit* /*invoker*/) if (WayPoint* wp = GetNextWayPoint()) { - me->GetPosition(&mLastOOCPos); + mLastOOCPos = me->GetPosition(); me->GetMotionMaster()->MovePoint(wp->id, wp->x, wp->y, wp->z); GetScript()->ProcessEventsFor(SMART_EVENT_WAYPOINT_START, NULL, wp->id, GetScript()->GetPathId()); } @@ -162,7 +162,7 @@ void SmartAI::PausePath(uint32 delay, bool forced) return; } mForcedPaused = forced; - me->GetPosition(&mLastOOCPos); + mLastOOCPos = me->GetPosition(); AddEscortState(SMART_ESCORT_PAUSED); mWPPauseTimer = delay; if (forced) @@ -184,7 +184,7 @@ void SmartAI::StopPath(uint32 DespawnTime, uint32 quest, bool fail) SetDespawnTime(DespawnTime); //mDespawnTime = DespawnTime; - me->GetPosition(&mLastOOCPos); + mLastOOCPos = me->GetPosition(); me->StopMoving();//force stop me->GetMotionMaster()->MoveIdle(); GetScript()->ProcessEventsFor(SMART_EVENT_WAYPOINT_STOPPED, NULL, mLastWP->id, GetScript()->GetPathId()); @@ -572,7 +572,7 @@ void SmartAI::EnterCombat(Unit* enemy) { me->InterruptNonMeleeSpells(false); // must be before ProcessEvents GetScript()->ProcessEventsFor(SMART_EVENT_AGGRO, enemy); - me->GetPosition(&mLastOOCPos); + mLastOOCPos = me->GetPosition(); SetRun(mRun); if (me->GetMotionMaster()->GetMotionSlotType(MOTION_SLOT_ACTIVE) == POINT_MOTION_TYPE) me->GetMotionMaster()->MovementExpired(); |
