static void SendChangeComponentMsg(SyncSession session, Protocol.ChangeComponentMsg msg) { Dictionary <string, object> data = new Dictionary <string, object>(); data.Add("frame", msg.frame); data.Add("id", msg.id); { Dictionary <string, object> data2 = new Dictionary <string, object>(); data2.Add("m_compname", msg.info.m_compName); data2.Add("content", msg.info.content); data.Add("info", data2); } session.SendMsg("changecomponentmsg", data); }
static void SendChangeComponentMsg(IProtocolMessageInterface msg) { Protocol.ChangeComponentMsg e = (Protocol.ChangeComponentMsg)msg; Dictionary <string, object> data = new Dictionary <string, object>(); data.Add("frame", e.frame); data.Add("id", e.id); { Dictionary <string, object> data2 = new Dictionary <string, object>(); data2.Add("m_compname", e.info.m_compName); data2.Add("content", e.info.content); data.Add("info", data2); } NetworkManager.SendMessage("changecomponentmsg", data); }
static void ReceviceChangeComponentMsg(SyncSession session, ProtocolRequestBase e) { Protocol.ChangeComponentMsg msg = new Protocol.ChangeComponentMsg(); msg.frame = (int)e.m_data["frame"]; msg.id = (int)e.m_data["id"]; { Dictionary <string, object> data2 = (Dictionary <string, object>)e.m_data["info"]; Protocol.ComponentInfo tmp2 = new Protocol.ComponentInfo(); tmp2.m_compName = data2["m_compname"].ToString(); tmp2.content = data2["content"].ToString(); msg.info = tmp2; } EventService.DispatchTypeEvent(session, msg); }
static void ReceviceChangeComponentMsg(InputNetworkMessageEvent e) { Protocol.ChangeComponentMsg msg = new Protocol.ChangeComponentMsg(); msg.frame = (int)e.Data["frame"]; msg.id = (int)e.Data["id"]; { Dictionary <string, object> data2 = (Dictionary <string, object>)e.Data["info"]; Protocol.ComponentInfo tmp2 = new Protocol.ComponentInfo(); tmp2.m_compName = data2["m_compname"].ToString(); tmp2.content = data2["content"].ToString(); msg.info = tmp2; } GlobalEvent.DispatchTypeEvent(msg); }