Skip to content

Commit

Permalink
Dragonblight: Add script for targeting of 51922 - Lapsing Dream
Browse files Browse the repository at this point in the history
  • Loading branch information
killerwife committed Dec 17, 2023
1 parent 0a34f23 commit a77ea14
Show file tree
Hide file tree
Showing 2 changed files with 16 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 @@ -803,6 +803,7 @@ INSERT INTO spell_scripts(Id, ScriptName) VALUES
(51858,'spell_siphon_of_acherus'),
(51859,'spell_siphon_of_acherus_aura'),
(51904,'spell_summon_ghouls_scarlet_crusade'),
(51922,'spell_lapsing_dream'),
(51973,'spell_siphon_of_acherus_credit'),
(51976,'spell_siphon_of_acherus_credit'),
(51979,'spell_siphon_of_acherus_credit'),
Expand Down
15 changes: 15 additions & 0 deletions src/game/AI/ScriptDevAI/scripts/northrend/dragonblight.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,20 @@ struct DropOffGnome : public SpellScript
}
};

// 51922 - Lapsing Dream
struct LapsingDream : public AuraScript
{
void OnPeriodicTrigger(Aura* aura, PeriodicTriggerData& data) const override
{
data.caster = aura->GetCaster();
if (!data.caster)
return;
if (WorldObject* dynGo = data.caster->GetDynObject(aura->GetId(), EFFECT_INDEX_0, aura->GetTarget()))
data.trueCaster = dynGo; // yes dyngo is caster and unit is supplementary caster
data.target = aura->GetTarget();
}
};

void AddSC_dragonblight()
{
Script* pNewScript = new Script;
Expand Down Expand Up @@ -493,4 +507,5 @@ void AddSC_dragonblight()
RegisterSpellScript<HourglassOfEternity>("spell_hourglass_of_eternity");
RegisterSpellScript<RescueVillager>("spell_rescue_villager");
RegisterSpellScript<DropOffGnome>("spell_drop_off_gnome");
RegisterSpellScript<LapsingDream>("spell_lapsing_dream");
}

0 comments on commit a77ea14

Please sign in to comment.