コード例 #1
0
            public SearchClan(List <Clan> list)
            {
                int len = list.Count;

                newPacket(26384);
                addBlock(6);
                addBlock(1);
                addBlock(len);
                for (int i = 0; i < len; i++)
                {
                    Clan c = list[i];
                    if (c != null)
                    {
                        addBlock(c.id);
                        addBlock(c.Master);
                        addBlock(c.MasterEXP);
                        addBlock(c.name);
                        addBlock(c.GetRank());
                        addBlock(c.ClanUsers.Count);
                        addBlock(c.iconid);
                        addBlock(i + 1);
                        addBlock(c.Description.Replace((char)0x20, (char)0x1D));
                        addBlock(c.GetCreationDate());
                    }
                }
            }
コード例 #2
0
            public SearchClan(int page, int sortType, List <Clan> list)
            {
                int len = list.Count;

                if (len > 10)
                {
                    len = 10;
                }

                newPacket(26384);
                addBlock(17);
                addBlock(1);
                addBlock(page);
                addBlock(sortType);
                addBlock(len);
                for (int i = (10 * page); i < len; i++)
                {
                    Clan c = list[i];
                    if (c != null)
                    {
                        addBlock(c.id);
                        addBlock(c.Master);
                        addBlock(c.MasterEXP);
                        addBlock(c.name);
                        addBlock(c.GetRank());
                        addBlock(c.ClanUsers.Count);
                        addBlock(c.iconid);
                        addBlock((10 * page) + (i + 1));
                        addBlock(c.Description.Replace((char)0x20, (char)0x1D));
                        addBlock(c.GetCreationDate());
                    }
                }
            }