fix(Scripts/Midsummer): Correct behavior for Striking Back quests. (#18171)
* Init. Make use of spell for summoning Ahune's lieutenants, set up gossip/smart scripts for the cast and lieutenant summon speech, and remove permanent lieutenant spawns. Partially cherry-picked from https://github.com/cmangos/mangos-wotlk/commit/91268f6631e142a0d36e3e4a78ba82e1f84a0206 Co-Authored-By: Xfurry <172444+xfurry@users.noreply.github.com> * Use GUIDs for creature delete, add game_event_creature delete. * Various adjustments. Move comment block, add Desolace stones gossip menu options, add a delete before insert. * Set up conditions. * Add spell cast comments. Sourced from Wrath Classic Wowhead. * Add basic combat SmartAI. * Remove comment block. * Add creature name comments. * Use `id1` in preparatory creature delete. --------- Co-authored-by: Xfurry <172444+xfurry@users.noreply.github.com>
This commit is contained in:
@@ -1195,6 +1195,49 @@ class spell_midsummer_torch_catch : public SpellScript
|
||||
}
|
||||
};
|
||||
|
||||
// 46592 - Summon Ahune Lieutenant
|
||||
class spell_midsummer_summon_ahune_lieutenant : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_midsummer_summon_ahune_lieutenant);
|
||||
|
||||
void HandleDummy(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
Unit* caster = GetCaster();
|
||||
uint32 zoneId = caster->GetZoneId();
|
||||
uint32 npcEntry = 0;
|
||||
|
||||
switch (zoneId)
|
||||
{
|
||||
case 331: // Ashenvale
|
||||
npcEntry = 26116; // Frostwave Lieutenant
|
||||
break;
|
||||
case 405: // Desolace
|
||||
npcEntry = 26178; // Hailstone Lieutenant
|
||||
break;
|
||||
case 33: // Stranglethorn Vale
|
||||
npcEntry = 26204; // Chillwind Lieutenant
|
||||
break;
|
||||
case 51: // Searing Gorge
|
||||
npcEntry = 26214; // Frigid Lieutenant
|
||||
break;
|
||||
case 1377: // Silithus
|
||||
npcEntry = 26215; // Glacial Lieutenant
|
||||
break;
|
||||
case 3483: // Hellfire Peninsula
|
||||
npcEntry = 26216; // Glacial Templar
|
||||
break;
|
||||
}
|
||||
|
||||
if (npcEntry)
|
||||
caster->SummonCreature(npcEntry, caster->GetPosition(), TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, MINUTE * IN_MILLISECONDS);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectHit += SpellEffectFn(spell_midsummer_summon_ahune_lieutenant::HandleDummy, EFFECT_1, SPELL_EFFECT_APPLY_AURA);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_event_midsummer_scripts()
|
||||
{
|
||||
// Player
|
||||
@@ -1215,5 +1258,6 @@ void AddSC_event_midsummer_scripts()
|
||||
RegisterSpellScript(spell_midsummer_fling_torch);
|
||||
RegisterSpellScript(spell_midsummer_juggling_torch);
|
||||
RegisterSpellScript(spell_midsummer_torch_catch);
|
||||
RegisterSpellScript(spell_midsummer_summon_ahune_lieutenant);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user