diff --git a/sql/FULL/world_spell_full.sql b/sql/FULL/world_spell_full.sql
index dc95e228bd..24707ac9c6 100644
--- a/sql/FULL/world_spell_full.sql
+++ b/sql/FULL/world_spell_full.sql
@@ -2284,6 +2284,10 @@ INSERT INTO `spell_linked_spell` (`spell_trigger`, `spell_effect`, `type`, `comm
update game_graveyard_zone set ghost_zone = 4603 where id = 1474;
+-- No Fly Zone
+INSERT INTO `spell_linked_spell` (spell_trigger, spell_effect, type, comment) VALUES
+ (-58600, 61243, 0, 'No fly zone - Parachute'),
+ (-58730, 61243, 0, 'No fly zone - Parachute');
-- temp
diff --git a/sql/FULL/world_trinity_string_full.sql b/sql/FULL/world_trinity_string_full.sql
index 6ac81f9314..30396a6d24 100644
--- a/sql/FULL/world_trinity_string_full.sql
+++ b/sql/FULL/world_trinity_string_full.sql
@@ -628,6 +628,7 @@ INSERT INTO `trinity_string` (`entry`, `content_default`, `content_loc1`, `conte
(813, 'Veteran', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(814, 'Member', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(815, 'Initiate', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
+(816, 'You have entered a No-Fly Zone and are about to be dismounted.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(1000, 'Exiting daemon...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(1001, 'Account deleted: %s', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(1002, 'Account %s NOT deleted (probably sql file format was updated)', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
diff --git a/sql/updates/6171_world.sql b/sql/updates/6171_world.sql
new file mode 100644
index 0000000000..f3b628e1dd
--- /dev/null
+++ b/sql/updates/6171_world.sql
@@ -0,0 +1,5 @@
+INSERT INTO `spell_linked_spell` (spell_trigger, spell_effect, type, comment) VALUES
+ (-58600, 61243, 0, 'No fly zone - Parachute'),
+ (-58730, 61243, 0, 'No fly zone - Parachute');
+INSERT INTO `trinity_string` (entry, content_default, content_loc1, content_loc2, content_loc3, content_loc4, content_loc5, content_loc6, content_loc7, content_loc8) VALUES
+ (816, 'You have entered a No-Fly Zone and are about to be dismounted.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
diff --git a/src/game/CMakeLists.txt b/src/game/CMakeLists.txt
index f634c1c9f4..07f3d285b0 100644
--- a/src/game/CMakeLists.txt
+++ b/src/game/CMakeLists.txt
@@ -187,6 +187,8 @@ SET(game_STAT_SRCS
OutdoorPvPMgr.h
OutdoorPvPNA.cpp
OutdoorPvPNA.h
+ OutdoorPvPNR.cpp
+ OutdoorPvPNR.h
OutdoorPvPSI.cpp
OutdoorPvPSI.h
OutdoorPvPTF.cpp
diff --git a/src/game/Language.h b/src/game/Language.h
index 0a4b2b1f38..488b7a71c3 100644
--- a/src/game/Language.h
+++ b/src/game/Language.h
@@ -734,7 +734,8 @@ enum TrinityStrings
LANG_GUILD_VETERAN = 813,
LANG_GUILD_MEMBER = 814,
LANG_GUILD_INITIATE = 815,
- // Room for in-game strings 816-999 not used
+ LANG_ZONE_NOFLYZONE = 816,
+ // Room for in-game strings 817-999 not used
// Level 4 (CLI only commands)
LANG_COMMAND_EXIT = 1000,
diff --git a/src/game/MovementHandler.cpp b/src/game/MovementHandler.cpp
index 02a41d4392..6958326301 100644
--- a/src/game/MovementHandler.cpp
+++ b/src/game/MovementHandler.cpp
@@ -307,7 +307,10 @@ void WorldSession::HandleMovementOpcodes( WorldPacket & recv_data )
// fall damage generation (ignore in flight case that can be triggered also at lags in moment teleportation to another map).
if (opcode == MSG_MOVE_FALL_LAND && plMover && !plMover->isInFlight())
+ {
plMover->HandleFall(movementInfo);
+ _player->RemoveAurasByType(SPELL_AURA_FEATHER_FALL);
+ }
if (plMover && ((movementInfo.flags & MOVEMENTFLAG_SWIMMING) != 0) != plMover->IsInWater())
{
diff --git a/src/game/OutdoorPvP.h b/src/game/OutdoorPvP.h
index 0b9614144a..99f9745172 100644
--- a/src/game/OutdoorPvP.h
+++ b/src/game/OutdoorPvP.h
@@ -34,6 +34,7 @@ enum OutdoorPvPTypes
OUTDOOR_PVP_SI,
OUTDOOR_PVP_EP,
OPVP_WINTERGRASP,
+ OUTDOOR_PVP_NR,
};
const uint8 CapturePointArtKit[3] = {2, 1, 21};
diff --git a/src/game/OutdoorPvPMgr.cpp b/src/game/OutdoorPvPMgr.cpp
index 4df07914b3..0145c0219e 100644
--- a/src/game/OutdoorPvPMgr.cpp
+++ b/src/game/OutdoorPvPMgr.cpp
@@ -19,6 +19,7 @@
#include "OutdoorPvPMgr.h"
#include "OutdoorPvPHP.h"
#include "OutdoorPvPNA.h"
+#include "OutdoorPvPNR.h"
#include "OutdoorPvPTF.h"
#include "OutdoorPvPZM.h"
#include "OutdoorPvPSI.h"
@@ -137,6 +138,19 @@ void OutdoorPvPMgr::InitOutdoorPvP()
m_OutdoorPvPSet.push_back(pOP);
sLog.outDebug("OutdoorPvP : Wintergrasp successfully initiated.");
}
+
+ pOP = new OutdoorPvPNR;
+ // respawn, init variables
+ if(!pOP->SetupOutdoorPvP())
+ {
+ sLog.outDebug("OutdoorPvP : NR init failed.");
+ delete pOP;
+ }
+ else
+ {
+ m_OutdoorPvPSet.push_back(pOP);
+ sLog.outDebug("OutdoorPvP : NR successfully initiated.");
+ }
}
void OutdoorPvPMgr::AddZone(uint32 zoneid, OutdoorPvP *handle)
diff --git a/src/game/OutdoorPvPNR.cpp b/src/game/OutdoorPvPNR.cpp
new file mode 100644
index 0000000000..4f16e407b2
--- /dev/null
+++ b/src/game/OutdoorPvPNR.cpp
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2008-2009 Trinity
+ *
+ * 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);
+ }
+ 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
new file mode 100644
index 0000000000..fe56741b3c
--- /dev/null
+++ b/src/game/OutdoorPvPNR.h
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2008-2009 Trinity
+ *
+ * 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/Player.cpp b/src/game/Player.cpp
index a1d82e22c8..8f5ae3ac75 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -20972,7 +20972,7 @@ bool Player::IsKnowHowFlyIn(uint32 mapid, uint32 zone) const
{
// continent checked in SpellMgr::GetSpellAllowedInLocationError at cast and area update
uint32 v_map = GetVirtualMapForMapAndZone(mapid, zone);
- return v_map != 571 || HasSpell(54197) && zone != 4197 && zone != 4395; // Cold Weather Flying
+ return v_map != 571 || HasSpell(54197); // Cold Weather Flying
}
void Player::learnSpellHighRank(uint32 spellid)
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
index adc84852de..c9d84d2cb4 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -5184,7 +5184,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 (!((Player*)m_originalCaster)->IsKnowHowFlyIn(m_originalCaster->GetMapId(),m_originalCaster->GetZoneId()))
+ if (m_originalCaster->GetZoneId() == 4197 || m_originalCaster->GetZoneId() == 4395)
return m_IsTriggeredSpell ? SPELL_FAILED_DONT_REPORT : SPELL_FAILED_NOT_HERE;
}
break;
@@ -6796,4 +6797,4 @@ void Spell::FillRaidOrPartyHealthPriorityTargets( UnitList &TagUnitMap, Unit* ta
TagUnitMap.push_back(healthQueue.top().getUnit());
healthQueue.pop();
}
-}
\ No newline at end of file
+}
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index a7e1725216..587dae3ed4 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -3334,7 +3334,28 @@ void AuraEffect::HandleAuraFeatherFall(bool apply, bool Real, bool /*changeAmoun
WorldPacket data;
if(apply)
+ {
+ Unit* caster = GetCaster();
+
+ 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->RemoveAurasByType(SPELL_AURA_FEATHER_FALL);
+ return;
+ }
+ }
data.Initialize(SMSG_MOVE_FEATHER_FALL, 8+4);
+ }
else
data.Initialize(SMSG_MOVE_NORMAL_FALL, 8+4);
data.append(m_target->GetPackGUID());
diff --git a/src/game/Wintergrasp.cpp b/src/game/Wintergrasp.cpp
index 65fa5dccad..ec989a8123 100644
--- a/src/game/Wintergrasp.cpp
+++ b/src/game/Wintergrasp.cpp
@@ -949,6 +949,14 @@ void OPvPWintergrasp::HandlePlayerEnterZone(Player * plr, uint32 zone)
if (!sWorld.getConfig(CONFIG_OUTDOORPVP_WINTERGRASP_ENABLED))
return;
+ // No fly zone or parachute
+ if (!plr->HasAura(SPELL_NOFLYZONE_WG) && !plr->HasAura(SPELL_PARACHUTE_WG) &&
+ (plr->HasAuraType(SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED) || plr->HasAuraType(SPELL_AURA_FLY)))
+ {
+ plr->CastSpell(plr, SPELL_NOFLYZONE_WG, true);
+ ChatHandler(plr).PSendSysMessage(LANG_ZONE_NOFLYZONE);
+ }
+
if (!isWarTime())
{
if (plr->GetTeamId() == getDefenderTeam())
@@ -1032,6 +1040,7 @@ void OPvPWintergrasp::HandlePlayerLeaveZone(Player * plr, uint32 zone)
OutdoorPvP::HandlePlayerLeaveZone(plr, zone);
UpdateTenacityStack();
plr->RemoveAura(SPELL_ESSENCE_OF_WG);
+ plr->RemoveAura(SPELL_NOFLYZONE_WG);
}
void OPvPWintergrasp::PromotePlayer(Player *killer) const
diff --git a/src/game/Wintergrasp.h b/src/game/Wintergrasp.h
index 6a07bc48fb..e15859f7c3 100644
--- a/src/game/Wintergrasp.h
+++ b/src/game/Wintergrasp.h
@@ -33,25 +33,31 @@ const uint32 ClockWorldState[5] = {3785,3784,3782,3976,3975};
enum WintergraspSpell
{
+ // Wartime auras
SPELL_RECRUIT = 37795,
SPELL_CORPORAL = 33280,
SPELL_LIEUTENANT = 55629,
-
SPELL_TENACITY = 58549,
SPELL_TENACITY_VEHICLE = 59911,
-
- SPELL_TELEPORT_DALARAN = 53360,
-
SPELL_TOWER_CONTROL = 62064,
- //SPELL_RULLERS_OF_WG = 52108,
+ SPELL_SPIRITUAL_IMMUNITY = 58729,
+
+ // Reward spells
SPELL_VICTORY_REWARD = 56902,
SPELL_DEFEAT_REWARD = 58494,
SPELL_DAMAGED_TOWER = 59135,
SPELL_DESTROYED_TOWER = 59136,
SPELL_DAMAGED_BUILDING = 59201,
SPELL_INTACT_BUILDING = 59203,
+
+ // No Wartime auras
SPELL_ESSENCE_OF_WG = 58045,
- SPELL_SPIRITUAL_IMMUNITY = 58729,
+
+ // other
+ SPELL_NOFLYZONE_WG = 58730,
+ SPELL_PARACHUTE_WG = 61243,
+
+// SPELL_TELEPORT_DALARAN = 53360,
// SPELL_VICTORY_AURA = 60044,
};
diff --git a/win/VC80/game.vcproj b/win/VC80/game.vcproj
index 2877fb6bd2..5732794359 100644
--- a/win/VC80/game.vcproj
+++ b/win/VC80/game.vcproj
@@ -1673,6 +1673,14 @@
RelativePath="..\..\src\game\OutdoorPvPNA.h"
>
+
+
+
+
diff --git a/win/VC90/game.vcproj b/win/VC90/game.vcproj
index 9a58042d9f..77c252bdbd 100644
--- a/win/VC90/game.vcproj
+++ b/win/VC90/game.vcproj
@@ -1674,6 +1674,14 @@
RelativePath="..\..\src\game\OutdoorPvPNA.h"
>
+
+
+
+