aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Entities/Unit/Unit.h10
-rw-r--r--src/server/game/Spells/Spell.cpp2
2 files changed, 12 insertions, 0 deletions
diff --git a/src/server/game/Entities/Unit/Unit.h b/src/server/game/Entities/Unit/Unit.h
index 7cc2bb27fdf..d440615ba87 100644
--- a/src/server/game/Entities/Unit/Unit.h
+++ b/src/server/game/Entities/Unit/Unit.h
@@ -1494,6 +1494,16 @@ class TC_GAME_API Unit : public WorldObject
.ModifyValue(&UF::UnitData::ChannelData)
.ModifyValue(&UF::UnitChannel::SpellID), channelSpellId);
}
+
+ uint32 GetChannelSpellXSpellVisualId() const { return m_unitData->ChannelData->SpellXSpellVisualID; }
+ void SetChannelSpellXSpellVisualId(uint32 channelSpellXSpellVisualId)
+ {
+ SetUpdateFieldValue(m_values
+ .ModifyValue(&Unit::m_unitData)
+ .ModifyValue(&UF::UnitData::ChannelData)
+ .ModifyValue(&UF::UnitChannel::SpellXSpellVisualID), channelSpellXSpellVisualId);
+ }
+
void AddChannelObject(ObjectGuid guid) { AddDynamicUpdateFieldValue(m_values.ModifyValue(&Unit::m_unitData).ModifyValue(&UF::UnitData::ChannelObjects)) = guid; }
void SetChannelObject(uint32 slot, ObjectGuid guid) { SetUpdateFieldValue(m_values.ModifyValue(&Unit::m_unitData).ModifyValue(&UF::UnitData::ChannelObjects, slot), guid); }
void RemoveChannelObject(ObjectGuid guid)
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index d09491ca09b..ed187e2c597 100644
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -5189,6 +5189,7 @@ void Spell::SendChannelUpdate(uint32 time)
{
unitCaster->ClearChannelObjects();
unitCaster->SetChannelSpellId(0);
+ unitCaster->SetChannelSpellXSpellVisualId(0);
}
WorldPackets::Spells::SpellChannelUpdate spellChannelUpdate;
@@ -5250,6 +5251,7 @@ void Spell::SendChannelStart(uint32 duration)
creatureCaster->SetSpellFocus(this, ObjectAccessor::GetWorldObject(*creatureCaster, unitCaster->m_unitData->ChannelObjects[0]));
unitCaster->SetChannelSpellId(m_spellInfo->Id);
+ unitCaster->SetChannelSpellXSpellVisualId(m_SpellVisual.SpellXSpellVisualID);
WorldPackets::Spells::SpellChannelStart spellChannelStart;
spellChannelStart.CasterGUID = unitCaster->GetGUID();