From bb26b478244ba25d47629b7e8276666774a55016 Mon Sep 17 00:00:00 2001 From: Hondacrx Date: Sun, 25 Aug 2024 21:45:49 -0400 Subject: [PATCH] Core/Spells: Rename more SpellAttr9 Port From (https://github.com/TrinityCore/TrinityCore/commit/56a027131a130bc778ee34ddfa379c42580b510b) --- Source/Framework/Constants/Spells/SpellConst.cs | 4 ++-- Source/Game/Entities/Object/WorldObject.cs | 2 +- Source/Game/Spells/Spell.cs | 8 ++++---- Source/Game/Spells/SpellEffects.cs | 4 ++-- Source/Game/Spells/SpellManager.cs | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Source/Framework/Constants/Spells/SpellConst.cs b/Source/Framework/Constants/Spells/SpellConst.cs index 82e67fb80..914d58e6e 100644 --- a/Source/Framework/Constants/Spells/SpellConst.cs +++ b/Source/Framework/Constants/Spells/SpellConst.cs @@ -1969,8 +1969,8 @@ namespace Framework.Constants ForceDestLocation = 0x01, // Force Dest Location DESCRIPTION Ignores collision with terrain (unsure if it also ignores terrain height and can go under map) ModInvisIncludesParty = 0x02, // Mod Invis Includes Party 1@Attr9 DESCRIPTION Causes invisibility auras to ignore "can always see party member invis" rule OnlyWhenIllegallyMounted = 0x04, // Only When Illegally Mounted - Unk3 = 0x08, // 3 - SpecialDelayCalculation = 0x10, // 4 + DoNotLogAuraRefresh = 0x08, // Do Not Log Aura Refresh (client only) + MissileSpeedIsDelayInSec = 0x10, // Missile Speed is Delay (in sec) SummonPlayerTotem = 0x20, // 5 Unk6 = 0x40, // 6 Unk7 = 0x80, // 7 diff --git a/Source/Game/Entities/Object/WorldObject.cs b/Source/Game/Entities/Object/WorldObject.cs index 1336bdf08..a71b541a3 100644 --- a/Source/Game/Entities/Object/WorldObject.cs +++ b/Source/Game/Entities/Object/WorldObject.cs @@ -2864,7 +2864,7 @@ namespace Game.Entities { // Set up missile speed based delay float hitDelay = spellInfo.LaunchDelay; - if (spellInfo.HasAttribute(SpellAttr9.SpecialDelayCalculation)) + if (spellInfo.HasAttribute(SpellAttr9.MissileSpeedIsDelayInSec)) hitDelay += spellInfo.Speed; else if (spellInfo.Speed > 0.0f) hitDelay += Math.Max(victim.GetDistance(this), 5.0f) / spellInfo.Speed; diff --git a/Source/Game/Spells/Spell.cs b/Source/Game/Spells/Spell.cs index cf4f571cc..8780acd47 100644 --- a/Source/Game/Spells/Spell.cs +++ b/Source/Game/Spells/Spell.cs @@ -339,7 +339,7 @@ namespace Game.Spells if (speed > 0.0f) return (ulong)(Math.Floor((m_targets.GetDist2d() / speed + launchDelay) * 1000.0f)); } - else if (m_spellInfo.HasAttribute(SpellAttr9.SpecialDelayCalculation)) + else if (m_spellInfo.HasAttribute(SpellAttr9.MissileSpeedIsDelayInSec)) return (ulong)(Math.Floor((m_spellInfo.Speed + launchDelay) * 1000.0f)); else if (m_spellInfo.Speed > 0.0f) { @@ -1988,7 +1988,7 @@ namespace Game.Spells } } - if (m_spellInfo.HasAttribute(SpellAttr9.SpecialDelayCalculation)) + if (m_spellInfo.HasAttribute(SpellAttr9.MissileSpeedIsDelayInSec)) hitDelay += m_spellInfo.Speed; else if (m_spellInfo.Speed > 0.0f) { @@ -2057,7 +2057,7 @@ namespace Game.Spells if (m_caster != go) { float hitDelay = m_spellInfo.LaunchDelay; - if (m_spellInfo.HasAttribute(SpellAttr9.SpecialDelayCalculation)) + if (m_spellInfo.HasAttribute(SpellAttr9.MissileSpeedIsDelayInSec)) hitDelay += m_spellInfo.Speed; else if (m_spellInfo.Speed > 0.0f) { @@ -2137,7 +2137,7 @@ namespace Game.Spells if (m_caster != corpse) { float hitDelay = m_spellInfo.LaunchDelay; - if (m_spellInfo.HasAttribute(SpellAttr9.SpecialDelayCalculation)) + if (m_spellInfo.HasAttribute(SpellAttr9.MissileSpeedIsDelayInSec)) hitDelay += m_spellInfo.Speed; else if (m_spellInfo.Speed > 0.0f) { diff --git a/Source/Game/Spells/SpellEffects.cs b/Source/Game/Spells/SpellEffects.cs index ed0190841..b52f73130 100644 --- a/Source/Game/Spells/SpellEffects.cs +++ b/Source/Game/Spells/SpellEffects.cs @@ -3545,7 +3545,7 @@ namespace Game.Spells m_preGeneratedPath.CalculatePath(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), false); } - if (MathFunctions.fuzzyGt(m_spellInfo.Speed, 0.0f) && m_spellInfo.HasAttribute(SpellAttr9.SpecialDelayCalculation)) + if (MathFunctions.fuzzyGt(m_spellInfo.Speed, 0.0f) && m_spellInfo.HasAttribute(SpellAttr9.MissileSpeedIsDelayInSec)) speed = m_preGeneratedPath.GetPathLength() / speed; unitCaster.GetMotionMaster().MoveCharge(m_preGeneratedPath, speed, unitTarget, spellEffectExtraData); @@ -3592,7 +3592,7 @@ namespace Game.Spells float speed = MathFunctions.fuzzyGt(m_spellInfo.Speed, 0.0f) ? m_spellInfo.Speed : MotionMaster.SPEED_CHARGE; - if (MathFunctions.fuzzyGt(m_spellInfo.Speed, 0.0f) && m_spellInfo.HasAttribute(SpellAttr9.SpecialDelayCalculation)) + if (MathFunctions.fuzzyGt(m_spellInfo.Speed, 0.0f) && m_spellInfo.HasAttribute(SpellAttr9.MissileSpeedIsDelayInSec)) speed = path.GetPathLength() / speed; unitCaster.GetMotionMaster().MoveCharge(path, speed); diff --git a/Source/Game/Spells/SpellManager.cs b/Source/Game/Spells/SpellManager.cs index e01e5728a..8c4437e9f 100644 --- a/Source/Game/Spells/SpellManager.cs +++ b/Source/Game/Spells/SpellManager.cs @@ -4455,7 +4455,7 @@ namespace Game.Entities case SpellEffectName.Jump: case SpellEffectName.JumpDest: case SpellEffectName.LeapBack: - if (spellInfo.Speed == 0 && spellInfo.SpellFamilyName == 0 && !spellInfo.HasAttribute(SpellAttr9.SpecialDelayCalculation)) + if (spellInfo.Speed == 0 && spellInfo.SpellFamilyName == 0 && !spellInfo.HasAttribute(SpellAttr9.MissileSpeedIsDelayInSec)) spellInfo.Speed = MotionMaster.SPEED_CHARGE; break; }