Exemple #1
0
    public void SaveEditData(string dName, string dInfo)
    {
        if (updateBlockInfo.Count != 0)
        {
            return;
        }

        string uID = PlayerDataManager.GetPlayerKey();

        byte[] packet = PacketInfo.MakeReqSaveMapNameInfoBody(uID, dName, dInfo, (short)(roomList.Count));
        NetManager.SendData(packet);

        List <byte[]> byteList = new List <byte[]>();

        foreach (var roomData in roomList)
        {
            for (int i = 0; i < roomData.sparseBlockInfo.Count; i++)
            {
                byteList.Add(roomData.sparseBlockInfo[i].SaveAsByteArray());
            }

            var bPkt = PacketInfo.MakeReqSaveMapDataBody(
                PlayerDataManager.GetPlayerKey(),
                //PlayerDataManager.GetDungeonID(),
                "d000000000",
                roomData.roomNumber,
                byteList
                );

            NetManager.SendData(bPkt);
            byteList.Clear();
        }
    }