diff --git a/Source/Framework/Constants/BattleGroundsConst.cs b/Source/Framework/Constants/BattleGroundsConst.cs index b0b414b52..315dc7691 100644 --- a/Source/Framework/Constants/BattleGroundsConst.cs +++ b/Source/Framework/Constants/BattleGroundsConst.cs @@ -78,6 +78,7 @@ namespace Framework.Constants //Spells public const uint SpellWaitingForResurrect = 2584; // Waiting To Resurrect public const uint SpellSpiritHealChannel = 22011; // Spirit Heal Channel + public const uint SpellSpiritHealChannelVisual = 3060; public const uint SpellSpiritHeal = 22012; // Spirit Heal public const uint SpellResurrectionVisual = 24171; // Resurrection Impact Visual public const uint SpellArenaPreparation = 32727; // Use This One, 32728 Not Correct diff --git a/Source/Game/BattleGrounds/BattleGround.cs b/Source/Game/BattleGrounds/BattleGround.cs index d11e54fc2..9ce7e7794 100644 --- a/Source/Game/BattleGrounds/BattleGround.cs +++ b/Source/Game/BattleGrounds/BattleGround.cs @@ -1526,7 +1526,8 @@ namespace Game.BattleGrounds //todo Fix display here // creature.SetVisibleAura(0, SPELL_SPIRIT_HEAL_CHANNEL); // casting visual effect - creature.SetUInt32Value(UnitFields.ChannelSpell, BattlegroundConst.SpellSpiritHealChannel); + creature.SetChannelSpellId(BattlegroundConst.SpellSpiritHealChannel); + creature.SetChannelSpellXSpellVisualId(BattlegroundConst.SpellSpiritHealChannelVisual); // correct cast speed creature.SetFloatValue(UnitFields.ModCastSpeed, 1.0f); creature.SetFloatValue(UnitFields.ModCastHaste, 1.0f); diff --git a/Source/Game/Entities/Unit/Unit.cs b/Source/Game/Entities/Unit/Unit.cs index f69776468..3a66a7eef 100644 --- a/Source/Game/Entities/Unit/Unit.cs +++ b/Source/Game/Entities/Unit/Unit.cs @@ -2228,6 +2228,11 @@ namespace Game.Entities return !GetCharmerGUID().IsEmpty() ? GetCharmer() : GetOwner(); } + public uint GetChannelSpellId() { return GetUInt32Value(UnitFields.ChannelSpell); } + public void SetChannelSpellId(uint channelSpellId) { SetUInt32Value(UnitFields.ChannelSpell, channelSpellId); } + public uint GetChannelSpellXSpellVisualId() { return GetUInt32Value(UnitFields.ChannelSpellXSpellVisual);} + public void SetChannelSpellXSpellVisualId(uint channelSpellXSpellVisualId) { SetUInt32Value(UnitFields.ChannelSpellXSpellVisual, channelSpellXSpellVisualId); } + public List GetChannelObjects() { return GetDynamicStructuredValues(UnitDynamicFields.ChannelObjects); } public void AddChannelObject(ObjectGuid guid) { AddDynamicStructuredValue(UnitDynamicFields.ChannelObjects, guid); } diff --git a/Source/Game/Spells/Spell.cs b/Source/Game/Spells/Spell.cs index 233670940..64e4239c8 100644 --- a/Source/Game/Spells/Spell.cs +++ b/Source/Game/Spells/Spell.cs @@ -3942,7 +3942,8 @@ namespace Game.Spells if (time == 0) { m_caster.ClearDynamicValue(UnitDynamicFields.ChannelObjects); - m_caster.SetUInt32Value(UnitFields.ChannelSpell, 0); + m_caster.SetChannelSpellId(0); + m_caster.SetChannelSpellXSpellVisualId(0); } SpellChannelUpdate spellChannelUpdate = new SpellChannelUpdate(); @@ -3977,8 +3978,8 @@ namespace Game.Spells foreach (GOTargetInfo target in m_UniqueGOTargetInfo) m_caster.AddChannelObject(target.targetGUID); - m_caster.SetUInt32Value(UnitFields.ChannelSpell, m_spellInfo.Id); - m_caster.SetUInt32Value(UnitFields.ChannelSpellXSpellVisual, m_SpellVisual); + m_caster.SetChannelSpellId(m_spellInfo.Id); + m_caster.SetChannelSpellXSpellVisualId(m_SpellVisual); } void SendResurrectRequest(Player target) @@ -7091,7 +7092,7 @@ namespace Game.Spells public bool IsTriggered() { return _triggeredCastFlags.HasAnyFlag(TriggerCastFlags.FullMask); } public bool IsIgnoringCooldowns() { return _triggeredCastFlags.HasAnyFlag(TriggerCastFlags.IgnoreSpellAndCategoryCD); } - public bool IsChannelActive() { return m_caster.GetUInt32Value(UnitFields.ChannelSpell) != 0; } + public bool IsChannelActive() { return m_caster.GetChannelSpellId() != 0; } public bool IsDeletable() {