Core: Add wintergrasp-patch to wintergrasp_cleanup branch - resurrected from an old work-repository, now over as a branch to work on.

Original patch by socolin, cand a ton of contributors :
mathman, joda, spp, silinoron, josh, malcrom, shauren, machiavelli, click, rat, leak, tobmaps, _manuel_, the tcfr team (via socolin), and tons of others for chiming in.

NOTE: THIS IS A WORKING-BRANCH, AND _NOT_ MENT FOR PUBLIC USE OR EVEN CONSIDERED STABLE!
This commit is contained in:
click
2011-06-28 00:56:29 +02:00
parent e2f49f63bc
commit f580cddc09
49 changed files with 6739 additions and 83 deletions
@@ -35,6 +35,7 @@
#include "GridNotifiersImpl.h"
#include "CellImpl.h"
#include "ScriptMgr.h"
#include "BattlefieldMgr.h"
class Aura;
//
@@ -4815,8 +4816,12 @@ void AuraEffect::HandleAuraDummy(AuraApplication const* aurApp, uint8 mode, bool
case 2584: // Waiting to Resurrect
// Waiting to resurrect spell cancel, we must remove player from resurrect queue
if (target->GetTypeId() == TYPEID_PLAYER)
if (Battleground *bg = target->ToPlayer()->GetBattleground())
{
if (Battleground* bg = target->ToPlayer()->GetBattleground())
bg->RemovePlayerFromResurrectQueue(target->GetGUID());
if(Battlefield* bf = sBattlefieldMgr.GetBattlefieldToZoneId(target->GetZoneId()))
bf->RemovePlayerFromResurrectQueue(target->GetGUID());
}
break;
case 36730: // Flame Strike
{
@@ -4853,6 +4858,7 @@ void AuraEffect::HandleAuraDummy(AuraApplication const* aurApp, uint8 mode, bool
target->CastSpell((Unit*)NULL, GetAmount(), true, NULL, this);
break;
case 58600: // Restricted Flight Area
case 58730: // Restricted Flight Area
if (aurApp->GetRemoveMode() == AURA_REMOVE_BY_EXPIRE)
target->CastSpell(target, 58601, true);
break;
+3 -1
View File
@@ -52,6 +52,7 @@
#include "DisableMgr.h"
#include "SpellScript.h"
#include "InstanceScript.h"
#include "BattlefieldMgr.h"
extern pEffect SpellEffects[TOTAL_SPELL_EFFECTS];
@@ -5472,8 +5473,9 @@ SpellCastResult Spell::CheckCast(bool strict)
// allow always ghost flight spells
if (m_originalCaster && m_originalCaster->GetTypeId() == TYPEID_PLAYER && m_originalCaster->isAlive())
{
Battlefield* Bf = sBattlefieldMgr.GetBattlefieldToZoneId(m_originalCaster->GetZoneId());
if (AreaTableEntry const* pArea = GetAreaEntryByAreaID(m_originalCaster->GetAreaId()))
if (pArea->flags & AREA_FLAG_NO_FLY_ZONE)
if ((pArea->flags & AREA_FLAG_NO_FLY_ZONE) || (Bf && !Bf->CanFlyIn()))
return m_IsTriggeredSpell ? SPELL_FAILED_DONT_REPORT : SPELL_FAILED_NOT_HERE;
}
break;
+1
View File
@@ -6976,6 +6976,7 @@ void Spell::EffectPlayerNotification(SpellEffIndex effIndex)
case 58730: // Restricted Flight Area
case 58600: // Restricted Flight Area
unitTarget->ToPlayer()->GetSession()->SendNotification(LANG_ZONE_NOFLYZONE);
unitTarget->PlayDirectSound(9417); // Fel Reaver sound
break;
}
+21
View File
@@ -25,6 +25,7 @@
#include "Chat.h"
#include "Spell.h"
#include "BattlegroundMgr.h"
#include "BattlefieldMgr.h"
#include "CreatureAI.h"
#include "MapManager.h"
#include "BattlegroundIC.h"
@@ -3289,6 +3290,26 @@ bool SpellArea::IsFitToRequirements(Player const* player, uint32 newZone, uint32
return false;
break;
}
case 58730: // No fly Zone - Wintergrasp
{
if (!player)
return false;
Battlefield* Bf = sBattlefieldMgr.GetBattlefieldToZoneId(player->GetZoneId());
if (!Bf || Bf->CanFlyIn() || (!player->HasAuraType(SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED) && !player->HasAuraType(SPELL_AURA_FLY)))
return false;
break;
}
case 57940: // Essence of Wintergrasp - Northrend
{
if (!player)
return false;
Battlefield* Bf = sBattlefieldMgr.GetBattlefieldToZoneId(4197);
if (!Bf || player->GetTeamId() != Bf->GetDefenderTeam())
return false;
break;
}
case SPELL_OIL_REFINERY: // Oil Refinery - Isle of Conquest.
case SPELL_QUARRY: // Quarry - Isle of Conquest.
{