Skip to content

Commit

Permalink
Spell: Summon Tournament Aspirant
Browse files Browse the repository at this point in the history
Fixed
63791 - Summon Tournament Hawkstrider (Aspirant)
63792 - Summon Tournament Steed (Aspirant)
  • Loading branch information
Grz3s committed Jan 19, 2025
1 parent 88efd7f commit 4f8f4af
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sql/scriptdev2/spell.sql
Original file line number Diff line number Diff line change
Expand Up @@ -989,6 +989,8 @@ INSERT INTO spell_scripts(Id, ScriptName) VALUES
(63474,'spell_ignis_scorch'),
(63482,'spell_lightning_whirl_heroic'),
(63499,'spell_hodir_dispel_magic'),
(63791,'spell_summon_tournament_aspirant'),
(63792,'spell_summon_tournament_aspirant'),
(63845,'spell_create_lance'),
(64203,'spell_void_zone_xt'),
(64209,'spell_consumption_xt'),
Expand Down
30 changes: 30 additions & 0 deletions src/game/AI/ScriptDevAI/scripts/northrend/icecrown.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1420,6 +1420,35 @@ struct npc_lithe_stalker : public PetAI
}
};

// 63791 - Summon Tournament Hawkstrider (Aspirant)
// 63792 - Summon Tournament Steed (Aspirant)
struct SummonTournamentAspirant : public SpellScript, public AuraScript
{
SpellCastResult OnCheckCast(Spell* spell, bool /*strict*/) const override
{
if (spell->GetCaster()->IsPlayer())
{
// Player must have aura from equiped item
Player* player = static_cast<Player*>(spell->GetCaster());
if (!player->HasAura(62853))
{
return SPELL_FAILED_EQUIPPED_ITEM;
}
}

return SPELL_CAST_OK;
}

void OnSpellCastResultOverride(SpellCastResult& result, uint32& param1, uint32& param2) const override
{
if (result == SPELL_FAILED_EQUIPPED_ITEM)
{
result = SPELL_FAILED_CUSTOM_ERROR;
param1 = SPELL_FAILED_CUSTOM_ERROR_60;
}
}
};

void AddSC_icecrown()
{
Script* pNewScript = new Script;
Expand Down Expand Up @@ -1489,4 +1518,5 @@ void AddSC_icecrown()
RegisterSpellScript<IronChain>("spell_iron_chain");
RegisterSpellScript<SummonOminousCloud>("spell_summon_ominous_cloud");
RegisterSpellScript<SubduedLitheStalker>("spell_subdued_lithe_stalker");
RegisterSpellScript<SummonTournamentAspirant>("spell_summon_tournament_aspirant");
}

0 comments on commit 4f8f4af

Please sign in to comment.