Core/Battleground: Implemented blizzlike script for Isle of Conquest, written by gyullo and me, based on Socolin's and Josh's patch -BIG THANKS TO THEM-

Anyway the map is not yet playable, there are issues not related with the script.

I also want to thanks to QAston, linencloth, Shauren and Machiavelli to be so patient with my questions.
This commit is contained in:
Manuel
2011-01-09 00:00:08 -03:00
parent 57173df80f
commit 5cf76896eb
19 changed files with 2139 additions and 48 deletions
+18 -1
View File
@@ -1669,7 +1669,6 @@ void Spell::EffectForceCastWithValue(SpellEffIndex effIndex)
return;
}
int32 bp = damage;
Unit * caster = GetTriggeredSpellCaster(spellInfo, m_caster, unitTarget);
caster->CastCustomSpell(unitTarget, spellInfo->Id, &bp, &bp, &bp, true, NULL, NULL, m_originalCasterGUID);
@@ -1957,6 +1956,24 @@ void Spell::EffectTeleportUnits(SpellEffIndex /*effIndex*/)
return;
}
break;
case 66550: // teleports outside (Isle of Conquest)
if (Player* pTarget = unitTarget->ToPlayer())
{
if (pTarget->GetTeamId() == TEAM_ALLIANCE)
m_targets.setDst(442.24f,-835.25f,44.30f,0.06f,628);
else
m_targets.setDst(1120.43f,-762.11f,47.92f,2.94f,628);
}
break;
case 66551: // teleports inside (Isle of Conquest)
if (Player* pTarget = unitTarget->ToPlayer())
{
if (pTarget->GetTeamId() == TEAM_ALLIANCE)
m_targets.setDst(389.57f,-832.38f,48.65f,3.00f,628);
else
m_targets.setDst(1174.85f,-763.24f,48.72f,6.26f,628);
}
break;
}
// If not exist data for dest location - return
+25 -7
View File
@@ -27,6 +27,7 @@
#include "BattlegroundMgr.h"
#include "CreatureAI.h"
#include "MapManager.h"
#include "BattlegroundIC.h"
bool IsAreaEffectTarget[TOTAL_SPELL_TARGETS];
SpellEffectTargetTypes EffectTargetType[TOTAL_SPELL_EFFECTS];
@@ -3084,15 +3085,32 @@ bool SpellArea::IsFitToRequirements(Player const* player, uint32 newZone, uint32
switch(spellId)
{
case 58600: // No fly Zone - Dalaran
if (!player)
return false;
{
if (!player)
return false;
AreaTableEntry const* pArea = GetAreaEntryByAreaID(player->GetAreaId());
if (!(pArea && pArea->flags & AREA_FLAG_NO_FLY_ZONE))
return false;
if (!player->HasAuraType(SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED) && !player->HasAuraType(SPELL_AURA_FLY))
return false;
break;
}
case 68719: // Oil Refinery - Isle of Conquest.
case 68720: // Quarry - Isle of Conquest.
{
if (player->GetBattlegroundTypeId() != BATTLEGROUND_IC || !player->GetBattleground())
return false;
uint8 nodeType = spellId == 68719 ? NODE_TYPE_REFINERY : NODE_TYPE_QUARRY;
uint8 nodeState = player->GetTeamId() == TEAM_ALLIANCE ? NODE_STATE_CONTROLLED_A : NODE_STATE_CONTROLLED_H;
BattlegroundIC* pIC = static_cast<BattlegroundIC*>(player->GetBattleground());
if (pIC->GetNodeState(nodeType) == nodeState)
return true;
AreaTableEntry const* pArea = GetAreaEntryByAreaID(player->GetAreaId());
if (!(pArea && pArea->flags & AREA_FLAG_NO_FLY_ZONE))
return false;
if (!player->HasAuraType(SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED) && !player->HasAuraType(SPELL_AURA_FLY))
return false;
break;
}
}
return true;