The core should add the movementflags depending on the InhabitType.

--HG--
branch : trunk
This commit is contained in:
_manuel_
2010-01-02 13:15:29 -03:00
parent c492488d58
commit 57206499fb
+10
View File
@@ -758,6 +758,16 @@ bool Creature::Create(uint32 guidlow, Map *map, uint32 phaseMask, uint32 Entry,
SetNativeDisplayId(display_id); SetNativeDisplayId(display_id);
SetByteValue(UNIT_FIELD_BYTES_0, 2, minfo->gender); SetByteValue(UNIT_FIELD_BYTES_0, 2, minfo->gender);
} }
switch(GetCreatureInfo()->InhabitType)
{
case INHABIT_AIR:
AddUnitMovementFlag(MOVEMENTFLAG_FLY_MODE | MOVEMENTFLAG_FLYING);
break;
case INHABIT_WATER:
AddUnitMovementFlag(MOVEMENTFLAG_SWIMMING);
break;
}
} }
return bResult; return bResult;
} }