Scripts/Trial of the Crusader: Added missing difficulty checks for Valkyrs and Anub'arak

This commit is contained in:
johnholiver
2011-05-07 00:07:34 -03:00
parent a202404e7a
commit 64c8fb2b42
2 changed files with 53 additions and 39 deletions

View File

@@ -104,6 +104,8 @@ enum BossSpells
SPELL_SPIKE_TELE = 66170,
};
#define SPELL_PERMAFROST_HELPER RAID_MODE<uint32>(66193,67856,67855,67857)
enum SummonActions
{
ACTION_SHADOW_STRIKE,
@@ -533,7 +535,7 @@ public:
}
else
{
if (!me->HasAura(SPELL_PERMAFROST))
if (!me->HasAura(SPELL_PERMAFROST_HELPER))
{
DoCast(me, SPELL_SUBMERGE_EFFECT);
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);

View File

@@ -88,14 +88,20 @@ enum BossSpells
SPELL_BERSERK = 64238,
SPELL_NONE = 0,
SPELL_EMPOWERED_DARK = 67215,
SPELL_EMPOWERED_LIGHT = 67218,
SPELL_EMPOWERED_DARK = 65724,
SPELL_EMPOWERED_LIGHT = 65748,
SPELL_UNLEASHED_DARK = 65808,
SPELL_UNLEASHED_LIGHT = 65795,
//PowerUp 67604
};
#define SPELL_DARK_ESSENCE_HELPER RAID_MODE<uint32>(65684, 67176, 67177, 67178)
#define SPELL_LIGHT_ESSENCE_HELPER RAID_MODE<uint32>(65686, 67222, 67223, 67224)
#define SPELL_EMPOWERED_DARK_HELPER RAID_MODE<uint32>(65724,67213,67214,67215)
#define SPELL_EMPOWERED_LIGHT_HELPER RAID_MODE<uint32>(65748, 67216, 67217, 67218)
enum Actions
{
ACTION_VORTEX,
@@ -216,19 +222,10 @@ struct boss_twin_baseAI : public ScriptedAI
switch (pSummoned->GetEntry())
{
case NPC_LIGHT_ESSENCE:
m_pInstance->DoRemoveAurasDueToSpellOnPlayers(SPELL_LIGHT_ESSENCE_HELPER);
break;
case NPC_DARK_ESSENCE:
Map* pMap = me->GetMap();
Map::PlayerList const &lPlayers = pMap->GetPlayers();
for (Map::PlayerList::const_iterator itr = lPlayers.begin(); itr != lPlayers.end(); ++itr)
{
Unit* pPlayer = itr->getSource();
if (!pPlayer) continue;
if (pPlayer->isAlive())
if (pSummoned->GetEntry() == NPC_LIGHT_ESSENCE)
pPlayer->RemoveAurasDueToSpell(SPELL_LIGHT_ESSENCE);
if (pSummoned->GetEntry() == NPC_DARK_ESSENCE)
pPlayer->RemoveAurasDueToSpell(SPELL_DARK_ESSENCE);
}
m_pInstance->DoRemoveAurasDueToSpellOnPlayers(SPELL_DARK_ESSENCE_HELPER);
break;
}
Summons.Despawn(pSummoned);
@@ -457,9 +454,9 @@ public:
m_uiSisterNpcId = NPC_DARKBANE;
m_uiColorballNpcId = NPC_UNLEASHED_LIGHT;
m_uiEssenceNpcId = NPC_LIGHT_ESSENCE;
m_uiMyEssenceSpellId = SPELL_LIGHT_ESSENCE;
m_uiOtherEssenceSpellId = SPELL_DARK_ESSENCE;
m_uiEmpoweredWeaknessSpellId = SPELL_EMPOWERED_DARK;
m_uiMyEssenceSpellId = SPELL_LIGHT_ESSENCE_HELPER;
m_uiOtherEssenceSpellId = SPELL_DARK_ESSENCE_HELPER;
m_uiEmpoweredWeaknessSpellId = SPELL_EMPOWERED_DARK_HELPER;
m_uiSurgeSpellId = SPELL_LIGHT_SURGE;
m_uiVortexSpellId = SPELL_LIGHT_VORTEX;
m_uiShieldSpellId = SPELL_LIGHT_SHIELD;
@@ -516,9 +513,9 @@ public:
m_uiSisterNpcId = NPC_LIGHTBANE;
m_uiColorballNpcId = NPC_UNLEASHED_DARK;
m_uiEssenceNpcId = NPC_DARK_ESSENCE;
m_uiMyEssenceSpellId = SPELL_DARK_ESSENCE;
m_uiOtherEssenceSpellId = SPELL_LIGHT_ESSENCE;
m_uiEmpoweredWeaknessSpellId = SPELL_EMPOWERED_LIGHT;
m_uiMyEssenceSpellId = SPELL_DARK_ESSENCE_HELPER;
m_uiOtherEssenceSpellId = SPELL_LIGHT_ESSENCE_HELPER;
m_uiEmpoweredWeaknessSpellId = SPELL_EMPOWERED_LIGHT_HELPER;
m_uiSurgeSpellId = SPELL_DARK_SURGE;
m_uiVortexSpellId = SPELL_DARK_VORTEX;
m_uiShieldSpellId = SPELL_DARK_SHIELD;
@@ -534,29 +531,44 @@ public:
};
#define ESSENCE_REMOVE 0
#define ESSENCE_APPLY 1
class mob_essence_of_twin : public CreatureScript
{
public:
mob_essence_of_twin() : CreatureScript("mob_essence_of_twin") { }
public:
mob_essence_of_twin() : CreatureScript("mob_essence_of_twin") { }
bool OnGossipHello(Player* player, Creature* creature)
{
switch (creature->GetEntry())
struct mob_essence_of_twinAI : public ScriptedAI
{
case NPC_LIGHT_ESSENCE:
player->RemoveAura(SPELL_DARK_ESSENCE);
player->CastSpell(player, SPELL_LIGHT_ESSENCE, true);
break;
case NPC_DARK_ESSENCE:
player->RemoveAura(SPELL_LIGHT_ESSENCE);
player->CastSpell(player, SPELL_DARK_ESSENCE, true);
break;
default:
break;
mob_essence_of_twinAI(Creature* creature) : ScriptedAI(creature) { }
uint32 GetData(uint32 data)
{
uint32 spellReturned;
switch (me->GetEntry())
{
case NPC_LIGHT_ESSENCE:
spellReturned = data == ESSENCE_REMOVE? SPELL_DARK_ESSENCE_HELPER : SPELL_LIGHT_ESSENCE_HELPER;
case NPC_DARK_ESSENCE:
spellReturned = data == ESSENCE_REMOVE? SPELL_LIGHT_ESSENCE_HELPER : SPELL_DARK_ESSENCE_HELPER;
}
return spellReturned;
}
};
CreatureAI* GetAI(Creature* creature) const
{
return new mob_essence_of_twinAI(creature);
};
bool OnGossipHello(Player* player, Creature* creature)
{
player->RemoveAurasDueToSpell(creature->GetAI()->GetData(ESSENCE_REMOVE));
player->CastSpell(player, creature->GetAI()->GetData(ESSENCE_APPLY), true);
player->CLOSE_GOSSIP_MENU();
return true;
}
player->CLOSE_GOSSIP_MENU();
return true;
}
};
struct mob_unleashed_ballAI : public ScriptedAI