Encapsulate UNIT_CHANNEL_* fields
This commit is contained in:
@@ -78,6 +78,7 @@ namespace Framework.Constants
|
|||||||
//Spells
|
//Spells
|
||||||
public const uint SpellWaitingForResurrect = 2584; // Waiting To Resurrect
|
public const uint SpellWaitingForResurrect = 2584; // Waiting To Resurrect
|
||||||
public const uint SpellSpiritHealChannel = 22011; // Spirit Heal Channel
|
public const uint SpellSpiritHealChannel = 22011; // Spirit Heal Channel
|
||||||
|
public const uint SpellSpiritHealChannelVisual = 3060;
|
||||||
public const uint SpellSpiritHeal = 22012; // Spirit Heal
|
public const uint SpellSpiritHeal = 22012; // Spirit Heal
|
||||||
public const uint SpellResurrectionVisual = 24171; // Resurrection Impact Visual
|
public const uint SpellResurrectionVisual = 24171; // Resurrection Impact Visual
|
||||||
public const uint SpellArenaPreparation = 32727; // Use This One, 32728 Not Correct
|
public const uint SpellArenaPreparation = 32727; // Use This One, 32728 Not Correct
|
||||||
|
|||||||
@@ -1526,7 +1526,8 @@ namespace Game.BattleGrounds
|
|||||||
//todo Fix display here
|
//todo Fix display here
|
||||||
// creature.SetVisibleAura(0, SPELL_SPIRIT_HEAL_CHANNEL);
|
// creature.SetVisibleAura(0, SPELL_SPIRIT_HEAL_CHANNEL);
|
||||||
// casting visual effect
|
// casting visual effect
|
||||||
creature.SetUInt32Value(UnitFields.ChannelSpell, BattlegroundConst.SpellSpiritHealChannel);
|
creature.SetChannelSpellId(BattlegroundConst.SpellSpiritHealChannel);
|
||||||
|
creature.SetChannelSpellXSpellVisualId(BattlegroundConst.SpellSpiritHealChannelVisual);
|
||||||
// correct cast speed
|
// correct cast speed
|
||||||
creature.SetFloatValue(UnitFields.ModCastSpeed, 1.0f);
|
creature.SetFloatValue(UnitFields.ModCastSpeed, 1.0f);
|
||||||
creature.SetFloatValue(UnitFields.ModCastHaste, 1.0f);
|
creature.SetFloatValue(UnitFields.ModCastHaste, 1.0f);
|
||||||
|
|||||||
@@ -2228,6 +2228,11 @@ namespace Game.Entities
|
|||||||
return !GetCharmerGUID().IsEmpty() ? GetCharmer() : GetOwner();
|
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<ObjectGuid> GetChannelObjects() { return GetDynamicStructuredValues<ObjectGuid>(UnitDynamicFields.ChannelObjects); }
|
public List<ObjectGuid> GetChannelObjects() { return GetDynamicStructuredValues<ObjectGuid>(UnitDynamicFields.ChannelObjects); }
|
||||||
public void AddChannelObject(ObjectGuid guid) { AddDynamicStructuredValue(UnitDynamicFields.ChannelObjects, guid); }
|
public void AddChannelObject(ObjectGuid guid) { AddDynamicStructuredValue(UnitDynamicFields.ChannelObjects, guid); }
|
||||||
|
|
||||||
|
|||||||
@@ -3942,7 +3942,8 @@ namespace Game.Spells
|
|||||||
if (time == 0)
|
if (time == 0)
|
||||||
{
|
{
|
||||||
m_caster.ClearDynamicValue(UnitDynamicFields.ChannelObjects);
|
m_caster.ClearDynamicValue(UnitDynamicFields.ChannelObjects);
|
||||||
m_caster.SetUInt32Value(UnitFields.ChannelSpell, 0);
|
m_caster.SetChannelSpellId(0);
|
||||||
|
m_caster.SetChannelSpellXSpellVisualId(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
SpellChannelUpdate spellChannelUpdate = new SpellChannelUpdate();
|
SpellChannelUpdate spellChannelUpdate = new SpellChannelUpdate();
|
||||||
@@ -3977,8 +3978,8 @@ namespace Game.Spells
|
|||||||
foreach (GOTargetInfo target in m_UniqueGOTargetInfo)
|
foreach (GOTargetInfo target in m_UniqueGOTargetInfo)
|
||||||
m_caster.AddChannelObject(target.targetGUID);
|
m_caster.AddChannelObject(target.targetGUID);
|
||||||
|
|
||||||
m_caster.SetUInt32Value(UnitFields.ChannelSpell, m_spellInfo.Id);
|
m_caster.SetChannelSpellId(m_spellInfo.Id);
|
||||||
m_caster.SetUInt32Value(UnitFields.ChannelSpellXSpellVisual, m_SpellVisual);
|
m_caster.SetChannelSpellXSpellVisualId(m_SpellVisual);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SendResurrectRequest(Player target)
|
void SendResurrectRequest(Player target)
|
||||||
@@ -7091,7 +7092,7 @@ namespace Game.Spells
|
|||||||
|
|
||||||
public bool IsTriggered() { return _triggeredCastFlags.HasAnyFlag(TriggerCastFlags.FullMask); }
|
public bool IsTriggered() { return _triggeredCastFlags.HasAnyFlag(TriggerCastFlags.FullMask); }
|
||||||
public bool IsIgnoringCooldowns() { return _triggeredCastFlags.HasAnyFlag(TriggerCastFlags.IgnoreSpellAndCategoryCD); }
|
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()
|
public bool IsDeletable()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user