*Fix the bug that inhabit_air does not make mob fly
--HG-- branch : trunk
This commit is contained in:
@@ -420,6 +420,9 @@ bool Creature::UpdateEntry(uint32 Entry, uint32 team, const CreatureData *data )
|
|||||||
ApplySpellImmune(0, IMMUNITY_EFFECT,SPELL_EFFECT_ATTACK_ME, true);
|
ApplySpellImmune(0, IMMUNITY_EFFECT,SPELL_EFFECT_ATTACK_ME, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(GetCreatureInfo()->InhabitType & INHABIT_AIR)
|
||||||
|
AddUnitMovementFlag(MOVEMENTFLAG_FLY_MODE + MOVEMENTFLAG_FLYING);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2251,9 +2254,6 @@ bool Creature::LoadCreaturesAddon(bool reload)
|
|||||||
if (cainfo->move_flags != 0)
|
if (cainfo->move_flags != 0)
|
||||||
SetUnitMovementFlags(cainfo->move_flags);
|
SetUnitMovementFlags(cainfo->move_flags);
|
||||||
|
|
||||||
if(GetCreatureInfo()->InhabitType & INHABIT_AIR)
|
|
||||||
AddUnitMovementFlag(MOVEMENTFLAG_FLY_MODE + MOVEMENTFLAG_FLYING);
|
|
||||||
|
|
||||||
if(cainfo->auras)
|
if(cainfo->auras)
|
||||||
{
|
{
|
||||||
for (CreatureDataAddonAura const* cAura = cainfo->auras; cAura->spell_id; ++cAura)
|
for (CreatureDataAddonAura const* cAura = cainfo->auras; cAura->spell_id; ++cAura)
|
||||||
|
|||||||
Reference in New Issue
Block a user