Scripts/Icecrown Citadel: Improvements to Shadowmourne quest line
This commit is contained in:
1 parent
2d861b71ce
commit
e49aaab6f6
8 files changed
+137
-140
No files matched your search
@@ -45,11 +45,13 @@ enum Spells
|
||||
SPELL_SHROUD_OF_SORROW = 70986,
|
||||
SPELL_FRENZIED_BLOODTHIRST_VISUAL = 71949,
|
||||
SPELL_VAMPIRIC_BITE = 71726,
|
||||
SPELL_VAMPIRIC_BITE_DUMMY = 71837,
|
||||
SPELL_ESSENCE_OF_THE_BLOOD_QUEEN_PLR = 70879,
|
||||
SPELL_ESSENCE_OF_THE_BLOOD_QUEEN_HEAL = 70872,
|
||||
SPELL_FRENZIED_BLOODTHIRST = 70877,
|
||||
SPELL_UNCONTROLLABLE_FRENZY = 70923,
|
||||
SPELL_PRESENCE_OF_THE_DARKFALLEN = 71952,
|
||||
SPELL_PRESENCE_OF_THE_DARKFALLEN = 70994,
|
||||
SPELL_PRESENCE_OF_THE_DARKFALLEN_2 = 71952,
|
||||
SPELL_BLOOD_MIRROR_DAMAGE = 70821,
|
||||
SPELL_BLOOD_MIRROR_VISUAL = 71510,
|
||||
SPELL_BLOOD_MIRROR_DUMMY = 70838,
|
||||
@@ -88,6 +90,7 @@ uint32 const vampireAuras[3][MAX_DIFFICULTY] =
|
||||
#define ESSENCE_OF_BLOOD_QUEEN_PLR RAID_MODE<uint32>(70879, 71525, 71530, 71531)
|
||||
#define FRENZIED_BLOODTHIRST RAID_MODE<uint32>(70877, 71474, 70877, 71474)
|
||||
#define DELIRIOUS_SLASH RAID_MODE<uint32>(71623, 71624, 71625, 71626)
|
||||
#define PRESENCE_OF_THE_DARKFALLEN RAID_MODE<uint32>(70994, 71962, 71963, 71964)
|
||||
|
||||
enum Events
|
||||
{
|
||||
@@ -220,6 +223,7 @@ class boss_blood_queen_lana_thel : public CreatureScript
|
||||
instance->DoRemoveAurasDueToSpellOnPlayers(SPELL_BLOOD_MIRROR_DUMMY);
|
||||
instance->DoRemoveAurasDueToSpellOnPlayers(DELIRIOUS_SLASH);
|
||||
instance->DoRemoveAurasDueToSpellOnPlayers(SPELL_PACT_OF_THE_DARKFALLEN);
|
||||
instance->DoRemoveAurasDueToSpellOnPlayers(PRESENCE_OF_THE_DARKFALLEN);
|
||||
}
|
||||
|
||||
void DoAction(int32 const action)
|
||||
@@ -357,8 +361,11 @@ class boss_blood_queen_lana_thel : public CreatureScript
|
||||
{
|
||||
Unit* target = targets.front();
|
||||
DoCast(target, SPELL_VAMPIRIC_BITE);
|
||||
DoCastAOE(SPELL_VAMPIRIC_BITE_DUMMY, true);
|
||||
Talk(SAY_VAMPIRIC_BITE);
|
||||
_vampires.insert(target->GetGUID());
|
||||
target->CastSpell(target, SPELL_PRESENCE_OF_THE_DARKFALLEN, TRIGGERED_FULL_MASK);
|
||||
target->CastSpell(target, SPELL_PRESENCE_OF_THE_DARKFALLEN_2, TRIGGERED_FULL_MASK);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -377,9 +384,10 @@ class boss_blood_queen_lana_thel : public CreatureScript
|
||||
_offtank->CastSpell(me->getVictim(), SPELL_BLOOD_MIRROR_DAMAGE, true);
|
||||
me->getVictim()->CastSpell(_offtank, SPELL_BLOOD_MIRROR_DUMMY, true);
|
||||
DoCastVictim(SPELL_BLOOD_MIRROR_VISUAL);
|
||||
if (Item* shadowsEdge = _offtank->GetWeaponForAttack(BASE_ATTACK, true))
|
||||
if (!_offtank->HasAura(SPELL_THIRST_QUENCHED) && shadowsEdge->GetEntry() == ITEM_SHADOW_S_EDGE && !_offtank->HasAura(SPELL_GUSHING_WOUND))
|
||||
_offtank->CastSpell(_offtank, SPELL_GUSHING_WOUND, true);
|
||||
if (Is25ManRaid() && _offtank->GetQuestStatus(QUEST_BLOOD_INFUSION) == QUEST_STATUS_INCOMPLETE &&
|
||||
_offtank->HasAura(SPELL_UNSATED_CRAVING) && !_offtank->HasAura(SPELL_THIRST_QUENCHED) &&
|
||||
!_offtank->HasAura(SPELL_GUSHING_WOUND))
|
||||
_offtank->CastSpell(_offtank, SPELL_GUSHING_WOUND, TRIGGERED_FULL_MASK);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -396,13 +404,7 @@ class boss_blood_queen_lana_thel : public CreatureScript
|
||||
{
|
||||
std::list<Player*> targets;
|
||||
SelectRandomTarget(false, &targets);
|
||||
uint32 targetCount = 2;
|
||||
// do not combine these checks! we want it incremented TWICE when both conditions are met
|
||||
if (IsHeroic())
|
||||
++targetCount;
|
||||
if (Is25ManRaid())
|
||||
++targetCount;
|
||||
Trinity::Containers::RandomResizeList<Player*>(targets, targetCount);
|
||||
Trinity::Containers::RandomResizeList(targets, Is25ManRaid() ? 3 : 2);
|
||||
if (targets.size() > 1)
|
||||
{
|
||||
Talk(SAY_PACT_OF_THE_DARKFALLEN);
|
||||
@@ -554,33 +556,36 @@ class spell_blood_queen_vampiric_bite : public SpellScriptLoader
|
||||
|
||||
uint32 spellId = sSpellMgr->GetSpellIdForDifficulty(SPELL_FRENZIED_BLOODTHIRST, GetCaster());
|
||||
GetCaster()->RemoveAura(spellId, 0, 0, AURA_REMOVE_BY_ENEMY_SPELL);
|
||||
GetCaster()->CastSpell(GetCaster(), SPELL_ESSENCE_OF_THE_BLOOD_QUEEN_PLR, true);
|
||||
// Presence of the Darkfallen buff on Blood-Queen
|
||||
if (GetCaster()->GetMap()->IsHeroic())
|
||||
GetCaster()->CastSpell(GetCaster(), SPELL_PRESENCE_OF_THE_DARKFALLEN, true);
|
||||
GetCaster()->CastSpell(GetCaster(), SPELL_ESSENCE_OF_THE_BLOOD_QUEEN_PLR, TRIGGERED_FULL_MASK);
|
||||
|
||||
// Shadowmourne questline
|
||||
if (GetCaster()->ToPlayer()->GetQuestStatus(QUEST_BLOOD_INFUSION) == QUEST_STATUS_INCOMPLETE)
|
||||
if (Aura* aura = GetCaster()->GetAura(SPELL_GUSHING_WOUND))
|
||||
{
|
||||
if (Aura* aura = GetCaster()->GetAura(SPELL_GUSHING_WOUND))
|
||||
if (aura->GetStackAmount() == 3)
|
||||
{
|
||||
if (aura->GetStackAmount() == 3)
|
||||
{
|
||||
GetCaster()->CastSpell(GetCaster(), SPELL_THIRST_QUENCHED, true);
|
||||
GetCaster()->RemoveAura(aura);
|
||||
}
|
||||
else
|
||||
GetCaster()->CastSpell(GetCaster(), SPELL_GUSHING_WOUND, true);
|
||||
GetCaster()->CastSpell(GetCaster(), SPELL_THIRST_QUENCHED, TRIGGERED_FULL_MASK);
|
||||
GetCaster()->RemoveAura(aura);
|
||||
}
|
||||
else
|
||||
GetCaster()->CastSpell(GetCaster(), SPELL_GUSHING_WOUND, TRIGGERED_FULL_MASK);
|
||||
}
|
||||
|
||||
if (InstanceScript* instance = GetCaster()->GetInstanceScript())
|
||||
if (Creature* bloodQueen = ObjectAccessor::GetCreature(*GetCaster(), instance->GetData64(DATA_BLOOD_QUEEN_LANA_THEL)))
|
||||
bloodQueen->AI()->SetGUID(GetHitUnit()->GetGUID(), GUID_VAMPIRE);
|
||||
}
|
||||
|
||||
void HandlePresence(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
GetHitUnit()->CastSpell(GetHitUnit(), SPELL_PRESENCE_OF_THE_DARKFALLEN, TRIGGERED_FULL_MASK);
|
||||
GetHitUnit()->CastSpell(GetHitUnit(), SPELL_PRESENCE_OF_THE_DARKFALLEN_2, TRIGGERED_FULL_MASK);
|
||||
}
|
||||
|
||||
void Register()
|
||||
{
|
||||
OnCheckCast += SpellCheckCastFn(spell_blood_queen_vampiric_bite_SpellScript::CheckTarget);
|
||||
BeforeHit += SpellHitFn(spell_blood_queen_vampiric_bite_SpellScript::OnCast);
|
||||
OnEffectHitTarget += SpellEffectFn(spell_blood_queen_vampiric_bite_SpellScript::HandlePresence, EFFECT_1, SPELL_EFFECT_TRIGGER_SPELL);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -84,7 +84,9 @@ enum Spells
|
||||
SPELL_CONCUSSIVE_SHOCK = 71337,
|
||||
|
||||
// Frost Infusion
|
||||
SPELL_FROST_INFUSION_CREDIT = 72289
|
||||
SPELL_FROST_INFUSION_CREDIT = 72289,
|
||||
SPELL_FROST_IMBUED_BLADE = 72290,
|
||||
SPELL_FROST_INFUSION = 72292,
|
||||
};
|
||||
|
||||
enum Events
|
||||
@@ -147,11 +149,7 @@ enum MovementPoints
|
||||
|
||||
enum Shadowmourne
|
||||
{
|
||||
QUEST_FROST_INFUSION = 24757,
|
||||
ITEM_SHADOW_S_EDGE = 49888,
|
||||
|
||||
SPELL_FROST_INFUSION = 72292,
|
||||
SPELL_FROST_IMBUED_BLADE = 72290,
|
||||
QUEST_FROST_INFUSION = 24757
|
||||
};
|
||||
|
||||
Position const RimefangFlyPos = {4413.309f, 2456.421f, 233.3795f, 2.890186f};
|
||||
@@ -390,47 +388,10 @@ class boss_sindragosa : public CreatureScript
|
||||
void SpellHitTarget(Unit* target, SpellInfo const* spell)
|
||||
{
|
||||
if (uint32 spellId = sSpellMgr->GetSpellIdForDifficulty(70127, me))
|
||||
{
|
||||
if (spellId == spell->Id)
|
||||
{
|
||||
if (Aura const* mysticBuffet = target->GetAura(spell->Id))
|
||||
_mysticBuffetStack = std::max<uint8>(_mysticBuffetStack, mysticBuffet->GetStackAmount());
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Frost Infusion
|
||||
if (Player* player = target->ToPlayer())
|
||||
{
|
||||
if (uint32 spellId = sSpellMgr->GetSpellIdForDifficulty(_isThirdPhase ? SPELL_FROST_BREATH_P2 : SPELL_FROST_BREATH_P1, me))
|
||||
{
|
||||
if (spellId == spell->Id)
|
||||
{
|
||||
Item* shadowsEdge = player->GetWeaponForAttack(BASE_ATTACK, true);
|
||||
if (player->GetQuestStatus(QUEST_FROST_INFUSION) == QUEST_STATUS_INCOMPLETE && shadowsEdge)
|
||||
{
|
||||
if (!player->HasAura(SPELL_FROST_IMBUED_BLADE) && shadowsEdge->GetEntry() == ITEM_SHADOW_S_EDGE)
|
||||
{
|
||||
if (Aura* infusion = player->GetAura(SPELL_FROST_INFUSION))
|
||||
{
|
||||
if (infusion->GetStackAmount() == 3)
|
||||
{
|
||||
player->CastSpell(player, SPELL_FROST_IMBUED_BLADE, true);
|
||||
player->RemoveAura(infusion);
|
||||
}
|
||||
else
|
||||
player->CastSpell(player, SPELL_FROST_INFUSION, true);
|
||||
}
|
||||
else
|
||||
player->CastSpell(player, SPELL_FROST_INFUSION, true);
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 const diff)
|
||||
@@ -1155,6 +1116,50 @@ class spell_sindragosa_unchained_magic : public SpellScriptLoader
|
||||
}
|
||||
};
|
||||
|
||||
class spell_sindragosa_frost_breath : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_sindragosa_frost_breath() : SpellScriptLoader("spell_sindragosa_frost_breath") { }
|
||||
|
||||
class spell_sindragosa_frost_breath_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_sindragosa_frost_breath_SpellScript);
|
||||
|
||||
void HandleInfusion()
|
||||
{
|
||||
Player* target = GetHitPlayer();
|
||||
if (!target)
|
||||
return;
|
||||
|
||||
if (target->GetQuestStatus(QUEST_FROST_INFUSION) != QUEST_STATUS_INCOMPLETE)
|
||||
return;
|
||||
|
||||
// Check if player has Shadow's Edge equipped and not ready for infusion
|
||||
if (!target->HasAura(SPELL_UNSATED_CRAVING) || target->HasAura(SPELL_FROST_IMBUED_BLADE))
|
||||
return;
|
||||
|
||||
Aura* infusion = target->GetAura(SPELL_FROST_INFUSION, target->GetGUID());
|
||||
if (infusion && infusion->GetStackAmount() >= 3)
|
||||
{
|
||||
target->RemoveAura(infusion);
|
||||
target->CastSpell(target, SPELL_FROST_IMBUED_BLADE, TRIGGERED_FULL_MASK);
|
||||
}
|
||||
else
|
||||
target->CastSpell(target, SPELL_FROST_INFUSION, TRIGGERED_FULL_MASK);
|
||||
}
|
||||
|
||||
void Register()
|
||||
{
|
||||
AfterHit += SpellHitFn(spell_sindragosa_frost_breath_SpellScript::HandleInfusion);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const
|
||||
{
|
||||
return new spell_sindragosa_frost_breath_SpellScript();
|
||||
}
|
||||
};
|
||||
|
||||
class spell_sindragosa_instability : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
@@ -1577,6 +1582,7 @@ void AddSC_boss_sindragosa()
|
||||
new npc_sindragosa_trash();
|
||||
new spell_sindragosa_s_fury();
|
||||
new spell_sindragosa_unchained_magic();
|
||||
new spell_sindragosa_frost_breath();
|
||||
new spell_sindragosa_instability();
|
||||
new spell_sindragosa_frost_beacon();
|
||||
new spell_sindragosa_ice_tomb();
|
||||
|
||||
@@ -56,6 +56,7 @@ enum SharedSpells
|
||||
SPELL_FROSTMOURNE_TELEPORT_VISUAL = 73078,
|
||||
|
||||
// Shadowmourne questline
|
||||
SPELL_UNSATED_CRAVING = 71168,
|
||||
SPELL_SHADOWS_FATE = 71169
|
||||
};
|
||||
|
||||
|
||||
@@ -435,7 +435,7 @@ class instance_icecrown_citadel : public InstanceMapScript
|
||||
// these 2 gates are functional only on 25man modes
|
||||
case GO_DOODAD_ICECROWN_ROOSTPORTCULLIS_01:
|
||||
case GO_DOODAD_ICECROWN_ROOSTPORTCULLIS_04:
|
||||
if (instance->GetSpawnMode() & 1)
|
||||
if (instance->Is25ManRaid())
|
||||
AddDoor(go, true);
|
||||
break;
|
||||
case GO_LADY_DEATHWHISPER_ELEVATOR:
|
||||
|
||||
@@ -813,7 +813,40 @@ class spell_item_scroll_of_recall : public SpellScriptLoader
|
||||
enum ShadowsFate
|
||||
{
|
||||
SPELL_SOUL_FEAST = 71203,
|
||||
QUEST_A_FEAST_OF_SOULS = 24547
|
||||
};
|
||||
|
||||
class spell_item_unsated_craving : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_item_unsated_craving() : SpellScriptLoader("spell_item_unsated_craving") { }
|
||||
|
||||
class spell_item_unsated_craving_AuraScript : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_item_unsated_craving_AuraScript);
|
||||
|
||||
bool CheckProc(ProcEventInfo& procInfo)
|
||||
{
|
||||
Unit* caster = procInfo.GetActor();
|
||||
if (!caster || caster->GetTypeId() != TYPEID_PLAYER)
|
||||
return false;
|
||||
|
||||
Unit* target = procInfo.GetActionTarget();
|
||||
if (!target || target->GetTypeId() != TYPEID_UNIT || target->GetCreatureType() == CREATURE_TYPE_CRITTER || target->isSummon())
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void Register()
|
||||
{
|
||||
DoCheckProc += AuraCheckProcFn(spell_item_unsated_craving_AuraScript::CheckProc);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const
|
||||
{
|
||||
return new spell_item_unsated_craving_AuraScript();
|
||||
}
|
||||
};
|
||||
|
||||
class spell_item_shadows_fate : public SpellScriptLoader
|
||||
@@ -825,41 +858,20 @@ class spell_item_shadows_fate : public SpellScriptLoader
|
||||
{
|
||||
PrepareAuraScript(spell_item_shadows_fate_AuraScript);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/)
|
||||
void HandleProc(ProcEventInfo& procInfo)
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_SOUL_FEAST))
|
||||
return false;
|
||||
if (!sObjectMgr->GetQuestTemplate(QUEST_A_FEAST_OF_SOULS))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
Unit* caster = procInfo.GetActor();
|
||||
Unit* target = GetCaster();
|
||||
if (!caster || !target)
|
||||
return;
|
||||
|
||||
bool Load()
|
||||
{
|
||||
_procTarget = NULL;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CheckProc(ProcEventInfo& /*eventInfo*/)
|
||||
{
|
||||
_procTarget = GetCaster();
|
||||
return _procTarget && _procTarget->GetTypeId() == TYPEID_PLAYER && _procTarget->ToPlayer()->GetQuestStatus(QUEST_A_FEAST_OF_SOULS) == QUEST_STATUS_INCOMPLETE;
|
||||
}
|
||||
|
||||
void HandleProc(AuraEffect const* /*aurEff*/, ProcEventInfo& /*eventInfo*/)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
GetTarget()->CastSpell(_procTarget, SPELL_SOUL_FEAST, true);
|
||||
caster->CastSpell(target, SPELL_SOUL_FEAST, TRIGGERED_FULL_MASK);
|
||||
}
|
||||
|
||||
void Register()
|
||||
{
|
||||
DoCheckProc += AuraCheckProcFn(spell_item_shadows_fate_AuraScript::CheckProc);
|
||||
OnEffectProc += AuraEffectProcFn(spell_item_shadows_fate_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_DUMMY);
|
||||
OnProc += AuraProcFn(spell_item_shadows_fate_AuraScript::HandleProc);
|
||||
}
|
||||
|
||||
private:
|
||||
Unit* _procTarget;
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const
|
||||
@@ -2481,6 +2493,7 @@ void AddSC_item_spell_scripts()
|
||||
new spell_item_piccolo_of_the_flaming_fire();
|
||||
new spell_item_savory_deviate_delight();
|
||||
new spell_item_scroll_of_recall();
|
||||
new spell_item_unsated_craving();
|
||||
new spell_item_shadows_fate();
|
||||
new spell_item_shadowmourne();
|
||||
new spell_item_shadowmourne_soul_fragment();
|
||||
|
||||
Reference in new issue
Block a user