Skip to content

Commit 887fcbc

Browse files
committed
Scripts/Spells: Removed unneccessary hacks - reagent consumption by triggered spells fixed in 54a83b4
1 parent 54a83b4 commit 887fcbc

File tree

5 files changed

+1
-110
lines changed

5 files changed

+1
-110
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
DELETE FROM `spell_script_names` WHERE `ScriptName` IN ('spell_brewfest_relay_race_intro_force_player_to_throw','spell_silithus_summon_cultist_periodic','spell_hor_quel_delars_will','spell_kaelthas_remove_weapons');

src/server/scripts/Events/brewfest.cpp

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -205,23 +205,6 @@ class spell_brewfest_exhausted_ram : public AuraScript
205205
}
206206
};
207207

208-
// 43714 - Brewfest - Relay Race - Intro - Force - Player to throw- DND
209-
class spell_brewfest_relay_race_intro_force_player_to_throw : public SpellScript
210-
{
211-
void HandleForceCast(SpellEffIndex effIndex)
212-
{
213-
PreventHitDefaultEffect(effIndex);
214-
// All this spells trigger a spell that requires reagents; if the
215-
// triggered spell is cast as "triggered", reagents are not consumed
216-
GetHitUnit()->CastSpell(nullptr, GetEffectInfo().TriggerSpell, TRIGGERED_FULL_MASK & ~TRIGGERED_IGNORE_REAGENT_COST);
217-
}
218-
219-
void Register() override
220-
{
221-
OnEffectHitTarget += SpellEffectFn(spell_brewfest_relay_race_intro_force_player_to_throw::HandleForceCast, EFFECT_0, SPELL_EFFECT_FORCE_CAST);
222-
}
223-
};
224-
225208
// 43755 - Brewfest - Daily - Relay Race - Player - Increase Mount Duration - DND
226209
class spell_brewfest_relay_race_turn_in : public SpellScript
227210
{
@@ -634,7 +617,6 @@ void AddSC_event_brewfest()
634617
RegisterSpellScript(spell_brewfest_ram_fatigue);
635618
RegisterSpellScript(spell_brewfest_apple_trap);
636619
RegisterSpellScript(spell_brewfest_exhausted_ram);
637-
RegisterSpellScript(spell_brewfest_relay_race_intro_force_player_to_throw);
638620
RegisterSpellScript(spell_brewfest_relay_race_turn_in);
639621
RegisterSpellScript(spell_brewfest_dismount_ram);
640622
RegisterSpellScript(spell_brewfest_barker_bunny);

src/server/scripts/Kalimdor/zone_silithus.cpp

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@ EndContentData */
4444
#include "Player.h"
4545
#include "ScriptedCreature.h"
4646
#include "ScriptedGossip.h"
47-
#include "SpellAuraEffects.h"
48-
#include "SpellScript.h"
4947
#include "TemporarySummon.h"
5048

5149
/*#####
@@ -1430,50 +1428,11 @@ class go_wind_stone : public GameObjectScript
14301428
}
14311429
};
14321430

1433-
// 24745 - Summon Templar, Trigger
1434-
// 24747 - Summon Templar Fire, Trigger
1435-
// 24757 - Summon Templar Air, Trigger
1436-
// 24759 - Summon Templar Earth, Trigger
1437-
// 24761 - Summon Templar Water, Trigger
1438-
// 24762 - Summon Duke, Trigger
1439-
// 24766 - Summon Duke Fire, Trigger
1440-
// 24769 - Summon Duke Air, Trigger
1441-
// 24771 - Summon Duke Earth, Trigger
1442-
// 24773 - Summon Duke Water, Trigger
1443-
// 24785 - Summon Royal, Trigger
1444-
// 24787 - Summon Royal Fire, Trigger
1445-
// 24791 - Summon Royal Air, Trigger
1446-
// 24792 - Summon Royal Earth, Trigger
1447-
// 24793 - Summon Royal Water, Trigger
1448-
// 46595 - Summon Ice Stone Lieutenant, Trigger
1449-
class spell_silithus_summon_cultist_periodic : public AuraScript
1450-
{
1451-
bool Validate(SpellInfo const* spellInfo) override
1452-
{
1453-
return ValidateSpellEffect({ { spellInfo->Id, EFFECT_0 } }) && ValidateSpellInfo({ spellInfo->GetEffect(EFFECT_0).TriggerSpell });
1454-
}
1455-
1456-
void PeriodicTick(AuraEffect const* aurEff)
1457-
{
1458-
PreventDefaultAction();
1459-
1460-
// All these spells trigger a spell that requires reagents; if the
1461-
// triggered spell is cast as "triggered", reagents are not consumed
1462-
GetTarget()->CastSpell(nullptr, aurEff->GetSpellEffectInfo().TriggerSpell, CastSpellExtraArgs(TRIGGERED_FULL_MASK & ~TRIGGERED_IGNORE_REAGENT_COST).SetTriggeringAura(aurEff));
1463-
}
1464-
1465-
void Register() override
1466-
{
1467-
OnEffectPeriodic += AuraEffectPeriodicFn(spell_silithus_summon_cultist_periodic::PeriodicTick, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
1468-
}
1469-
};
1470-
14711431
void AddSC_silithus()
14721432
{
14731433
new go_crystalline_tear();
14741434
new npc_anachronos_quest_trigger();
14751435
new npc_anachronos_the_ancient();
14761436
new npc_qiraj_war_spawn();
14771437
new go_wind_stone();
1478-
RegisterSpellScript(spell_silithus_summon_cultist_periodic);
14791438
}

src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2829,28 +2829,6 @@ class spell_hor_gunship_cannon_fire : public SpellScriptLoader
28292829
}
28302830
};
28312831

2832-
// 70698 - Quel'Delar's Will
2833-
class spell_hor_quel_delars_will : public SpellScript
2834-
{
2835-
bool Validate(SpellInfo const* spellInfo) override
2836-
{
2837-
return ValidateSpellEffect({ { spellInfo->Id, EFFECT_0 } }) && ValidateSpellInfo({ spellInfo->GetEffect(EFFECT_0).TriggerSpell });
2838-
}
2839-
2840-
void HandleReagent(SpellEffIndex effIndex)
2841-
{
2842-
PreventHitDefaultEffect(effIndex);
2843-
2844-
// dummy spell consumes reagent, don't ignore it
2845-
GetHitUnit()->CastSpell(GetCaster(), GetEffectInfo().TriggerSpell, TRIGGERED_FULL_MASK & ~TRIGGERED_IGNORE_REAGENT_COST);
2846-
}
2847-
2848-
void Register() override
2849-
{
2850-
OnEffectHitTarget += SpellEffectFn(spell_hor_quel_delars_will::HandleReagent, EFFECT_0, SPELL_EFFECT_FORCE_CAST);
2851-
}
2852-
};
2853-
28542832
void AddSC_halls_of_reflection()
28552833
{
28562834
new at_hor_intro_start();
@@ -2877,5 +2855,4 @@ void AddSC_halls_of_reflection()
28772855
new spell_hor_start_halls_of_reflection_quest_ae();
28782856
new spell_hor_evasion();
28792857
new spell_hor_gunship_cannon_fire();
2880-
RegisterSpellScript(spell_hor_quel_delars_will);
28812858
}

src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -280,12 +280,6 @@ constexpr uint32 SummonWeaponsSpells[] =
280280
SPELL_SUMMON_WEAPONE, SPELL_SUMMON_WEAPONF, SPELL_SUMMON_WEAPONG
281281
};
282282

283-
constexpr uint32 RemoveWeaponsSpells[] =
284-
{
285-
SPELL_REMOVE_WEAPONA, SPELL_REMOVE_WEAPONB, SPELL_REMOVE_WEAPONC, SPELL_REMOVE_WEAPOND,
286-
SPELL_REMOVE_WEAPONE, SPELL_REMOVE_WEAPONF, SPELL_REMOVE_WEAPONG
287-
};
288-
289283
constexpr uint32 GravityLapseSpells[] =
290284
{
291285
SPELL_GRAVITY_LAPSE_TELE_FRONT,
@@ -1383,27 +1377,6 @@ class spell_kaelthas_summon_weapons : public SpellScript
13831377
}
13841378
};
13851379

1386-
// 39497 - Remove Enchanted Weapons
1387-
class spell_kaelthas_remove_weapons : public SpellScript
1388-
{
1389-
bool Validate(SpellInfo const* /*spellInfo*/) override
1390-
{
1391-
return ValidateSpellInfo(RemoveWeaponsSpells);
1392-
}
1393-
1394-
void HandleScript(SpellEffIndex /*effIndex*/)
1395-
{
1396-
if (Player* player = GetHitPlayer())
1397-
for (uint32 spells : RemoveWeaponsSpells)
1398-
player->CastSpell(player, spells, TRIGGERED_FULL_MASK & ~TRIGGERED_IGNORE_REAGENT_COST);
1399-
}
1400-
1401-
void Register() override
1402-
{
1403-
OnEffectHitTarget += SpellEffectFn(spell_kaelthas_remove_weapons::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
1404-
}
1405-
};
1406-
14071380
void AddSC_boss_kaelthas()
14081381
{
14091382
RegisterTheEyeCreatureAI(boss_kaelthas);
@@ -1417,5 +1390,4 @@ void AddSC_boss_kaelthas()
14171390
RegisterSpellScript(spell_kael_gravity_lapse);
14181391
RegisterSpellScript(spell_kaelthas_flame_strike);
14191392
RegisterSpellScript(spell_kaelthas_summon_weapons);
1420-
RegisterSpellScript(spell_kaelthas_remove_weapons);
14211393
}

0 commit comments

Comments
 (0)