aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortartalo <none@none>2009-12-01 13:29:16 +0100
committertartalo <none@none>2009-12-01 13:29:16 +0100
commitc6e4cd0a7749075ff622e0acdc9a046388080752 (patch)
tree173bf0c4a525a9fb0bd7122dd99011f14e9b35c8 /src
parent36d41cdec5ddf486eccc6357f5cff4598b19d5c1 (diff)
Fix No Fly Zone, by Spp. Closes #574
--HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/game/OutdoorPvPNR.cpp50
-rw-r--r--src/game/OutdoorPvPNR.h37
-rw-r--r--src/game/Spell.cpp4
3 files changed, 2 insertions, 89 deletions
diff --git a/src/game/OutdoorPvPNR.cpp b/src/game/OutdoorPvPNR.cpp
deleted file mode 100644
index fbcca4bdeff..00000000000
--- a/src/game/OutdoorPvPNR.cpp
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (C) 2008-2009 Trinity <http://www.trinitycore.org/>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#include "OutdoorPvPNR.h"
-#include "Player.h"
-
-OutdoorPvPNR::OutdoorPvPNR()
-{
- m_TypeId = OUTDOOR_PVP_NR;
-}
-
-bool OutdoorPvPNR::SetupOutdoorPvP()
-{
- RegisterZone(4395);
- return true;
-}
-
-void OutdoorPvPNR::HandlePlayerEnterZone(Player * plr, uint32 zone)
-{
- if (!plr->HasAura(SPELL_NOFLYZONE) && !plr->HasAura(SPELL_PARACHUTE) &&
- (plr->HasAuraType(SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED) || plr->HasAuraType(SPELL_AURA_FLY)))
- {
- plr->CastSpell(plr, SPELL_NOFLYZONE, true);
- ChatHandler(plr).PSendSysMessage(LANG_ZONE_NOFLYZONE);
- plr->GetSession()->SendNotification(LANG_ZONE_NOFLYZONE);
- }
- OutdoorPvP::HandlePlayerEnterZone(plr, zone);
-}
-
-void OutdoorPvPNR::HandlePlayerLeaveZone(Player *plr, uint32 zone)
-{
- plr->RemoveAura(SPELL_NOFLYZONE);
- OutdoorPvP::HandlePlayerLeaveZone(plr, zone);
-}
-
diff --git a/src/game/OutdoorPvPNR.h b/src/game/OutdoorPvPNR.h
deleted file mode 100644
index fe56741b3cc..00000000000
--- a/src/game/OutdoorPvPNR.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (C) 2008-2009 Trinity <http://www.trinitycore.org/>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#ifndef OUTDOOR_PVP_NR_
-#define OUTDOOR_PVP_NR_
-
-#include "OutdoorPvPImpl.h"
-#include "Chat.h"
-
-const uint32 SPELL_NOFLYZONE = 58600;
-const uint32 SPELL_PARACHUTE = 61243;
-
-class OutdoorPvPNR : public OutdoorPvP
-{
-public:
- OutdoorPvPNR();
- bool SetupOutdoorPvP();
- void HandlePlayerEnterZone(Player *plr, uint32 zone);
- void HandlePlayerLeaveZone(Player *plr, uint32 zone);
-};
-
-#endif
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
index 66c8f5fa99c..e06f4cbfe9f 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -5192,8 +5192,8 @@ SpellCastResult Spell::CheckCast(bool strict)
// allow always ghost flight spells
if (m_originalCaster && m_originalCaster->GetTypeId() == TYPEID_PLAYER && m_originalCaster->isAlive())
{
- //if (!((Player*)m_originalCaster)->IsKnowHowFlyIn(m_originalCaster->GetMapId(),m_originalCaster->GetZoneId()))
- if (m_originalCaster->GetZoneId() == 4197 || m_originalCaster->GetZoneId() == 4395)
+ // 4197 = Wintergrasp || 4395 = Dalaran && 4564 = Krasus Landing
+ if (m_originalCaster->GetZoneId() == 4197 || m_originalCaster->GetZoneId() == 4395 && m_originalCaster->GetAreaId() != 4564)
return m_IsTriggeredSpell ? SPELL_FAILED_DONT_REPORT : SPELL_FAILED_NOT_HERE;
}
break;