diff options
author | Machiavelli <machiavelli.trinity@gmail.com> | 2012-03-18 11:35:33 +0100 |
---|---|---|
committer | Machiavelli <machiavelli.trinity@gmail.com> | 2012-03-18 11:35:33 +0100 |
commit | 48799f33768c70f77f15398376318373f705db65 (patch) | |
tree | a55aed963e68816a97922deec27b1ea946c8d4ed | |
parent | 9fc7fe6b2828930dfe78d57b6c0c8a065fe18f78 (diff) |
Core/Units: Fix movementflag apply for flying/hovering creatures on respawn
-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)); |