aboutsummaryrefslogtreecommitdiff
path: root/src/game/Unit.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-03-18 21:39:09 -0600
committermegamage <none@none>2009-03-18 21:39:09 -0600
commit281d20be0d1c342f01798b1254fccb3b5a202bcd (patch)
treef2edf7a2f81a625d72f4beacb4523747ee004aad /src/game/Unit.cpp
parent886b2a51e9f3fdbb8f6353e47701be825f8cf4b3 (diff)
*Allow spells to summon vehicles.
--HG-- branch : trunk
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r--src/game/Unit.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 25370e0f02f..80fee50f19c 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -4379,14 +4379,13 @@ void Unit::RemoveAura(AuraMap::iterator &i, AuraRemoveMode mode)
{
for(int i = 0; i < 3; ++i)
{
- if(AurSpellInfo->Effect[i] == SPELL_EFFECT_SUMMON &&
- (AurSpellInfo->EffectMiscValueB[i] == SUMMON_TYPE_POSESSED ||
- AurSpellInfo->EffectMiscValueB[i] == SUMMON_TYPE_RACE_CONTROLLER ||
- AurSpellInfo->EffectMiscValueB[i] == SUMMON_TYPE_STEAM_TONK))
- {
- ((Player*)caster)->StopCastingCharm();
- break;
- }
+ if(AurSpellInfo->Effect[i] == SPELL_EFFECT_SUMMON)
+ if(SummonPropertiesEntry const *SummonProperties = sSummonPropertiesStore.LookupEntry(AurSpellInfo->EffectMiscValueB[i]))
+ if(SummonProperties->Group == SUMMON_TYPE_POSSESSED)
+ {
+ ((Player*)caster)->StopCastingCharm();
+ break;
+ }
}
}
}