diff options
author | megamage <none@none> | 2009-04-21 14:20:00 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-04-21 14:20:00 -0500 |
commit | e643d3994ce3b410fcee293885c66b6577871a9e (patch) | |
tree | ccf22c07ff65a9be1377f590e479a9b8c098bbf9 /src | |
parent | 60ca71e64f8d2c88f3bc3e4eaa25f8a5282630b7 (diff) |
*Fix the bug that some mount spells show two mounts, one on the other.
--HG--
branch : trunk
Diffstat (limited to 'src')
-rw-r--r-- | src/game/SpellAuras.cpp | 5 | ||||
-rw-r--r-- | src/game/Unit.cpp | 6 |
2 files changed, 7 insertions, 4 deletions
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 5a1648b82f7..c8b78b759c2 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -2768,6 +2768,11 @@ void AuraEffect::HandleAuraMounted(bool apply, bool Real) if (minfo) display_id = minfo->modelid; + //some spell has one aura of mount and one of vehicle + for(uint32 i = 0; i < MAX_SPELL_EFFECTS; ++i) + if(GetSpellProto()->Effect[i] == SPELL_EFFECT_SUMMON + && GetSpellProto()->EffectMiscValue[i] == GetMiscValue()) + display_id = 0; m_target->Mount(display_id); } else diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 4288ce1e58f..475a3dc5db7 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -9582,12 +9582,10 @@ float Unit::GetPPMProcChance(uint32 WeaponSpeed, float PPM, const SpellEntry * s void Unit::Mount(uint32 mount) { - if(!mount) - return; - RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_MOUNT); - SetUInt32Value(UNIT_FIELD_MOUNTDISPLAYID, mount); + if(mount) + SetUInt32Value(UNIT_FIELD_MOUNTDISPLAYID, mount); SetFlag( UNIT_FIELD_FLAGS, UNIT_FLAG_MOUNT ); |