Updated all spell scripts

This commit is contained in:
Hondacrx
2025-10-13 13:23:31 -04:00
parent 3c4602e4a1
commit 3e028633ba
46 changed files with 33364 additions and 26554 deletions
+6 -6
View File
@@ -4047,7 +4047,7 @@ namespace Game.Spells
if ((m_caster.IsPlayer() || (m_caster.IsTypeId(TypeId.Unit) && m_caster.ToCreature().IsPet())) && m_powerCost.Any(cost => cost.Power != PowerType.Health))
castFlags |= SpellCastFlags.PowerLeftSelf;
if (m_caster.IsPlayer() && m_caster.ToPlayer().GetClass() == Class.Deathknight &&
if (m_caster.IsPlayer() && m_caster.ToPlayer().GetClass() == Class.DeathKnight &&
HasPowerTypeCost(PowerType.Runes) && !_triggeredCastFlags.HasAnyFlag(TriggerCastFlags.IgnorePowerCost))
{
castFlags |= SpellCastFlags.NoGCD; // not needed, but it's being sent according to sniffs
@@ -4820,7 +4820,7 @@ namespace Game.Spells
if (player == null)
return SpellCastResult.SpellCastOk;
if (player.GetClass() != Class.Deathknight)
if (player.GetClass() != Class.DeathKnight)
return SpellCastResult.SpellCastOk;
int readyRunes = 0;
@@ -4836,7 +4836,7 @@ namespace Game.Spells
void TakeRunePower(bool didHit)
{
if (!m_caster.IsTypeId(TypeId.Player) || m_caster.ToPlayer().GetClass() != Class.Deathknight)
if (!m_caster.IsTypeId(TypeId.Player) || m_caster.ToPlayer().GetClass() != Class.DeathKnight)
return;
Player player = m_caster.ToPlayer();
@@ -4858,7 +4858,7 @@ namespace Game.Spells
void RefundRunePower()
{
if (!m_caster.IsPlayer() || m_caster.ToPlayer().GetClass() != Class.Deathknight)
if (!m_caster.IsPlayer() || m_caster.ToPlayer().GetClass() != Class.DeathKnight)
return;
Player player = m_caster.ToPlayer();
@@ -6578,7 +6578,7 @@ namespace Game.Spells
return unit.HasUnitMovementFlag(MovementFlag.Forward | MovementFlag.StrafeLeft | MovementFlag.StrafeRight | MovementFlag.Falling) && !unit.IsWalking();
}
(float minRange, float maxRange) GetMinMaxRange(bool strict)
public (float minRange, float maxRange) GetMinMaxRange(bool strict)
{
float rangeMod = 0.0f;
float minRange = 0.0f;
@@ -8421,7 +8421,7 @@ namespace Game.Spells
return SpellCastResult.SpellCastOk;
}
int CalculateDamage(SpellEffectInfo spellEffectInfo, Unit target)
public int CalculateDamage(SpellEffectInfo spellEffectInfo, Unit target)
{
return CalculateDamage(spellEffectInfo, target, out _);
}
+9 -2
View File
@@ -857,7 +857,7 @@ namespace Game.Spells
_categoryCharges.Add(chargeCategoryId, new ChargeEntry(recoveryStart, TimeSpan.FromMilliseconds(chargeRecovery)));
}
void ModifyChargeRecoveryTime(uint chargeCategoryId, TimeSpan cooldownMod)
public void ModifyChargeRecoveryTime(uint chargeCategoryId, TimeSpan cooldownMod)
{
var chargeCategoryEntry = CliDB.SpellCategoryStorage.LookupByKey(chargeCategoryId);
if (chargeCategoryEntry == null)
@@ -1119,12 +1119,19 @@ namespace Game.Spells
}
}
void GetCooldownDurations(SpellInfo spellInfo, uint itemId, ref uint categoryId)
public static void GetCooldownDurations(SpellInfo spellInfo, uint itemId, ref uint categoryId)
{
TimeSpan notUsed = TimeSpan.Zero;
GetCooldownDurations(spellInfo, itemId, ref notUsed, ref categoryId, ref notUsed);
}
public static void GetCooldownDurations(SpellInfo spellInfo, uint itemId, ref TimeSpan cooldown)
{
TimeSpan notUsed = TimeSpan.Zero;
uint notUsedId = 0;
GetCooldownDurations(spellInfo, itemId, ref cooldown, ref notUsedId, ref notUsed);
}
public static void GetCooldownDurations(SpellInfo spellInfo, uint itemId, ref TimeSpan cooldown, ref uint categoryId, ref TimeSpan categoryCooldown)
{
TimeSpan tmpCooldown = TimeSpan.MinValue;