*Fix the bug that some mount spells show two mounts, one on the other.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-04-21 14:20:00 -05:00
parent 60ca71e64f
commit e643d3994c
2 changed files with 7 additions and 4 deletions
+5
View File
@@ -2768,6 +2768,11 @@ void AuraEffect::HandleAuraMounted(bool apply, bool Real)
if (minfo) if (minfo)
display_id = minfo->modelid; 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); m_target->Mount(display_id);
} }
else else
+2 -4
View File
@@ -9582,12 +9582,10 @@ float Unit::GetPPMProcChance(uint32 WeaponSpeed, float PPM, const SpellEntry * s
void Unit::Mount(uint32 mount) void Unit::Mount(uint32 mount)
{ {
if(!mount)
return;
RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_MOUNT); RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_MOUNT);
SetUInt32Value(UNIT_FIELD_MOUNTDISPLAYID, mount); if(mount)
SetUInt32Value(UNIT_FIELD_MOUNTDISPLAYID, mount);
SetFlag( UNIT_FIELD_FLAGS, UNIT_FLAG_MOUNT ); SetFlag( UNIT_FIELD_FLAGS, UNIT_FLAG_MOUNT );