diff options
| author | jackpoz <giacomopoz@gmail.com> | 2014-04-25 21:19:30 +0200 |
|---|---|---|
| committer | jackpoz <giacomopoz@gmail.com> | 2014-04-25 21:19:30 +0200 |
| commit | 2585e799f95f259dd4b422daf15ef7963173c408 (patch) | |
| tree | 96335cb3da64afc64af4ad3c3e994f441059832d /src/server/game/AI/SmartScripts | |
| parent | dc8a7a6fa5a3afb8f95958db2bdc0888361e56f8 (diff) | |
Core/Misc: Change how Position struct is retrieved
Update Position::GetPosition() and similar methods signatures to reflect 2a4c9bcaf910430cdf3070987ce085da3c2666da changes by return a Position object instead of accepting a Position parameter by reference.
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(); |
