aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormaximius <none@none>2009-09-23 00:45:47 -0700
committermaximius <none@none>2009-09-23 00:45:47 -0700
commit36a2633f5dcd02d44050171cb081060797e12453 (patch)
tree873918b02a0d06caec679255c6130a8cc9d28184 /src
parent8d154eb55fd5e77ce46d434436e7982b63821286 (diff)
*[Fix] fly in Northend without Cold Weather Flying if summoned, by Spp
--HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/game/SpellMgr.cpp19
1 files changed, 13 insertions, 6 deletions
diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp
index 0500432f3e3..ff8a1d02f29 100644
--- a/src/game/SpellMgr.cpp
+++ b/src/game/SpellMgr.cpp
@@ -2730,12 +2730,19 @@ SpellCastResult SpellMgr::GetSpellAllowedInLocationError(SpellEntry const *spell
}
}
- // wintergrasp
- if(zone_id == 4197)
- for(uint32 i = 0; i < 3; ++i)
- if(spellInfo->EffectApplyAuraName[i] == SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED
- || spellInfo->EffectApplyAuraName[i] == SPELL_AURA_FLY)
- return SPELL_FAILED_INCORRECT_AREA;
+ // aura limitations
+ for (uint32 i = 0; i < MAX_SPELL_EFFECTS; ++i)
+ {
+ switch(spellInfo->EffectApplyAuraName[i])
+ {
+ case SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED:
+ case SPELL_AURA_FLY:
+ {
+ if (player && !player->IsKnowHowFlyIn(map_id, zone_id))
+ return SPELL_FAILED_INCORRECT_AREA;
+ }
+ }
+ }
return SPELL_CAST_OK;
}