Exemplo n.º 1
0
    public void SendRoundOver()
    {
        CEndlessPass     packet    = new CEndlessPass();
        List <FightInfo> _InfoList = SceneObjectManager.GetInstance().GetFightInfoList();

        for (int i = 0; i < _InfoList.Count; i++)
        {
            bool isAdd = false;
            if (i + 30 > _InfoList.Count || i % 10 == 0)
            {
                isAdd = true;
            }
            else
            {
                isAdd = IsAdd(_InfoList[i]);
            }

            if (!isAdd)
            {
                continue;
            }


            GNET.fightInfo _info = new GNET.fightInfo();
            GameUtils.CopyFightInfo(ref _info, _InfoList[i]);
            packet.fightinfolist.AddLast(_info);
        }
        IOControler.GetInstance().SendProtocol(packet);
    }
Exemplo n.º 2
0
 public override OctetsStream unmarshal(OctetsStream _os_)
 {
     for (int _size_ = _os_.uncompact_uint32(); _size_ > 0; --_size_)
     {
         fightInfo _v_ = new fightInfo();
         _v_.unmarshal(_os_);
         fightinfolist.AddLast(_v_);
     }
     return(_os_);
 }