*Implementation of 'No Fly Zone' (Dalaran and Wintergrasp), by Spp
--HG-- branch : trunk
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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),
|
||||
|
||||
@@ -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);
|
||||
@@ -187,6 +187,8 @@ SET(game_STAT_SRCS
|
||||
OutdoorPvPMgr.h
|
||||
OutdoorPvPNA.cpp
|
||||
OutdoorPvPNA.h
|
||||
OutdoorPvPNR.cpp
|
||||
OutdoorPvPNR.h
|
||||
OutdoorPvPSI.cpp
|
||||
OutdoorPvPSI.h
|
||||
OutdoorPvPTF.cpp
|
||||
|
||||
+2
-1
@@ -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,
|
||||
|
||||
@@ -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())
|
||||
{
|
||||
|
||||
@@ -34,6 +34,7 @@ enum OutdoorPvPTypes
|
||||
OUTDOOR_PVP_SI,
|
||||
OUTDOOR_PVP_EP,
|
||||
OPVP_WINTERGRASP,
|
||||
OUTDOOR_PVP_NR,
|
||||
};
|
||||
|
||||
const uint8 CapturePointArtKit[3] = {2, 1, 21};
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* 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);
|
||||
}
|
||||
OutdoorPvP::HandlePlayerEnterZone(plr, zone);
|
||||
}
|
||||
|
||||
void OutdoorPvPNR::HandlePlayerLeaveZone(Player *plr, uint32 zone)
|
||||
{
|
||||
plr->RemoveAura(SPELL_NOFLYZONE);
|
||||
OutdoorPvP::HandlePlayerLeaveZone(plr, zone);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
* 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
|
||||
+1
-1
@@ -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)
|
||||
|
||||
+2
-1
@@ -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;
|
||||
|
||||
@@ -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());
|
||||
|
||||
@@ -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
|
||||
|
||||
+12
-6
@@ -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,
|
||||
};
|
||||
|
||||
|
||||
@@ -1673,6 +1673,14 @@
|
||||
RelativePath="..\..\src\game\OutdoorPvPNA.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\game\OutdoorPvPNR.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\game\OutdoorPvPNR.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\game\OutdoorPvPSI.cpp"
|
||||
>
|
||||
|
||||
@@ -1674,6 +1674,14 @@
|
||||
RelativePath="..\..\src\game\OutdoorPvPNA.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\game\OutdoorPvPNR.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\game\OutdoorPvPNR.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\game\OutdoorPvPSI.cpp"
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user