diff options
| author | n0n4m3 <none@none> | 2009-12-20 18:02:57 +0100 |
|---|---|---|
| committer | n0n4m3 <none@none> | 2009-12-20 18:02:57 +0100 |
| commit | 9f40c92fb410a837fd9f46e0103cf375081578ea (patch) | |
| tree | 6dffab70e54974e3a992949cb41f1da701b9a0c9 /src/game/SpellAuras.cpp | |
| parent | cc19e731742420615bc7c68144b100b07298fad0 (diff) | |
Restore patch: No Fly Zone using Spell
--HG--
branch : trunk
Diffstat (limited to 'src/game/SpellAuras.cpp')
| -rw-r--r-- | src/game/SpellAuras.cpp | 74 |
1 files changed, 43 insertions, 31 deletions
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index c9867e1b2c5..74f438e5631 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -3522,30 +3522,7 @@ void AuraEffect::HandleAuraFeatherFall(bool apply, bool Real, bool /*changeAmoun WorldPacket data; if (apply) - { - Unit* caster = GetCaster(); - if (!caster) - return; - - if (caster->GetGUID() == m_target->GetGUID()) - { - m_target->RemoveAurasByType(SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED); - m_target->RemoveAurasByType(SPELL_AURA_FLY); - } - - if (GetId() == 61243) // No fly zone - Parachute - { - float x, y, z; - caster->GetPosition(x, y, z); - float ground_Z = caster->GetMap()->GetVmapHeight(x, y, z, true); - if (fabs(ground_Z - z) < 0.1f) - { - m_target->RemoveAura(GetId()); - return; - } - } data.Initialize(SMSG_MOVE_FEATHER_FALL, 8+4); - } else data.Initialize(SMSG_MOVE_NORMAL_FALL, 8+4); data.append(m_target->GetPackGUID()); @@ -4777,6 +4754,16 @@ void AuraEffect::HandlePeriodicTriggerSpell(bool apply, bool Real, bool /*change void AuraEffect::HandlePeriodicTriggerSpellWithValue(bool apply, bool Real, bool /*changeAmount*/) { m_isPeriodic = apply; + + SpellEntry const* spell = GetSpellProto(); + switch (spell->Id) + { + case 58730: // No fly zone - Wintergrasp (3.1.3 only 3.2.2 Does not call this aura) + if (apply) + if (m_target->GetTypeId() == TYPEID_PLAYER) + ((Player *)m_target)->GetSession()->SendNotification(LANG_ZONE_NOFLYZONE); + break; + } } void AuraEffect::HandlePeriodicEnergize(bool apply, bool Real, bool changeAmount) @@ -4802,15 +4789,22 @@ void AuraEffect::HandleAuraPeriodicDummy(bool apply, bool Real, bool changeAmoun { case SPELLFAMILY_GENERIC: { - if(spell->Id == 62399) // Overload Circuit + switch(spell->Id) { - if(m_target->GetMap()->IsDungeon()) - if(m_target->GetAuras().count(62399) >= (((InstanceMap*)m_target->GetMap())->GetDifficulty() == REGULAR_DIFFICULTY ? 2 : 4)) - { - m_target->CastSpell(m_target, 62475, true); // System Shutdown - if(Unit *veh = m_target->GetVehicleBase()) - veh->CastSpell(m_target, 62475, true); - } + case 62399: // Overload Circuit + if(m_target->GetMap()->IsDungeon() && m_target->GetAuras().count(62399) >= (m_target->GetMap()->IsHeroic() ? 4 : 2)) + { + m_target->CastSpell(m_target, 62475, true); // System Shutdown + if(Unit *veh = m_target->GetVehicleBase()) + veh->CastSpell(m_target, 62475, true); + } + break; + case 58600: // No fly zone - Dalaran + if (apply && m_target->GetTypeId() == TYPEID_PLAYER) + ((Player *)m_target)->GetSession()->SendNotification(LANG_ZONE_NOFLYZONE); + break; + default: + break; } break; } @@ -6695,6 +6689,24 @@ void AuraEffect::PeriodicDummyTick() // 7053 Forsaken Skill: Shadow return; } + case 45472: // Parachute + if (m_target->GetTypeId() == TYPEID_PLAYER) + { + Player *plr = (Player*)m_target; + if (plr->IsFalling()) + { + plr->RemoveAurasDueToSpell(45472); + plr->CastSpell(plr, 44795, true); + } + } + break; + case 58600: // No fly Zone - Dalaran + if (10 == m_tickNumber) + { + m_target->RemoveAurasByType(SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED); + m_target->RemoveAurasByType(SPELL_AURA_FLY); + } + break; case 58549: // Tenacity case 59911: // Tenacity (vehicle) GetParentAura()->RefreshAura(); |
