diff options
-rwxr-xr-x | src/server/game/Entities/Creature/Creature.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp index ca893a7c482..47225c65396 100755 --- a/src/server/game/Entities/Creature/Creature.cpp +++ b/src/server/game/Entities/Creature/Creature.cpp @@ -1540,9 +1540,11 @@ void Creature::setDeathState(DeathState s) ResetPlayerDamageReq(); CreatureTemplate const* cinfo = GetCreatureTemplate(); SetWalk(true); - if (GetCreatureTemplate()->InhabitType & INHABIT_AIR) + if (cinfo->InhabitType & INHABIT_AIR && cinfo->InhabitType & INHABIT_GROUND) + SetCanFly(true); + else if (cinfo->InhabitType & INHABIT_AIR) SetDisableGravity(true); - if (GetCreatureTemplate()->InhabitType & INHABIT_WATER) + if (cinfo->InhabitType & INHABIT_WATER) AddUnitMovementFlag(MOVEMENTFLAG_SWIMMING); SetUInt32Value(UNIT_NPC_FLAGS, cinfo->npcflag); ClearUnitState(uint32(UNIT_STATE_ALL_STATE)); |