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

This commit is contained in:
Venugh
2012-02-23 11:50:58 +01:00
parent 9219625243
commit 1cac01b3df
50 changed files with 131 additions and 122 deletions
@@ -480,7 +480,7 @@ public:
if (temp->isAlive() && !temp->getVictim())
{
if (temp->HasUnitMovementFlag(MOVEMENTFLAG_WALKING))
temp->RemoveUnitMovementFlag(MOVEMENTFLAG_WALKING);
temp->SetWalk(false);
if (temp->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
temp->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
@@ -71,7 +71,7 @@ class npc_xerestrasza : public CreatureScript
_isIntro = false;
Talk(SAY_XERESTRASZA_EVENT);
me->AddUnitMovementFlag(MOVEMENTFLAG_WALKING);
me->SetWalk(true);
me->GetMotionMaster()->MovePoint(0, xerestraszaMovePos);
_events.ScheduleEvent(EVENT_XERESTRASZA_EVENT_1, 16000);