Core/Movement: Use SetWalk(true/false) instead of AddUnit/RemoveUnit.

This commit is contained in:
Venugh committed 2012-02-23 11:50:58 +01:00
1 parent 9219625243
commit 1cac01b3df
50 files changed
+131 -122

No files matched your search

+3 -3
View File
@@ -45,7 +45,7 @@ SmartAI::SmartAI(Creature* c) : CreatureAI(c)
mCanRepeatPath = false;
// spawn in run mode
me->RemoveUnitMovementFlag(MOVEMENTFLAG_WALKING);
me->SetWalk(false);
mRun = false;
me->GetPosition(&mLastOOCPos);
@@ -720,9 +720,9 @@ uint64 SmartAI::GetGUID(int32 /*id*/)
void SmartAI::SetRun(bool run)
{
if (run)
me->RemoveUnitMovementFlag(MOVEMENTFLAG_WALKING);
me->SetWalk(false);
else
me->AddUnitMovementFlag(MOVEMENTFLAG_WALKING);
me->SetWalk(true);
mRun = run;
}