aboutsummaryrefslogtreecommitdiff
path: root/src/game/Creature.cpp
diff options
context:
space:
mode:
author_manuel_ <none@none>2010-01-02 13:15:29 -0300
committer_manuel_ <none@none>2010-01-02 13:15:29 -0300
commit57206499fb5026c923294bf6801915c12512ca1a (patch)
tree0884fb97f423ad5958593164c8c72ac637dcf57a /src/game/Creature.cpp
parentc492488d580dcc37482ca3148378f881e807226f (diff)
The core should add the movementflags depending on the InhabitType.
--HG-- branch : trunk
Diffstat (limited to 'src/game/Creature.cpp')
-rw-r--r--src/game/Creature.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/game/Creature.cpp b/src/game/Creature.cpp
index 05f2c7e1ec6..22a5d82c1b0 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;
}