//客户端请求获取爵位数据- //参数 page=页码 下标从0开始 public void RequestData(PlayerObject play, byte page) { int start = page * 10; if (start < 0) { start = 0; } if (start >= mList.Count) { return; //超出了 } NetMsg.MsgGuanJueInfo info = new NetMsg.MsgGuanJueInfo(); info.Create(null, play.GetGamePackKeyEx()); for (int i = start; i < start + 10; i++) { if (i >= mList.Count) { break; } NetMsg.MsgGuanJueItem item = new NetMsg.MsgGuanJueItem(); item.guanjue = mList[i].guanjue; item.name = mList[i].name; item.pos = i; info.list_item.Add(item); } info.page = page; play.SendData(info.GetBuffer()); }
//客户端请求获取爵位数据- //参数 page=页码 下标从0开始 public void RequestData(PlayerObject play,byte page) { int start = page * 10 ; if (start < 0) start = 0; if (start >= mList.Count) return;//超出了 NetMsg.MsgGuanJueInfo info = new NetMsg.MsgGuanJueInfo(); info.Create(null,play.GetGamePackKeyEx()); for (int i = start; i < start + 10; i++) { if (i >= mList.Count) break; NetMsg.MsgGuanJueItem item = new NetMsg.MsgGuanJueItem(); item.guanjue = mList[i].guanjue; item.name = mList[i].name; item.pos = i; info.list_item.Add(item); } info.page = page; play.SendData(info.GetBuffer()); }