From 5132547ab315375f6ac4324b25f9344e68e87fd9 Mon Sep 17 00:00:00 2001 From: joschiwald Date: Sat, 25 Aug 2018 20:13:19 +0200 Subject: Scripts/Command: Use packet builder in .debug send channelnotify --- src/server/scripts/Commands/cs_debug.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/server/scripts/Commands/cs_debug.cpp b/src/server/scripts/Commands/cs_debug.cpp index be216e79d94..f146c1ca27b 100644 --- a/src/server/scripts/Commands/cs_debug.cpp +++ b/src/server/scripts/Commands/cs_debug.cpp @@ -27,6 +27,7 @@ EndScriptData */ #include "BattlefieldMgr.h" #include "BattlegroundMgr.h" #include "CellImpl.h" +#include "ChannelPackets.h" #include "Chat.h" #include "ChatPackets.h" #include "Conversation.h" @@ -479,12 +480,10 @@ public: char const* name = "test"; uint8 code = atoi(args); - WorldPacket data(SMSG_CHANNEL_NOTIFY, (1+10)); - data << code; // notify type - data << name; // channel name - data << uint32(0); - data << uint32(0); - handler->GetSession()->SendPacket(&data); + WorldPackets::Channel::ChannelNotify channelNotify = WorldPackets::Channel::ChannelNotify(); + channelNotify.Type = code; + channelNotify._Channel = name; + handler->GetSession()->SendPacket(channelNotify.Write()); return true; } -- cgit v1.2.3