Scripts/Spells: Get rid of several DB spell scripts
Port From (https://github.com/TrinityCore/TrinityCore/commit/6fb332d935ebe84b5728d5496173c8b7109e08db)
This commit is contained in:
@@ -140,6 +140,9 @@ namespace Scripts.Spells.Items
|
|||||||
public const uint InvigorationEnergyHero = 71887;
|
public const uint InvigorationEnergyHero = 71887;
|
||||||
public const uint InvigorationManaHero = 71888;
|
public const uint InvigorationManaHero = 71888;
|
||||||
|
|
||||||
|
//HourglassSand
|
||||||
|
public const uint BroodAfflictionBronze = 23170;
|
||||||
|
|
||||||
//Makeawish
|
//Makeawish
|
||||||
public const uint MrPinchysBlessing = 33053;
|
public const uint MrPinchysBlessing = 33053;
|
||||||
public const uint SummonMightyMrPinchy = 33057;
|
public const uint SummonMightyMrPinchy = 33057;
|
||||||
@@ -308,6 +311,10 @@ namespace Scripts.Spells.Items
|
|||||||
//Impaleleviroth
|
//Impaleleviroth
|
||||||
public const uint LevirothSelfImpale = 49882;
|
public const uint LevirothSelfImpale = 49882;
|
||||||
|
|
||||||
|
//LifegivingGem
|
||||||
|
public const uint GiftOfLife1 = 23782;
|
||||||
|
public const uint GiftOfLife2 = 23783;
|
||||||
|
|
||||||
//Nitroboots
|
//Nitroboots
|
||||||
public const uint NitroBoostsSuccess = 54861;
|
public const uint NitroBoostsSuccess = 54861;
|
||||||
public const uint NitroBoostsBackfire = 46014;
|
public const uint NitroBoostsBackfire = 46014;
|
||||||
@@ -1479,6 +1486,25 @@ namespace Scripts.Spells.Items
|
|||||||
uint _rpSpellId;
|
uint _rpSpellId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Script] // 23645 - Hourglass Sand
|
||||||
|
class spell_item_hourglass_sand : SpellScript
|
||||||
|
{
|
||||||
|
public override bool Validate(SpellInfo spellInfo)
|
||||||
|
{
|
||||||
|
return ValidateSpellInfo(SpellIds.BroodAfflictionBronze);
|
||||||
|
}
|
||||||
|
|
||||||
|
void HandleDummy(uint effIndex)
|
||||||
|
{
|
||||||
|
GetCaster().RemoveAurasDueToSpell(SpellIds.BroodAfflictionBronze);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Register()
|
||||||
|
{
|
||||||
|
OnEffectHit.Add(new EffectHandler(HandleDummy, 0, SpellEffectName.Dummy));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[Script] // 40971 - Bonus Healing (Crystal Spire of Karabor)
|
[Script] // 40971 - Bonus Healing (Crystal Spire of Karabor)
|
||||||
class spell_item_crystal_spire_of_karabor : AuraScript
|
class spell_item_crystal_spire_of_karabor : AuraScript
|
||||||
{
|
{
|
||||||
@@ -2806,6 +2832,27 @@ namespace Scripts.Spells.Items
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Script] // 23725 - Gift of Life
|
||||||
|
class spell_item_lifegiving_gem : SpellScript
|
||||||
|
{
|
||||||
|
public override bool Validate(SpellInfo spellInfo)
|
||||||
|
{
|
||||||
|
return ValidateSpellInfo(SpellIds.GiftOfLife1, SpellIds.GiftOfLife2);
|
||||||
|
}
|
||||||
|
|
||||||
|
void HandleDummy(uint effIndex)
|
||||||
|
{
|
||||||
|
Unit caster = GetCaster();
|
||||||
|
caster.CastSpell(caster, SpellIds.GiftOfLife1, true);
|
||||||
|
caster.CastSpell(caster, SpellIds.GiftOfLife2, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Register()
|
||||||
|
{
|
||||||
|
OnEffectHit.Add(new EffectHandler(HandleDummy, 0, SpellEffectName.Dummy));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[Script]
|
[Script]
|
||||||
class spell_item_nitro_boosts : SpellScript
|
class spell_item_nitro_boosts : SpellScript
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -161,6 +161,18 @@ namespace Scripts.Spells.Quest
|
|||||||
public const uint TameElderSpringpaw1 = 30103;
|
public const uint TameElderSpringpaw1 = 30103;
|
||||||
public const uint TameMistbat1 = 30104;
|
public const uint TameMistbat1 = 30104;
|
||||||
|
|
||||||
|
//TributeSpells
|
||||||
|
public const uint GromsTrollTribute = 24101;
|
||||||
|
public const uint GromsTaurenTribute = 24102;
|
||||||
|
public const uint GromsUndeadTribute = 24103;
|
||||||
|
public const uint GromsOrcTribute = 24104;
|
||||||
|
public const uint GromsBloodelfTribute = 69530;
|
||||||
|
public const uint UthersHumanTribute = 24105;
|
||||||
|
public const uint UthersGnomeTribute = 24106;
|
||||||
|
public const uint UthersDwarfTribute = 24107;
|
||||||
|
public const uint UthersNightelfTribute = 24108;
|
||||||
|
public const uint UthersDraeneiTribute = 69533;
|
||||||
|
|
||||||
//Escapefromsilverbrook
|
//Escapefromsilverbrook
|
||||||
public const uint SummonWorgen = 48681;
|
public const uint SummonWorgen = 48681;
|
||||||
|
|
||||||
@@ -1375,6 +1387,47 @@ namespace Scripts.Spells.Quest
|
|||||||
OnEffectHitTarget.Add(new EffectHandler(HandleScriptEffect, 0, SpellEffectName.ScriptEffect));
|
OnEffectHitTarget.Add(new EffectHandler(HandleScriptEffect, 0, SpellEffectName.ScriptEffect));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 24194 - Uther's Tribute
|
||||||
|
[Script] // 24195 - Grom's Tribute
|
||||||
|
class spell_quest_uther_grom_tribute : SpellScript
|
||||||
|
{
|
||||||
|
public override bool Validate(SpellInfo spellInfo)
|
||||||
|
{
|
||||||
|
return ValidateSpellInfo(SpellIds.GromsTrollTribute, SpellIds.GromsTaurenTribute, SpellIds.GromsUndeadTribute, SpellIds.GromsOrcTribute, SpellIds.GromsBloodelfTribute,
|
||||||
|
SpellIds.UthersHumanTribute, SpellIds.UthersGnomeTribute, SpellIds.UthersDwarfTribute, SpellIds.UthersNightelfTribute, SpellIds.UthersDraeneiTribute);
|
||||||
|
}
|
||||||
|
|
||||||
|
void HandleScript(uint effIndex)
|
||||||
|
{
|
||||||
|
Player caster = GetCaster().ToPlayer();
|
||||||
|
if (!caster)
|
||||||
|
return;
|
||||||
|
|
||||||
|
uint spell = caster.GetRace() switch
|
||||||
|
{
|
||||||
|
Race.Troll => SpellIds.GromsTrollTribute,
|
||||||
|
Race.Tauren => SpellIds.GromsTaurenTribute,
|
||||||
|
Race.Undead => SpellIds.GromsUndeadTribute,
|
||||||
|
Race.Orc => SpellIds.GromsOrcTribute,
|
||||||
|
Race.BloodElf => SpellIds.GromsBloodelfTribute,
|
||||||
|
Race.Human => SpellIds.UthersHumanTribute,
|
||||||
|
Race.Gnome => SpellIds.UthersGnomeTribute,
|
||||||
|
Race.Dwarf => SpellIds.UthersDwarfTribute,
|
||||||
|
Race.NightElf => SpellIds.UthersNightelfTribute,
|
||||||
|
Race.Draenei => SpellIds.UthersDraeneiTribute,
|
||||||
|
_ => 0
|
||||||
|
};
|
||||||
|
|
||||||
|
if (spell != 0)
|
||||||
|
caster.CastSpell(caster, spell);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Register()
|
||||||
|
{
|
||||||
|
OnEffectHit.Add(new EffectHandler(HandleScript, 0, SpellEffectName.ScriptEffect));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[Script] // 48682 - Escape from Silverbrook - Periodic Dummy
|
[Script] // 48682 - Escape from Silverbrook - Periodic Dummy
|
||||||
class spell_q12308_escape_from_silverbrook : SpellScript
|
class spell_q12308_escape_from_silverbrook : SpellScript
|
||||||
@@ -1394,7 +1447,6 @@ namespace Scripts.Spells.Quest
|
|||||||
OnEffectHit.Add(new EffectHandler(HandleDummy, 0, SpellEffectName.Dummy));
|
OnEffectHit.Add(new EffectHandler(HandleDummy, 0, SpellEffectName.Dummy));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
[Script] // 48681 - Summon Silverbrook Worgen
|
[Script] // 48681 - Summon Silverbrook Worgen
|
||||||
class spell_q12308_escape_from_silverbrook_summon_worgen : SpellScript
|
class spell_q12308_escape_from_silverbrook_summon_worgen : SpellScript
|
||||||
|
|||||||
Reference in New Issue
Block a user