mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Scripts/Quest: Few updates to Zul'drak scripts (#27828)
(cherry picked from commit d0a703d1b9)
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
--
|
||||
DELETE FROM `spell_linked_spell` WHERE `spell_trigger` = -52010;
|
||||
|
||||
--
|
||||
UPDATE `gameobject_template` SET `AIName` = 'SmartGameObjectAI', `ScriptName` = '' WHERE `entry` = 191548;
|
||||
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid` = 191548 AND `source_type` = 1;
|
||||
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`event_param5`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_param4`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
|
||||
(191548,1,0,1,70,0,100,0,2,0,0,0,0,33,29928,0,0,0,0,0,7,0,0,0,0,0,0,0,0,"Scourge Enclosure - On Gameobject State Changed - Quest Credit 'Our Only Hope'"),
|
||||
(191548,1,1,2,61,0,100,0,0,0,0,0,0,45,0,1,0,0,0,0,19,29647,10,0,0,0,0,0,0,"Scourge Enclosure - On Gameobject State Changed - Set Data 0 1 (Gymer)"),
|
||||
(191548,1,2,0,61,0,100,0,0,0,0,0,0,45,0,1,0,0,0,0,11,29928,20,0,0,0,0,0,0,"Scourge Enclosure - On Gameobject State Changed - Set Data 0 1 (Gymer Lock Dummy)");
|
||||
|
||||
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 29928;
|
||||
UPDATE `creature` SET `wander_distance` = 0, `MovementType` = 0 WHERE `id` = 29928;
|
||||
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid` IN (-117883,-117884,-117885,-117886) AND `source_type` = 0;
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid` IN (2992800,2992801) AND `source_type` = 9;
|
||||
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`event_param5`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_param4`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
|
||||
(-117883,0,0,0,38,0,100,0,0,1,0,0,0,80,2992800,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Gymer Lock Dummy - On Data Set 0 1 - Run Script"),
|
||||
(-117885,0,0,0,38,0,100,0,0,1,0,0,0,80,2992800,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Gymer Lock Dummy - On Data Set 0 1 - Run Script"),
|
||||
(-117884,0,0,0,38,0,100,0,0,1,0,0,0,80,2992801,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Gymer Lock Dummy - On Data Set 0 1 - Run Script"),
|
||||
(-117886,0,0,0,38,0,100,0,0,1,0,0,0,80,2992801,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Gymer Lock Dummy - On Data Set 0 1 - Run Script"),
|
||||
|
||||
(2992800,9,0,0,0,0,100,0,0,0,0,0,0,11,55529,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Gymer Lock Dummy - On Script - Cast 'Gymer Lock Explosion'"),
|
||||
(2992801,9,0,0,0,0,100,0,0,0,0,0,0,11,55529,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Gymer Lock Dummy - On Script - Cast 'Gymer Lock Explosion'"),
|
||||
(2992801,9,1,0,0,0,100,0,2000,2000,0,0,0,11,55529,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Gymer Lock Dummy - On Script - Cast 'Gymer Lock Explosion'");
|
||||
|
||||
-- Gymer definitely doesn't yell when player turns in the quest, but after player opens the cage. However, he yells after random timer
|
||||
-- or (most likely) he yells right after player opens the cage, but if another action set was in progress(he also says out of combat),
|
||||
-- it makes him yell after delay
|
||||
UPDATE `smart_scripts` SET `event_type` = 38, `event_param1` = 0, `event_param2` = 1, `comment` = "Gymer - On Data Set 0 1 - Say Line 7" WHERE `entryorguid` = 29647 AND `source_type` = 0 AND `id` = 5;
|
||||
@@ -287,49 +287,6 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
/*######
|
||||
## Quest 12916: Our Only Hope!
|
||||
## go_scourge_enclosure
|
||||
######*/
|
||||
|
||||
enum ScourgeEnclosure
|
||||
{
|
||||
QUEST_OUR_ONLY_HOPE = 12916,
|
||||
NPC_GYMER_DUMMY = 29928, // From quest template
|
||||
SPELL_GYMER_LOCK_EXPLOSION = 55529
|
||||
};
|
||||
|
||||
class go_scourge_enclosure : public GameObjectScript
|
||||
{
|
||||
public:
|
||||
go_scourge_enclosure() : GameObjectScript("go_scourge_enclosure") { }
|
||||
|
||||
struct go_scourge_enclosureAI : public GameObjectAI
|
||||
{
|
||||
go_scourge_enclosureAI(GameObject* go) : GameObjectAI(go) { }
|
||||
|
||||
bool OnGossipHello(Player* player) override
|
||||
{
|
||||
me->UseDoorOrButton();
|
||||
if (player->GetQuestStatus(QUEST_OUR_ONLY_HOPE) == QUEST_STATUS_INCOMPLETE)
|
||||
{
|
||||
if (Creature* gymerDummy = me->FindNearestCreature(NPC_GYMER_DUMMY, 20.0f))
|
||||
{
|
||||
player->KilledMonsterCredit(gymerDummy->GetEntry(), gymerDummy->GetGUID());
|
||||
gymerDummy->CastSpell(gymerDummy, SPELL_GYMER_LOCK_EXPLOSION, true);
|
||||
gymerDummy->DespawnOrUnsummon(4s);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
GameObjectAI* GetAI(GameObject* go) const override
|
||||
{
|
||||
return new go_scourge_enclosureAI(go);
|
||||
}
|
||||
};
|
||||
|
||||
/*######
|
||||
## Quest: Troll Patrol: The Alchemist's Apprentice
|
||||
######*/
|
||||
@@ -1024,9 +981,15 @@ class spell_scourge_disguise_expiring : public AuraScript
|
||||
player->Unit::Whisper(TEXT_DISGUISE_WARNING, player, true);
|
||||
}
|
||||
|
||||
void AfterRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
GetTarget()->RemoveAurasDueToSpell(SPELL_SCOURGE_DISGUISE);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectApply += AuraEffectApplyFn(spell_scourge_disguise_expiring::OnApply, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
|
||||
AfterEffectRemove += AuraEffectRemoveFn(spell_scourge_disguise_expiring::AfterRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1070,7 +1033,7 @@ class spell_cocooned_not_on_quest : public SpellScript
|
||||
|
||||
void HandleDummy(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
GetHitUnit()->CastSpell(GetCaster(), SPELL_SUMMON_SCOURGED_CAPTIVE, true);
|
||||
GetHitUnit()->CastSpell(GetCaster(), SPELL_SUMMON_SCOURGED_CAPTIVE);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
@@ -1091,13 +1054,7 @@ class spell_cocooned_on_quest : public SpellScript
|
||||
|
||||
void HandleDummy(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
Unit* caster = GetCaster();
|
||||
Unit* target = GetHitUnit();
|
||||
|
||||
if (roll_chance_i(66))
|
||||
target->CastSpell(caster, SPELL_SUMMON_SCOURGED_CAPTIVE, true);
|
||||
else
|
||||
target->CastSpell(caster, SPELL_SUMMON_CAPTIVE_FOOTMAN, true);
|
||||
GetHitUnit()->CastSpell(GetCaster(), roll_chance_i(66) ? SPELL_SUMMON_SCOURGED_CAPTIVE : SPELL_SUMMON_CAPTIVE_FOOTMAN);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
@@ -1112,7 +1069,6 @@ void AddSC_zuldrak()
|
||||
new npc_captured_rageclaw();
|
||||
new npc_released_offspring_harkoa();
|
||||
new npc_crusade_recruit();
|
||||
new go_scourge_enclosure();
|
||||
new npc_alchemist_finklestein();
|
||||
new go_finklesteins_cauldron();
|
||||
new spell_random_ingredient_aura();
|
||||
|
||||
Reference in New Issue
Block a user