/// <summary> /// 执行GM命令 /// </summary> /// <returns></returns> public string DealGM(tb_User _user, cs_gm_chesscard gm) { sc_gm_chesscard _senddata = new sc_gm_chesscard() { result = 1, fn = "sc_gm_chesscard", cc = 0 }; bool _sendok = false; //if (BullFightLobby.Gameid == gm.gameid) //{ // _sendok = BullFightLobby.SendChat(_user.UserID, gm); //} _senddata.result = _sendok ? 1 : 0; return(JsonUtils.Serialize(_senddata)); }
/// <summary> /// 通知所有在线玩家,如公告信息 /// </summary> /// <returns></returns> public string DealGM(cs_gm_chesscard _user) { //处理公告 sc_getnotice_n _getnotice = new sc_getnotice_n() { result = 1, fn = "_getnotice", noticelist = new List <string>() }; _getnotice.noticelist.Add("玩家1524879,获得了以排行榜一等级奖!"); BaseSendDataServer.AutoNotifySendData(JsonUtils.Serialize((_getnotice))); sc_base _senddata = new sc_base() { result = 1, fn = "sc_base" }; return(JsonUtils.Serialize(_senddata)); }