public CMsgChatC2GMReqChat(SRoleKey receiverKey, EChatChanel channel, string content, CChatEquipID equipID) : base(CServerType.SRVTYPE_GAMESERVER, CFuncType.EFUNCTYPE_CHATSYSTEM, CChatSystemMsgNumID.EMSGNUMID_CHATSYSTEM_GC2GM_REQ_CHAT) { m_roleKey = receiverKey; m_channel = channel; m_content = content; m_chatEquipID = equipID; }
protected override bool _SerializeTo(UnityUtility.CStream msgStream) { m_roleKey.serializeTo(msgStream); msgStream.Write((byte)m_channel); msgStream.Write(m_content); if (m_chatEquipID == null) { UInt32 invalid_index = 0xffff; m_chatEquipID = new CChatEquipID(invalid_index, invalid_index); } m_chatEquipID.serializeTo(msgStream); return(true); }
/// <summary> /// 发送聊天信息 /// </summary> /// <param name="channel"></param> /// <param name="content"></param> /// <param name="cb"></param> /// <returns></returns> public bool SendMsgChatSystemGC2GMReqChat(SRoleKey roleKey, EChatChanel channel, string content, CChatEquipID equipID, CBMsgChatSystemGM2GCAckChat cb) { CMsgChatC2GMReqChat req = new CMsgChatC2GMReqChat(roleKey, channel, content, equipID); CMsgChatSystemGM2GCAckChat.s_cb = cb; return(CGameClient.Singleton.SendMsg(req)); }