[7333] Refactoring DestinationHolder/Traveler/Unit::SendMonsterMoveWithSpeed code.

* Move common code in appropriate functions.
* Correct select speed and 2D/3D distance for creature/player walk/fly
This commit is contained in:
VladimirMangos 2009-02-25 06:58:43 +03:00
parent 3c87af93e6
commit 1349d36270
6 changed files with 57 additions and 39 deletions

View file

@ -1799,7 +1799,7 @@ void World::ScriptsProcess()
sLog.outError("SCRIPT_COMMAND_MOVE_TO call for non-creature (TypeId: %u), skipping.",source->GetTypeId());
break;
}
((Unit *)source)->SendMonsterMoveWithSpeed(step.script->x, step.script->y, step.script->z, ((Unit *)source)->GetUnitMovementFlags(), step.script->datalong2 );
((Unit *)source)->SendMonsterMoveWithSpeed(step.script->x, step.script->y, step.script->z, step.script->datalong2 );
((Unit *)source)->GetMap()->CreatureRelocation(((Creature *)source), step.script->x, step.script->y, step.script->z, 0);
break;
case SCRIPT_COMMAND_FLAG_SET: