diff options
author | megamage <none@none> | 2009-03-23 15:26:13 -0600 |
---|---|---|
committer | megamage <none@none> | 2009-03-23 15:26:13 -0600 |
commit | ba957ed9f476a39f5bbea621814bbe191493428c (patch) | |
tree | ed4eca5202986ac53997c10c783fb7f649611645 /src/game/SpellAuras.cpp | |
parent | 41a73f284beb26819f75da5c10f174fb24c57bc4 (diff) |
*Allow knockback creatures.
--HG--
branch : trunk
Diffstat (limited to 'src/game/SpellAuras.cpp')
-rw-r--r-- | src/game/SpellAuras.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 60f505c3a2e..1e6c10a3b8a 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -5305,12 +5305,20 @@ void Aura::HandleAuraAllowFlight(bool apply, bool Real) if(apply) { data.Initialize(SMSG_MOVE_SET_CAN_FLY, 12); - m_target->SetByteFlag(UNIT_FIELD_BYTES_1, 3, 0x02); + if(m_target->GetTypeId() == TYPEID_UNIT) + { + m_target->SetByteFlag(UNIT_FIELD_BYTES_1, 3, 0x02); + m_target->AddUnitMovementFlag(MOVEMENTFLAG_FLYING2); + } } else { data.Initialize(SMSG_MOVE_UNSET_CAN_FLY, 12); - m_target->RemoveByteFlag(UNIT_FIELD_BYTES_1, 3, 0x02); + if(m_target->GetTypeId() == TYPEID_UNIT) + { + m_target->RemoveByteFlag(UNIT_FIELD_BYTES_1, 3, 0x02); + m_target->RemoveUnitMovementFlag(MOVEMENTFLAG_FLYING2); + } } data.append(m_target->GetPackGUID()); data << uint32(0); // unk |