Scripts/Durotar: Handle phase aura application for Hellscream's Fist areatrigger (8595)

This commit is contained in:
Meji
2024-10-27 14:02:12 +01:00
parent 609d466ef8
commit a771f210a6
3 changed files with 36 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
DELETE FROM `areatrigger_scripts` WHERE `entry`=8595;
INSERT INTO `areatrigger_scripts` VALUES
(8595, 'at_hellscreams_fist_gunship');

View File

@@ -27,6 +27,14 @@
#include "PassiveAI.h"
#include "ObjectAccessor.h"
namespace Durotar
{
namespace Spells
{
static constexpr uint32 PhasePlayer = 130750;
}
}
/*######
## Quest 37446: Lazy Peons
## npc_lazy_peon
@@ -1211,6 +1219,27 @@ private:
ObjectGuid _brazierGUID;
};
// 8595 - Hellscream's Fist Gunship
class at_hellscreams_fist_gunship : public AreaTriggerScript
{
public:
at_hellscreams_fist_gunship() : AreaTriggerScript("at_hellscreams_fist_gunship") { }
bool OnTrigger(Player* player, AreaTriggerEntry const* /*areaTrigger*/) override
{
player->CastSpell(player, Durotar::Spells::PhasePlayer, CastSpellExtraArgsInit{
.TriggerFlags = TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR,
});
return true;
}
bool OnExit(Player* player, AreaTriggerEntry const* /*areaTrigger*/) override
{
player->RemoveAurasDueToSpell(Durotar::Spells::PhasePlayer);
return true;
}
};
void AddSC_durotar()
{
new npc_lazy_peon();
@@ -1251,4 +1280,7 @@ void AddSC_durotar()
new quest_proving_pit<NPC_TRAINER_ZABRAX>("quest_proving_pit_monk");
RegisterCreatureAI(npc_voljin_garrosh_vision);
RegisterCreatureAI(npc_voljin_thrall_vision);
// Hellscream's Fist
new at_hellscreams_fist_gunship();
}

View File

@@ -75,5 +75,6 @@ class spell_art_of_war_movie_aura : public AuraScript
void AddSC_orgrimmar()
{
// Grommash Hold
RegisterSpellScript(spell_art_of_war_movie_aura);
}