mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-29 05:11:55 +01:00
DB/Quest: Rewrite 'Strengthen the Ancients' (#31131)
This commit is contained in:
29
sql/updates/world/3.3.5/2025_07_080_00_world.sql
Normal file
29
sql/updates/world/3.3.5/2025_07_080_00_world.sql
Normal file
@@ -0,0 +1,29 @@
|
||||
--
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid` = 26321 AND `source_type` = 0;
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid` = 2632100 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
|
||||
(26321,0,0,0,8,0,100,0,47530,0,0,0,0,80,2632100,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Lothalor Ancient - On Spellhit 'Bark of the Walkers' - Run Script"),
|
||||
|
||||
(2632100,9,0,0,0,0,100,0,0,0,0,0,0,1,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,"Lothalor Ancient - On Script - Say Line 0"),
|
||||
(2632100,9,1,0,0,0,100,0,0,0,0,0,0,66,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,"Lothalor Ancient - On Script - Set Orientation Invoker"),
|
||||
(2632100,9,2,0,0,0,100,0,0,0,0,0,0,33,26321,0,0,0,0,0,7,0,0,0,0,0,0,0,0,"Lothalor Ancient - On Script - Quest Credit 'Strengthen the Ancients'"),
|
||||
(2632100,9,3,0,0,0,100,0,5000,5000,0,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Lothalor Ancient - On Script - Despawn");
|
||||
|
||||
UPDATE `creature_template` SET `npcflag` = 16777216 WHERE `entry` = 26421;
|
||||
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid` = 26421 AND `source_type` = 0;
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid` IN (2642100,2642101) 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
|
||||
(26421,0,0,0,0,0,100,0,3000,6000,8000,12000,0,11,50994,32,0,0,0,0,1,0,0,0,0,0,0,0,0,"Woodlands Walker - In Combat - Cast 'Toughen Hide'"),
|
||||
(26421,0,1,0,8,0,100,0,47575,0,0,0,0,88,2642100,2642101,0,0,0,0,1,0,0,0,0,0,0,0,0,"Woodlands Walker - On Spellhit 'Strengthen the Ancients: On Interact Dummy to Woodlands Walker' - Run Random Script"),
|
||||
|
||||
(2642100,9,0,0,0,0,100,0,0,0,0,0,0,1,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,"Woodlands Walker - On Script - Say Line 0"),
|
||||
(2642100,9,1,0,0,0,100,0,0,0,0,0,0,2,14,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Woodlands Walker - On Script - Set Faction 14"),
|
||||
(2642100,9,2,0,0,0,100,0,0,0,0,0,0,49,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,"Woodlands Walker - On Script - Start Attack"),
|
||||
|
||||
(2642101,9,0,0,0,0,100,0,0,0,0,0,0,1,1,0,0,0,0,0,7,0,0,0,0,0,0,0,0,"Woodlands Walker - On Script - Say Line 1"),
|
||||
(2642101,9,1,0,0,0,100,0,0,0,0,0,0,66,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,"Woodlands Walker - On Script - Set Orientation Invoker"),
|
||||
(2642101,9,2,0,0,0,100,0,0,0,0,0,0,11,47550,0,0,0,0,0,7,0,0,0,0,0,0,0,0,"Woodlands Walker - On Script - Cast 'Create Bark of the Walkers'"),
|
||||
(2642101,9,3,0,0,0,100,0,7000,7000,0,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Woodlands Walker - On Script - Despawn");
|
||||
|
||||
DELETE FROM `spell_script_names` WHERE `ScriptName` IN ('spell_q12096_q12092_dummy','spell_q12096_q12092_bark');
|
||||
@@ -350,81 +350,6 @@ struct npc_commander_eligor_dawnbringer : public ScriptedAI
|
||||
uint8 talkWing;
|
||||
};
|
||||
|
||||
/*######
|
||||
## Quest Strengthen the Ancients (12096|12092)
|
||||
######*/
|
||||
|
||||
enum StrengthenAncientsMisc
|
||||
{
|
||||
SAY_WALKER_FRIENDLY = 0,
|
||||
SAY_WALKER_ENEMY = 1,
|
||||
SAY_LOTHALOR = 0,
|
||||
|
||||
SPELL_CREATE_ITEM_BARK = 47550,
|
||||
SPELL_CONFUSED = 47044,
|
||||
|
||||
NPC_LOTHALOR = 26321
|
||||
};
|
||||
|
||||
// 47575 - Strengthen the Ancients: On Interact Dummy to Woodlands Walker
|
||||
class spell_q12096_q12092_dummy : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_q12096_q12092_dummy);
|
||||
|
||||
void HandleDummy(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
uint32 roll = rand32() % 2;
|
||||
|
||||
Creature* tree = GetHitCreature();
|
||||
Player* player = GetCaster()->ToPlayer();
|
||||
|
||||
if (!tree || !player)
|
||||
return;
|
||||
|
||||
tree->RemoveNpcFlag(UNIT_NPC_FLAG_SPELLCLICK);
|
||||
|
||||
if (roll == 1) // friendly version
|
||||
{
|
||||
tree->CastSpell(player, SPELL_CREATE_ITEM_BARK);
|
||||
tree->AI()->Talk(SAY_WALKER_FRIENDLY, player);
|
||||
tree->DespawnOrUnsummon(1s);
|
||||
}
|
||||
else // enemy version
|
||||
{
|
||||
tree->AI()->Talk(SAY_WALKER_ENEMY, player);
|
||||
tree->SetFaction(FACTION_MONSTER);
|
||||
tree->Attack(player, true);
|
||||
}
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_q12096_q12092_dummy::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
|
||||
}
|
||||
};
|
||||
|
||||
// 47530 - Bark of the Walkers
|
||||
class spell_q12096_q12092_bark : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_q12096_q12092_bark);
|
||||
|
||||
void HandleDummy(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
Creature* lothalor = GetHitCreature();
|
||||
if (!lothalor || lothalor->GetEntry() != NPC_LOTHALOR)
|
||||
return;
|
||||
|
||||
lothalor->AI()->Talk(SAY_LOTHALOR);
|
||||
lothalor->RemoveAura(SPELL_CONFUSED);
|
||||
lothalor->DespawnOrUnsummon(4s);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_q12096_q12092_bark::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
|
||||
}
|
||||
};
|
||||
|
||||
/*######
|
||||
## Quest: Defending Wyrmrest Temple ID: 12372
|
||||
######*/
|
||||
@@ -1113,8 +1038,6 @@ class spell_dragonblight_end_of_the_line_quest_completion_script : public SpellS
|
||||
void AddSC_dragonblight()
|
||||
{
|
||||
RegisterCreatureAI(npc_commander_eligor_dawnbringer);
|
||||
RegisterSpellScript(spell_q12096_q12092_dummy);
|
||||
RegisterSpellScript(spell_q12096_q12092_bark);
|
||||
RegisterCreatureAI(npc_wyrmrest_defender);
|
||||
RegisterSpellScript(spell_dragonblight_defending_wyrmrest_temple_cast_from_gossip);
|
||||
RegisterSpellScript(spell_dragonblight_defending_wyrmrest_temple_dummy);
|
||||
|
||||
Reference in New Issue
Block a user