From 57206499fb5026c923294bf6801915c12512ca1a Mon Sep 17 00:00:00 2001 From: _manuel_ Date: Sat, 2 Jan 2010 13:15:29 -0300 Subject: [PATCH] The core should add the movementflags depending on the InhabitType. --HG-- branch : trunk --- src/game/Creature.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/game/Creature.cpp b/src/game/Creature.cpp index 05f2c7e1ec..22a5d82c1b 100644 --- a/src/game/Creature.cpp +++ b/src/game/Creature.cpp @@ -758,6 +758,16 @@ bool Creature::Create(uint32 guidlow, Map *map, uint32 phaseMask, uint32 Entry, SetNativeDisplayId(display_id); 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; }