aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Spells/Spell.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/Spells/Spell.cpp')
-rw-r--r--src/server/game/Spells/Spell.cpp38
1 files changed, 9 insertions, 29 deletions
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index a4b84e6a2eb..1df9fd000f6 100644
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -4245,11 +4245,10 @@ void Spell::SendChannelUpdate(uint32 time)
m_caster->SetUInt32Value(UNIT_CHANNEL_SPELL, 0);
}
- WorldPacket data(SMSG_SPELL_CHANNEL_UPDATE, 8 + 4);
- data << m_caster->GetPackGUID();
- data << uint32(time);
-
- m_caster->SendMessageToSet(&data, true);
+ WorldPackets::Spells::SpellChannelUpdate spellChannelUpdate;
+ spellChannelUpdate.CasterGUID = m_caster->GetGUID();
+ spellChannelUpdate.TimeRemaining = time;
+ m_caster->SendMessageToSet(spellChannelUpdate.Write(), true);
}
void Spell::SendChannelStart(uint32 duration)
@@ -4259,30 +4258,11 @@ void Spell::SendChannelStart(uint32 duration)
if (m_UniqueTargetInfo.size() + m_UniqueGOTargetInfo.size() == 1) // this is for TARGET_SELECT_CATEGORY_NEARBY
channelTarget = !m_UniqueTargetInfo.empty() ? m_UniqueTargetInfo.front().targetGUID : m_UniqueGOTargetInfo.front().targetGUID;
- WorldPacket data(SMSG_SPELL_CHANNEL_START, (8 + 4 + 4));
- data << m_caster->GetPackGUID();
- data << uint32(m_spellInfo->Id);
- data << uint32(duration);
- data << uint8(0); // immunity (castflag & 0x04000000)
- /*
- if (immunity)
- {
- data << uint32(); // CastSchoolImmunities
- data << uint32(); // CastImmunities
- }
- */
- data << uint8(0); // healPrediction (castflag & 0x40000000)
- /*
- if (healPrediction)
- {
- data.appendPackGUID(channelTarget); // target packguid
- data << uint32(); // spellid
- data << uint8(0); // unk3
- if (unk3 == 2)
- data.append(); // unk packed guid (unused ?)
- }
- */
- m_caster->SendMessageToSet(&data, true);
+ WorldPackets::Spells::SpellChannelStart spellChannelStart;
+ spellChannelStart.CasterGUID = m_caster->GetGUID();
+ spellChannelStart.SpellID = m_spellInfo->Id;
+ spellChannelStart.ChannelDuration = duration;
+ m_caster->SendMessageToSet(spellChannelStart.Write(), true);
m_timer = duration;
if (!channelTarget.IsEmpty())