Skip to content

Commit

Permalink
[12517] Do not remove FLY auras on Evade
Browse files Browse the repository at this point in the history
Also consider npcs which have SPELL_AURA_FLY as being able to fly
  • Loading branch information
Schmoozerd committed May 31, 2013
1 parent 70392e3 commit 84ff67d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/game/Creature.h
Expand Up @@ -500,7 +500,7 @@ class MANGOS_DLL_SPEC Creature : public Unit

bool CanWalk() const { return GetCreatureInfo()->InhabitType & INHABIT_GROUND; }
bool CanSwim() const { return GetCreatureInfo()->InhabitType & INHABIT_WATER; }
bool CanFly() const { return (GetCreatureInfo()->InhabitType & INHABIT_AIR) || (GetByteValue(UNIT_FIELD_BYTES_1, 3) & UNIT_BYTE1_FLAG_UNK_2); }
bool CanFly() const { return (GetCreatureInfo()->InhabitType & INHABIT_AIR) || (GetByteValue(UNIT_FIELD_BYTES_1, 3) & UNIT_BYTE1_FLAG_UNK_2) || HasAuraType(SPELL_AURA_FLY); }

bool IsTrainerOf(Player* player, bool msg) const;
bool CanInteractWithBattleMaster(Player* player, bool msg) const;
Expand Down
4 changes: 2 additions & 2 deletions src/game/Unit.cpp
Expand Up @@ -5003,11 +5003,11 @@ void Unit::RemoveAllAurasOnDeath()
void Unit::RemoveAllAurasOnEvade()
{
// used when evading to remove all auras except some special auras
// Vehicle control auras should not be removed on evade - neither should linked auras
// Vehicle control auras / Fly should not be removed on evade - neither should linked auras
for (SpellAuraHolderMap::iterator iter = m_spellAuraHolders.begin(); iter != m_spellAuraHolders.end();)
{
SpellEntry const* proto = iter->second->GetSpellProto();
if (!IsSpellHaveAura(proto, SPELL_AURA_CONTROL_VEHICLE))
if (!IsSpellHaveAura(proto, SPELL_AURA_CONTROL_VEHICLE) && !IsSpellHaveAura(proto, SPELL_AURA_FLY))
{
RemoveSpellAuraHolder(iter->second, AURA_REMOVE_BY_DEFAULT);
iter = m_spellAuraHolders.begin();
Expand Down
2 changes: 1 addition & 1 deletion src/shared/revision_nr.h
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "12516"
#define REVISION_NR "12517"
#endif // __REVISION_NR_H__

0 comments on commit 84ff67d

Please sign in to comment.