Scripts/Icecrown Citadel: Added support for weekly quest Residue Rendezvous

This commit is contained in:
Shauren
2011-02-19 14:43:36 +01:00
parent e918a7fd6d
commit 7e2ddb2fd3
12 changed files with 202 additions and 21 deletions
+19
View File
@@ -850,6 +850,7 @@ UPDATE `creature_template` SET `ScriptName`='npc_high_overlord_saurfang_icc' WHE
UPDATE `creature_template` SET `ScriptName`='npc_muradin_bronzebeard_icc' WHERE `entry`=37200;
UPDATE `creature_template` SET `ScriptName`='npc_saurfang_event' WHERE `entry` IN (37920,37830);
UPDATE `creature_template` SET `ScriptName`='npc_frost_freeze_trap' WHERE `entry`=37744;
UPDATE `creature_template` SET `ScriptName`='npc_alchemist_adrianna' WHERE `entry`=38501;
UPDATE `creature_template` SET `ScriptName`='boss_festergut' WHERE `entry`=36626;
UPDATE `creature_template` SET `ScriptName`='npc_stinky_icc' WHERE `entry`=37025;
UPDATE `creature_template` SET `ScriptName`='boss_rotface' WHERE `entry`=36627;
@@ -1915,6 +1916,8 @@ INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
( 72444, 'spell_deathbringer_mark_of_the_fallen_champion'),
( 72445, 'spell_deathbringer_mark_of_the_fallen_champion'),
( 72446, 'spell_deathbringer_mark_of_the_fallen_champion'),
( 72155, 'spell_icc_harvest_blight_specimen'),
( 72162, 'spell_icc_harvest_blight_specimen'),
( 71123, 'spell_stinky_precious_decimate'),
( 73032, 'spell_festergut_pungent_blight'),
( 73031, 'spell_festergut_pungent_blight'),
@@ -1928,6 +1931,18 @@ INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
( 71222, 'spell_festergut_blighted_spores'),
( 73033, 'spell_festergut_blighted_spores'),
( 73034, 'spell_festergut_blighted_spores'),
( 69159, 'spell_festergut_gaseous_blight'),
( 70135, 'spell_festergut_gaseous_blight'),
( 70136, 'spell_festergut_gaseous_blight'),
( 70137, 'spell_festergut_gaseous_blight'),
( 69161, 'spell_festergut_gaseous_blight'),
( 70138, 'spell_festergut_gaseous_blight'),
( 70139, 'spell_festergut_gaseous_blight'),
( 70140, 'spell_festergut_gaseous_blight'),
( 69163, 'spell_festergut_gaseous_blight'),
( 70468, 'spell_festergut_gaseous_blight'),
( 70469, 'spell_festergut_gaseous_blight'),
( 70470, 'spell_festergut_gaseous_blight'),
( 69782, 'spell_rotface_ooze_flood'),
( 69796, 'spell_rotface_ooze_flood'),
( 69798, 'spell_rotface_ooze_flood'),
@@ -1938,6 +1953,10 @@ INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
( 69839, 'spell_rotface_unstable_ooze_explosion_init'),
( 69832, 'spell_rotface_unstable_ooze_explosion'),
( 71441, 'spell_rotface_unstable_ooze_explosion_suicide'),
( 69507, 'spell_rotface_slime_spray'),
( 71213, 'spell_rotface_slime_spray'),
( 73189, 'spell_rotface_slime_spray'),
( 73190, 'spell_rotface_slime_spray'),
( 70701, 'spell_putricide_expunged_gas'),
( 70343, 'spell_putricide_slime_puddle'),
( 70351, 'spell_putricide_unstable_experiment'),
@@ -1,6 +1,6 @@
-- ICC Quest pools (also deletes old pool data)
SET @pool := 5662;
DELETE FROM `pool_quest` WHERE `pool_entry` BETWEEN @pool+18 AND @pool+22;
DELETE FROM `pool_quest` WHERE `pool_entry` BETWEEN @pool+17 AND @pool+22;
INSERT INTO `pool_quest` (`entry`,`pool_entry`,`description`) VALUES
(24874,@pool+17, 'Blood Quickening (10)'),
(24869,@pool+17, 'Deprogramming (10)'),
@@ -15,7 +15,7 @@ INSERT INTO `pool_quest` (`entry`,`pool_entry`,`description`) VALUES
(24876,@pool+20, 'Securing the Ramparts ALLY (25)'),
(24877,@pool+20, 'Securing the Ramparts HORDE (25)');
DELETE FROM `pool_template` WHERE `entry` BETWEEN @pool+18 AND @pool+22;
DELETE FROM `pool_template` WHERE `entry` BETWEEN @pool+17 AND @pool+22;
INSERT INTO `pool_template` (`entry`,`max_limit`,`description`) VALUES
(@pool+17,1, 'ICC weeklies (10)'),
(@pool+18,1, 'ICC weeklies (25)'),
@@ -0,0 +1,4 @@
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry` IN (72155,72162);
INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
(13,0,72155,0,18,1,0,0,0, '', 'Harvest Blight Specimen - player target'),
(13,0,72162,0,18,1,0,0,0, '', 'Harvest Blight Specimen - player target');
@@ -0,0 +1,2 @@
UPDATE `creature_template` SET `difficulty_entry_1`=38717 WHERE `entry`=38501;
UPDATE `creature_template` SET `minlevel`=80,`maxlevel`=80,`exp`=2,`unit_class`=1,`faction_A`=2070,`faction_H`=2070,`npcflag`=2,`dynamicflags`=8,`unit_flags`=33280,`unit_class`=8 WHERE `entry`=38717; -- Alchemist Adrianna (1)
@@ -0,0 +1 @@
UPDATE `creature_template` SET `ScriptName`='npc_alchemist_adrianna' WHERE `entry`=38501;
@@ -0,0 +1,22 @@
DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_icc_harvest_blight_specimen';
DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_festergut_gaseous_blight';
DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_rotface_slime_spray';
INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
(72155,'spell_icc_harvest_blight_specimen'),
(72162,'spell_icc_harvest_blight_specimen'),
(69159,'spell_festergut_gaseous_blight'),
(70135,'spell_festergut_gaseous_blight'),
(70136,'spell_festergut_gaseous_blight'),
(70137,'spell_festergut_gaseous_blight'),
(69161,'spell_festergut_gaseous_blight'),
(70138,'spell_festergut_gaseous_blight'),
(70139,'spell_festergut_gaseous_blight'),
(70140,'spell_festergut_gaseous_blight'),
(69163,'spell_festergut_gaseous_blight'),
(70468,'spell_festergut_gaseous_blight'),
(70469,'spell_festergut_gaseous_blight'),
(70470,'spell_festergut_gaseous_blight'),
(69507,'spell_rotface_slime_spray'),
(71213,'spell_rotface_slime_spray'),
(73189,'spell_rotface_slime_spray'),
(73190,'spell_rotface_slime_spray');
+1 -1
View File
@@ -7856,7 +7856,7 @@ void ObjectMgr::LoadQuestRelationsHelper(QuestRelations& map, std::string table,
if (mQuestTemplates.find(quest) == mQuestTemplates.end())
{
sLog->outErrorDb("Table `%s: Quest %u listed for entry %u does not exist.", table.c_str(), quest, id);
sLog->outErrorDb("Table `%s`: Quest %u listed for entry %u does not exist.", table.c_str(), quest, id);
continue;
}
@@ -463,6 +463,42 @@ class spell_festergut_blighted_spores : public SpellScriptLoader
}
};
class spell_festergut_gaseous_blight : public SpellScriptLoader
{
public:
spell_festergut_gaseous_blight() : SpellScriptLoader("spell_festergut_gaseous_blight") { }
class spell_festergut_gaseous_blight_SpellScript : public SpellScript
{
PrepareSpellScript(spell_festergut_gaseous_blight_SpellScript);
bool Validate(SpellEntry const* /*spell*/)
{
if (!sSpellStore.LookupEntry(SPELL_ORANGE_BLIGHT_RESIDUE))
return false;
return true;
}
void ExtraEffect()
{
if (GetHitUnit()->HasAura(SPELL_ORANGE_BLIGHT_RESIDUE))
return;
GetHitUnit()->CastSpell(GetHitUnit(), SPELL_ORANGE_BLIGHT_RESIDUE, true);
}
void Register()
{
AfterHit += SpellHitFn(spell_festergut_gaseous_blight_SpellScript::ExtraEffect);
}
};
SpellScript* GetSpellScript() const
{
return new spell_festergut_gaseous_blight_SpellScript();
}
};
class achievement_flu_shot_shortage : public AchievementCriteriaScript
{
public:
@@ -484,5 +520,6 @@ void AddSC_boss_festergut()
new spell_festergut_pungent_blight();
new spell_festergut_gastric_bloat();
new spell_festergut_blighted_spores();
new spell_festergut_gaseous_blight();
new achievement_flu_shot_shortage();
}
@@ -208,7 +208,7 @@ class boss_rotface : public CreatureScript
events.ScheduleEvent(EVENT_SLIME_SPRAY, 20000);
break;
case EVENT_HASTEN_INFECTIONS:
if (infectionStage < 4)
if (infectionStage++ < 4)
{
infectionCooldown -= 2000;
events.ScheduleEvent(EVENT_HASTEN_INFECTIONS, 90000);
@@ -722,6 +722,42 @@ class spell_rotface_unstable_ooze_explosion_suicide : public SpellScriptLoader
}
};
class spell_rotface_slime_spray : public SpellScriptLoader
{
public:
spell_rotface_slime_spray() : SpellScriptLoader("spell_rotface_slime_spray") { }
class spell_rotface_slime_spray_SpellScript : public SpellScript
{
PrepareSpellScript(spell_rotface_slime_spray_SpellScript);
bool Validate(SpellEntry const* /*spell*/)
{
if (!sSpellStore.LookupEntry(SPELL_GREEN_BLIGHT_RESIDUE))
return false;
return true;
}
void ExtraEffect()
{
if (GetHitUnit()->HasAura(SPELL_GREEN_BLIGHT_RESIDUE))
return;
GetHitUnit()->CastSpell(GetHitUnit(), SPELL_GREEN_BLIGHT_RESIDUE, true);
}
void Register()
{
AfterHit += SpellHitFn(spell_rotface_slime_spray_SpellScript::ExtraEffect);
}
};
SpellScript* GetSpellScript() const
{
return new spell_rotface_slime_spray_SpellScript();
}
};
void AddSC_boss_rotface()
{
new boss_rotface();
@@ -735,4 +771,5 @@ void AddSC_boss_rotface()
new spell_rotface_unstable_ooze_explosion_init();
new spell_rotface_unstable_ooze_explosion();
new spell_rotface_unstable_ooze_explosion_suicide();
new spell_rotface_slime_spray();
}
@@ -25,7 +25,7 @@
// Weekly quest support
//* Deprogramming (DONE)
//* Securing the Ramparts (DONE)
//* Residue Rendezvous
//* Residue Rendezvous (DONE)
//* Blood Quickening // AreaTrigger 5729 starts the timer, pulling BQ before it runs out means success
//* Respite for a Tormented Soul
@@ -38,15 +38,19 @@ enum Texts
enum Spells
{
// Rotting Frost Giant
SPELL_DEATH_PLAGUE = 72879,
SPELL_DEATH_PLAGUE_AURA = 72865,
SPELL_RECENTLY_INFECTED = 72884,
SPELL_DEATH_PLAGUE_KILL = 72867,
SPELL_STOMP = 64652,
SPELL_ARCTIC_BREATH = 72848,
SPELL_DEATH_PLAGUE = 72879,
SPELL_DEATH_PLAGUE_AURA = 72865,
SPELL_RECENTLY_INFECTED = 72884,
SPELL_DEATH_PLAGUE_KILL = 72867,
SPELL_STOMP = 64652,
SPELL_ARCTIC_BREATH = 72848,
// Frost Freeze Trap
SPELL_COLDFLAME_JETS = 70460,
SPELL_COLDFLAME_JETS = 70460,
// Alchemist Adrianna
SPELL_HARVEST_BLIGHT_SPECIMEN = 72155,
SPELL_HARVEST_BLIGHT_SPECIMEN25 = 72162,
};
enum Events
@@ -181,6 +185,20 @@ class npc_frost_freeze_trap : public CreatureScript
}
};
class npc_alchemist_adrianna : public CreatureScript
{
public:
npc_alchemist_adrianna() : CreatureScript("npc_alchemist_adrianna") { }
bool OnGossipHello(Player* player, Creature* creature)
{
if (!creature->FindCurrentSpellBySpellId(SPELL_HARVEST_BLIGHT_SPECIMEN) && !creature->FindCurrentSpellBySpellId(SPELL_HARVEST_BLIGHT_SPECIMEN25))
if (player->HasAura(SPELL_ORANGE_BLIGHT_RESIDUE) && player->HasAura(SPELL_GREEN_BLIGHT_RESIDUE))
creature->CastSpell(creature, SPELL_HARVEST_BLIGHT_SPECIMEN, false);
return false;
}
};
class DeathPlagueTargetSelector
{
public:
@@ -267,6 +285,39 @@ class spell_frost_giant_death_plague : public SpellScriptLoader
}
};
class spell_icc_harvest_blight_specimen : public SpellScriptLoader
{
public:
spell_icc_harvest_blight_specimen() : SpellScriptLoader("spell_icc_harvest_blight_specimen") { }
class spell_icc_harvest_blight_specimen_SpellScript : public SpellScript
{
PrepareSpellScript(spell_icc_harvest_blight_specimen_SpellScript);
void HandleScript(SpellEffIndex effIndex)
{
PreventHitDefaultEffect(effIndex);
GetHitUnit()->RemoveAurasDueToSpell(uint32(GetEffectValue()));
}
void HandleQuestComplete(SpellEffIndex effIndex)
{
GetHitUnit()->RemoveAurasDueToSpell(uint32(GetEffectValue()));
}
void Register()
{
OnEffect += SpellEffectFn(spell_icc_harvest_blight_specimen_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
OnEffect += SpellEffectFn(spell_icc_harvest_blight_specimen_SpellScript::HandleQuestComplete, EFFECT_1, SPELL_EFFECT_QUEST_COMPLETE);
}
};
SpellScript* GetSpellScript() const
{
return new spell_icc_harvest_blight_specimen_SpellScript();
}
};
class at_icc_saurfang_portal : public AreaTriggerScript
{
public:
@@ -318,7 +369,9 @@ void AddSC_icecrown_citadel()
{
new npc_rotting_frost_giant();
new npc_frost_freeze_trap();
new npc_alchemist_adrianna();
new spell_frost_giant_death_plague();
new spell_icc_harvest_blight_specimen();
new at_icc_saurfang_portal();
new at_icc_shutdown_traps();
}
@@ -20,11 +20,15 @@
#define ICCScriptName "instance_icecrown_citadel"
// Shared spells used by every boss
// Shared spells used by more than one script
enum SharedSpells
{
SPELL_BERSERK = 26662,
SPELL_BERSERK2 = 47008
SPELL_BERSERK = 26662,
SPELL_BERSERK2 = 47008,
// Residue Rendezvous
SPELL_ORANGE_BLIGHT_RESIDUE = 72144,
SPELL_GREEN_BLIGHT_RESIDUE = 72145,
};
enum TeleporterSpells
@@ -227,14 +227,16 @@ class instance_icecrown_citadel : public InstanceMapScript
case NPC_ALRIN_THE_AGILE:
case NPC_VALITHRIA_DREAMWALKER_QUEST:
{
uint8 questIndex = 0;
for (; questIndex < 5; ++questIndex)
for (uint8 questIndex = 0; questIndex < 5; ++questIndex)
{
if (WeeklyQuestData[questIndex].npcStart == entry)
{
uint8 diffIndex = instance->GetSpawnMode() & 1;
if (!sPoolMgr->IsSpawnedObject<Quest>(WeeklyQuestData[questIndex].questId[diffIndex]))
entry = 0;
break;
uint8 diffIndex = instance->GetSpawnMode() & 1;
if (!sPoolMgr->IsSpawnedObject<Quest>(WeeklyQuestData[questIndex].questId[diffIndex]))
entry = 0;
}
}
break;
}
default: