aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Spells/Spell.cpp
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2017-11-06 23:32:25 +0100
committerShauren <shauren.trinity@gmail.com>2017-12-29 12:57:55 +0100
commit965f4de08300f134e20e321bb90ddbed897b3c0c (patch)
tree969fc7e2335fcd7caf9680393fcfd1de703d517a /src/server/game/Spells/Spell.cpp
parentb49fa9658a436c31ffc40100d5a55bee5a3f861e (diff)
Core/Units: Encapsulate UNIT_CHANNEL_* fields
Diffstat (limited to 'src/server/game/Spells/Spell.cpp')
-rw-r--r--src/server/game/Spells/Spell.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index afd48087c7b..f9a6e45e7e7 100644
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -4482,7 +4482,8 @@ void Spell::SendChannelUpdate(uint32 time)
if (time == 0)
{
m_caster->ClearDynamicValue(UNIT_DYNAMIC_FIELD_CHANNEL_OBJECTS);
- m_caster->SetUInt32Value(UNIT_CHANNEL_SPELL, 0);
+ m_caster->SetChannelSpellId(0);
+ m_caster->SetChannelSpellXSpellVisualId(0);
}
WorldPackets::Spells::SpellChannelUpdate spellChannelUpdate;
@@ -4517,8 +4518,8 @@ void Spell::SendChannelStart(uint32 duration)
for (GOTargetInfo const& target : m_UniqueGOTargetInfo)
m_caster->AddChannelObject(target.targetGUID);
- m_caster->SetUInt32Value(UNIT_CHANNEL_SPELL, m_spellInfo->Id);
- m_caster->SetUInt32Value(UNIT_CHANNEL_SPELL_X_SPELL_VISUAL, m_SpellVisual);
+ m_caster->SetChannelSpellId(m_spellInfo->Id);
+ m_caster->SetChannelSpellXSpellVisualId(m_SpellVisual);
}
void Spell::SendResurrectRequest(Player* target)
@@ -6953,7 +6954,7 @@ bool Spell::IsProcDisabled() const
bool Spell::IsChannelActive() const
{
- return m_caster->GetUInt32Value(UNIT_CHANNEL_SPELL) != 0;
+ return m_caster->GetChannelSpellId() != 0;
}
bool Spell::IsAutoActionResetSpell() const