Core/Misc: Change how Position struct is retrieved

Update Position::GetPosition() and similar methods signatures to reflect 2a4c9bcaf9 changes by return a Position object instead of accepting a Position parameter by reference.
This commit is contained in:
jackpoz committed 2014-04-25 21:19:30 +02:00
1 parent dc8a7a6fa5
commit 2585e799f9
51 files changed
+102 -158

No files matched your search

+5 -5
View File
@@ -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();