Core/Spells: Unify Bloodlust spells for all classes

Port From (https://github.com/TrinityCore/TrinityCore/commit/1b3f93aa0fd2d28bfcc01a33bec1c49074c4674f)
This commit is contained in:
hondacrx
2023-05-02 14:06:54 -04:00
parent 4896455d22
commit afd86f62dd
3 changed files with 68 additions and 104 deletions
-67
View File
@@ -40,7 +40,6 @@ namespace Scripts.Spells.Shaman
public const uint ElementalBlastOverload = 120588;
public const uint ElementalMastery = 16166;
public const uint EnergySurge = 40465;
public const uint Exhaustion = 57723;
public const uint FlameShock = 188389;
public const uint FlametongueAttack = 10444;
public const uint FlametongueWeaponEnchant = 334294;
@@ -74,7 +73,6 @@ namespace Scripts.Spells.Shaman
public const uint PathOfFlamesSpread = 210621;
public const uint PathOfFlamesTalent = 201909;
public const uint PowerSurge = 40466;
public const uint Sated = 57724;
public const uint SpiritWolfTalent = 260878;
public const uint SpiritWolfPeriodic = 260882;
public const uint SpiritWolfAura = 260881;
@@ -89,11 +87,6 @@ namespace Scripts.Spells.Shaman
public const uint WindfuryAttack = 25504;
public const uint WindfuryEnchantment = 334302;
public const uint WindRush = 192082;
//Misc
public const uint HunterInsanity = 95809;
public const uint MageTemporalDisplacement = 80354;
public const uint PetNetherwindsFatigued = 160455;
}
struct CreatureIds
@@ -191,36 +184,6 @@ namespace Scripts.Spells.Shaman
}
}
[Script] // 2825 - Bloodlust
class spell_sha_bloodlust : SpellScript
{
public override bool Validate(SpellInfo spellInfo)
{
return ValidateSpellInfo(SpellIds.Sated, SpellIds.HunterInsanity, SpellIds.MageTemporalDisplacement, SpellIds.PetNetherwindsFatigued);
}
void RemoveInvalidTargets(List<WorldObject> targets)
{
targets.RemoveAll(new UnitAuraCheck<WorldObject>(true, SpellIds.Sated));
targets.RemoveAll(new UnitAuraCheck<WorldObject>(true, SpellIds.HunterInsanity));
targets.RemoveAll(new UnitAuraCheck<WorldObject>(true, SpellIds.MageTemporalDisplacement));
}
void ApplyDebuff()
{
Unit target = GetHitUnit();
if (target)
target.CastSpell(target, SpellIds.Sated, true);
}
public override void Register()
{
OnObjectAreaTargetSelect.Add(new ObjectAreaTargetSelectHandler(RemoveInvalidTargets, 0, Targets.UnitCasterAreaRaid));
OnObjectAreaTargetSelect.Add(new ObjectAreaTargetSelectHandler(RemoveInvalidTargets, 1, Targets.UnitCasterAreaRaid));
AfterHit.Add(new HitHandler(ApplyDebuff));
}
}
[Script] // 188443 - Chain Lightning
class spell_sha_chain_lightning : SpellScript
{
@@ -707,36 +670,6 @@ namespace Scripts.Spells.Shaman
}
}
[Script] // 32182 - Heroism
class spell_sha_heroism : SpellScript
{
public override bool Validate(SpellInfo spellInfo)
{
return ValidateSpellInfo(SpellIds.Exhaustion, SpellIds.HunterInsanity, SpellIds.MageTemporalDisplacement, SpellIds.PetNetherwindsFatigued);
}
void RemoveInvalidTargets(List<WorldObject> targets)
{
targets.RemoveAll(new UnitAuraCheck<WorldObject>(true, SpellIds.Exhaustion));
targets.RemoveAll(new UnitAuraCheck<WorldObject>(true, SpellIds.HunterInsanity));
targets.RemoveAll(new UnitAuraCheck<WorldObject>(true, SpellIds.MageTemporalDisplacement));
}
void ApplyDebuff()
{
Unit target = GetHitUnit();
if (target)
target.CastSpell(target, SpellIds.Exhaustion, true);
}
public override void Register()
{
OnObjectAreaTargetSelect.Add(new ObjectAreaTargetSelectHandler(RemoveInvalidTargets, 0, Targets.UnitCasterAreaRaid));
OnObjectAreaTargetSelect.Add(new ObjectAreaTargetSelectHandler(RemoveInvalidTargets, 1, Targets.UnitCasterAreaRaid));
AfterHit.Add(new HitHandler(ApplyDebuff));
}
}
[Script] // 210714 - Icefury
class spell_sha_icefury : AuraScript
{