Scripts/Misc: Some code optimisations

This commit is contained in:
Vincent_Michael
2013-02-03 00:38:34 +01:00
parent 2c2fe7d464
commit 847cafc121
24 changed files with 96 additions and 119 deletions

View File

@@ -1898,7 +1898,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
break;
for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
if (IsCreature(*itr))
if (Creature* creature = (*itr)->ToCreature())
{
(*itr)->ToCreature()->GetMotionMaster()->Clear();
(*itr)->ToCreature()->GetMotionMaster()->MoveJump(e.target.x, e.target.y, e.target.z, (float)e.action.jump.speedxy, (float)e.action.jump.speedz);