Skip to content

Commit

Permalink
BRD: Implement s.27673
Browse files Browse the repository at this point in the history
  • Loading branch information
killerwife committed Oct 7, 2023
1 parent fbf9a82 commit 9b46b0a
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
1 change: 1 addition & 0 deletions sql/scriptdev2/spell.sql
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ INSERT INTO spell_scripts(Id, ScriptName) VALUES
(26767,'spell_cthun_tentacles_summon'),
(26769,'spell_cthun_periodic_eye_trigger'),
(27360,'spell_instill_lord_valthalaks_spirit'),
(27673,'spell_five_fat_finger_exploding_heart_technique'),
(28006,'spell_arcane_cloaking'),
(27808,'spell_kel_thuzad_frost_blast'),
(27934,'spell_viscidus_shrinks'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1898,6 +1898,31 @@ UnitAI* GetAI_npc_ironhand_guardian(Creature* creature)
return new npc_ironhand_guardianAI(creature);
}

// 27673 - Five Fat Finger Exploding Heart Technique
struct FiveFatFingerExplodingHeartTechnique : public AuraScript
{
struct FatFingerStorage : public ScriptStorage
{
Position pos;
};

void OnAuraInit(Aura* aura) const override
{
FatFingerStorage* storage = new FatFingerStorage();
storage->pos = aura->GetTarget()->GetPosition();
aura->SetScriptStorage(storage);
}

void OnPeriodicTrigger(Aura* aura, PeriodicTriggerData& data) const override
{
if (aura->GetStackAmount() < 5)
return;
// 5 steps 5 yards?
if (static_cast<FatFingerStorage*>(aura->GetScriptStorage())->pos.GetDistance(aura->GetTarget()->GetPosition()) >= 5.f)
data.spellInfo = sSpellTemplate.LookupEntry<SpellEntry>(27676); // Exploding Heart
}
};

void AddSC_blackrock_depths()
{
Script* pNewScript = new Script;
Expand Down Expand Up @@ -1997,4 +2022,6 @@ void AddSC_blackrock_depths()
pNewScript->Name = "npc_ironhand_guardian";
pNewScript->GetAI = &GetAI_npc_ironhand_guardian;
pNewScript->RegisterSelf();

RegisterSpellScript<FiveFatFingerExplodingHeartTechnique>("spell_five_fat_finger_exploding_heart_technique");
}

0 comments on commit 9b46b0a

Please sign in to comment.