Преглед на файлове

增加派对宝箱功能

liuqilin преди 7 години
родител
ревизия
d3073d1fc5

+ 1 - 1
Assets/Resource/Logo.unity

@@ -200,7 +200,7 @@ Prefab:
     - target: {fileID: 224814127152008004, guid: 718ebdaed223e93409d6dc7e53a23167,
         type: 2}
       propertyPath: m_RootOrder
-      value: 0
+      value: 1
       objectReference: {fileID: 0}
     - target: {fileID: 224814127152008004, guid: 718ebdaed223e93409d6dc7e53a23167,
         type: 2}

+ 5 - 3
Assets/Resource/XML/lan/ChineseSimplified.xml

@@ -136,14 +136,15 @@
     <Y_Guess desc=""><![CDATA[猜]]></Y_Guess>
     <Y_Bingo desc=""><![CDATA[猜对了]]></Y_Bingo>
     <Y_WrongGusee desc=""><![CDATA[猜错了]]></Y_WrongGusee>
+    <Y_SoldOut desc=""><![CDATA[已经被抢光了]]></Y_SoldOut>
     <Z_Closing desc=""><![CDATA[即将结束]]></Z_Closing>
     <Z_Running desc=""><![CDATA[进行中]]></Z_Running>
     <Z_Full desc=""><![CDATA[已满]]></Z_Full>
     <Z_Available desc=""><![CDATA[未满]]></Z_Available>
     <Z_Join desc=""><![CDATA[加入]]></Z_Join>
-    <Z_RoomFull desc=""><![CDATA[房间已满]]></Z_RoomFull>
-    <Z_RoomExpire desc=""><![CDATA[房间已经过期]]></Z_RoomExpire>
-    <Z_Unknown desc=""><![CDATA[未知原因]]></Z_Unknown>
+    <Z_RoomFull desc=""><![CDATA[派对人数已满,无法加入]]></Z_RoomFull>
+    <Z_RoomExpire desc=""><![CDATA[派对已经结束,自己创建一个吧!]]></Z_RoomExpire>
+    <Z_Unknown desc=""><![CDATA[派对人数已满]]></Z_Unknown>
     <AA_AllWhiteSpace desc=""><![CDATA[房间名字不能为空]]></AA_AllWhiteSpace>
     <AA_TooLong desc=""><![CDATA[名字太长]]></AA_TooLong>
     <AA_SendRequest desc=""><![CDATA[发送请求]]></AA_SendRequest>
@@ -157,6 +158,7 @@
     <AAa_Value desc=""><![CDATA[小时]]></AAa_Value>
     <AAb_Tit desc=""><![CDATA[人数]]></AAb_Tit>
     <AAb_Value desc=""><![CDATA[人]]></AAb_Value>
+    <BB_Refund desc=""><![CDATA[你的宝箱没有被领取完,已返还剩余<(钻石)>]]></BB_Refund>
     <Loading desc=""><![CDATA[加载中]]></Loading>
     <LoadFailed desc=""><![CDATA[加载失败]]></LoadFailed>
     <LoadSucceed desc=""><![CDATA[加载成功]]></LoadSucceed>

+ 2 - 0
Assets/Resource/XML/lan/ChineseTraditional.xml

@@ -136,6 +136,7 @@
     <Y_Guess desc=""><![CDATA[猜]]></Y_Guess>
     <Y_Bingo desc=""><![CDATA[猜對了]]></Y_Bingo>
     <Y_WrongGusee desc=""><![CDATA[猜錯了]]></Y_WrongGusee>
+    <Y_SoldOut desc=""><![CDATA[]]></Y_SoldOut>
     <Z_Closing desc=""><![CDATA[]]></Z_Closing>
     <Z_Running desc=""><![CDATA[]]></Z_Running>
     <Z_Full desc=""><![CDATA[]]></Z_Full>
@@ -157,6 +158,7 @@
     <AAa_Value desc=""><![CDATA[]]></AAa_Value>
     <AAb_Tit desc=""><![CDATA[]]></AAb_Tit>
     <AAb_Value desc=""><![CDATA[]]></AAb_Value>
+    <BB_Refund desc=""><![CDATA[]]></BB_Refund>
     <Loading desc=""><![CDATA[]]></Loading>
     <LoadFailed desc=""><![CDATA[]]></LoadFailed>
     <LoadSucceed desc=""><![CDATA[]]></LoadSucceed>

+ 2 - 0
Assets/Resource/XML/lan/English.xml

@@ -136,6 +136,7 @@ Program 水怪
     <Y_Guess desc=""><![CDATA[Guess]]></Y_Guess>
     <Y_Bingo desc=""><![CDATA[Right]]></Y_Bingo>
     <Y_WrongGusee desc=""><![CDATA[Wrong]]></Y_WrongGusee>
+    <Y_SoldOut desc=""><![CDATA[]]></Y_SoldOut>
     <Z_Closing desc=""><![CDATA[]]></Z_Closing>
     <Z_Running desc=""><![CDATA[]]></Z_Running>
     <Z_Full desc=""><![CDATA[]]></Z_Full>
@@ -157,6 +158,7 @@ Program 水怪
     <AAa_Value desc=""><![CDATA[]]></AAa_Value>
     <AAb_Tit desc=""><![CDATA[]]></AAb_Tit>
     <AAb_Value desc=""><![CDATA[]]></AAb_Value>
+    <BB_Refund desc=""><![CDATA[]]></BB_Refund>
     <Loading desc=""><![CDATA[]]></Loading>
     <LoadFailed desc=""><![CDATA[]]></LoadFailed>
     <LoadSucceed desc=""><![CDATA[]]></LoadSucceed>

BIN
Assets/Resource/Xlsx/language_config.xlsx


+ 5 - 2
Assets/Script/Manage/Initializer.cs

@@ -142,6 +142,9 @@ public class Initializer : MonoBehaviour
             progress = "31";
             gameObject.AddScript<PlazaRoomMge>();
 
+            progress = "31-1";
+            gameObject.AddScript<ChestMge>();
+
             progress = "32";
             StartCoroutine(IInitialize());
         }
@@ -284,8 +287,8 @@ public class Initializer : MonoBehaviour
         debugLab.text = "Error code : 8";
         ManaCenter.LoginCallbackInitial(new JsonData());
 
-        debugLab.text = "Error code : 9";
-        //GardenSmartFoxManager.GardenSmartFox.PlazaRoomManager.SyncClose();
+        //debugLab.text = "Error code : 9";
+        //SFSManager.GardenSmartFox.Connector.Connect();
 
         debugLab.text = "Error code : 10";
         StringFilter.Init();

+ 1 - 0
Assets/Script/Manage/ManaData.cs

@@ -555,6 +555,7 @@ public class ManaData : Regist
             SavePlantList();
             SaveCommon();
             SaveFlowers();
+            ChestMge.Save();
         }
     }
 

+ 16 - 14
Assets/Script/Manage/PlazaRoomMge.cs

@@ -61,14 +61,11 @@ public class PlazaRoomMge : Regist
 
     public override void RegistValueC()
     {
-        DownloadRoomData();
-
         VirtualScrollRect virtualScrollRect = ManaReso.Get<VirtualScrollRect>("Z_ScrollRect");
         virtualScrollRect.OnVerticalLessEqual0 = NextPageGate;
         virtualScrollRect.OnVerticalGreaterEqual1 = PreviousPageGate;
 
         CostFml = ManaData.GetPlazaRoomConfig()[1].Value;
-        OnSliderValueChange(0);
     }
 
     public override void RegistReference()
@@ -104,16 +101,17 @@ public class PlazaRoomMge : Regist
         DownloadLock = true;
         if (FilterEnabled)
         {
-            Debug.Log(CustomLastIndex);
+            //SFSManager.GardenSmartFox.EventManager.PlazaRoomEvent.GetCustomRoomData(CustomLastIndex, long.Parse(ManaServer.SerialNumber));
             SFSManager.GardenSmartFox.ExecuteAfterCheckConection
             (
                 () => SFSManager.GardenSmartFox.EventManager.PlazaRoomEvent.GetCustomRoomData(CustomLastIndex, long.Parse(ManaServer.SerialNumber)),
-                (succeed, baseEvent) => { if(!succeed) { ManaLan.Add(ManaReso.Get<Text>("Z_Tip"), new LanStr("UI", "LoadFailed")); DelayCall.Call(5f, () => { DownloadLock = false; ManaReso.Get("Z_Tip").TweenBacCG(); }); } },
+                (succeed, baseEvent) => { if (!succeed) { ManaLan.Add(ManaReso.Get<Text>("Z_Tip"), new LanStr("UI", "LoadFailed")); DelayCall.Call(5f, () => { DownloadLock = false; ManaReso.Get("Z_Tip").TweenBacCG(); }); } },
                 (succeed, baseEvent) => { if (!succeed) { ManaLan.Add(ManaReso.Get<Text>("Z_Tip"), new LanStr("UI", "LoadFailed")); DelayCall.Call(5f, () => { DownloadLock = false; ManaReso.Get("Z_Tip").TweenBacCG(); }); } }
             );
         }
         else
         {
+            //SFSManager.GardenSmartFox.EventManager.PlazaRoomEvent.GetRoomData(LastIndex);
             SFSManager.GardenSmartFox.ExecuteAfterCheckConection
             (
                 () => SFSManager.GardenSmartFox.EventManager.PlazaRoomEvent.GetRoomData(LastIndex),
@@ -125,23 +123,22 @@ public class PlazaRoomMge : Regist
 
     public static void OnReceiveRoomData(ISFSArray sfsArray)
     {
-        Debug.LogWarning("receive " + sfsArray.Count);
+        //Debug.LogWarning("receive " + sfsArray.Count);
 
         if (FilterEnabled)
         {
             return;
         }
-
+        
         ManaLan.Add(ManaReso.Get<Text>("Z_Tip"), new LanStr("UI", "LoadSucceed"));
         DelayCall.Call(0.5f, () => { ManaReso.Get("Z_Tip").TweenBacCG(); });
 
-        int count = RoomDatas.Count;
         for (int i = 0; i < sfsArray.Count; i++)
         {
             RoomData roomData = new RoomData(sfsArray.GetSFSObject(i));
             if (!RoomDatas.Values.Contains(roomData))
             {
-                RoomDatas.Add(count + i, roomData);
+                RoomDatas.Add(RoomDatas.Count, roomData);
             }
         }
 
@@ -163,7 +160,7 @@ public class PlazaRoomMge : Regist
 
     public static void OnReceiveCustomRoomData(ISFSArray sfsArray)
     {
-        Debug.LogWarning("receive custom " + sfsArray.Count);
+        //Debug.LogWarning("receive custom " + sfsArray.Count);
 
         if (!FilterEnabled)
         {
@@ -243,13 +240,13 @@ public class PlazaRoomMge : Regist
         {
             if (!DownloadLock)
             {
-                Debug.LogWarning("Download Page");
+                //Debug.LogWarning("Download Page");
                 DownloadRoomData();
             }
         }
         else
         {
-            Debug.LogWarning("Next Page");
+            //Debug.LogWarning("Next Page");
             for (int i = 0; i < PageVolume; i++)
             {
                 RoomData roomData;
@@ -272,7 +269,7 @@ public class PlazaRoomMge : Regist
             return;
         }
 
-        Debug.LogWarning("Prev Page");
+        //Debug.LogWarning("Prev Page");
         for (int i = 0; i < PageVolume; i++)
         {
             RoomData roomData;
@@ -327,6 +324,11 @@ public class PlazaRoomMge : Regist
 
     public static void OpenPanel()
     {
+        if (RoomDatas.Count == 0)
+        {
+            DownloadRoomData();
+        }
+        OnSliderValueChange(0);
         ManaReso.Get("Z_BK").TweenForCG();
     }
 
@@ -424,7 +426,7 @@ public class PlazaRoomMge : Regist
         ManaReso.Get<CanvasGroup>("AA_CreatePlazaRoom").interactable = true;
         DownloadRoomData();
 
-        Debug.Log("create succeed");
+        ManaCenter.AddDiamond(-Cost, StaticsManager.ItemID.创建派对, StaticsManager.ConsumeModule.Charge);
     }
 
     public static void OnSliderValueChange(float value)

+ 2 - 2
Assets/Script/Object/PlazaRoomChest.cs

@@ -27,7 +27,7 @@ public class PlazaRoomChest : Chest, IPointerClickHandler
         {
             if (RewardAmt%10 == int.Parse(inputValue))
             {
-                ManaCenter.AddCoin(RewardAmt, StaticsManager.ItemID.获得金币, StaticsManager.ConsumeModule.PlazaRoomChest);
+                ManaCenter.AddCoin(RewardAmt, StaticsManager.ItemID.获得金币, StaticsManager.ConsumeModule.RoomChestAward);
                 ManaAudio.PlayClip(Clip.CurrentClip);
                 ManaReso.SetText("Y_Desc", $"{Language.GetStr("UI", "Y_Bingo")} {Language.GetStr("Common", "Get")}<(金币)>{RewardAmt}");
                 GuessSucceed();
@@ -38,7 +38,7 @@ public class PlazaRoomChest : Chest, IPointerClickHandler
         {
             if (RewardAmt%10 == int.Parse(inputValue))
             {
-                ManaCenter.AddDiamond(RewardAmt, StaticsManager.ItemID.获得钻石, StaticsManager.ConsumeModule.PlazaRoomChest);
+                ManaCenter.AddDiamond(RewardAmt, StaticsManager.ItemID.获得钻石, StaticsManager.ConsumeModule.RoomChestAward);
                 ManaAudio.PlayClip(Clip.CurrentClip);
                 ManaReso.SetText("Y_Desc", $"{Language.GetStr("UI", "Y_Bingo")} {Language.GetStr("Common", "Get")}<(钻石)>{RewardAmt}");
                 GuessSucceed();

+ 2 - 2
Assets/Script/Object/PlazaRoomItem.cs

@@ -52,8 +52,8 @@ public class RoomData
         Duration = arg.GetInt(DurationLabel);
         MaxPlayer = arg.GetInt(MaxPlayerLabel);
         Name = arg.GetUtfString(NameLabel);
-        StartTime = DateUtil.GetTime(arg.GetClass(StartTimeLabel).ToString().TrimEnd('0'));
-        EndTime = DateUtil.GetTime(arg.GetClass(EndTimeLabel).ToString().TrimEnd('0'));
+        StartTime = DateUtil.GetJavaTime(arg.GetLong(StartTimeLabel).ToString());
+        EndTime = DateUtil.GetJavaTime(arg.GetLong(EndTimeLabel).ToString());
 
         if (ID == 1)
             IsSystemRoom = true;

+ 7 - 0
Assets/Script/SFS/Data/ChestType.cs

@@ -0,0 +1,7 @@
+public enum ChestType
+{
+    System=(0),
+    Lucky=(1),
+    GuessNumber=(2),
+    GuessColor=(3),
+}

+ 12 - 0
Assets/Script/SFS/Data/ChestType.cs.meta

@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 63c8ebc133eddda499a14bd6ee20a462
+timeCreated: 1508574874
+licenseType: Pro
+MonoImporter:
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 1 - 1
Assets/Script/SFS/Data/PlazaRoomRep.cs

@@ -10,7 +10,7 @@
     CreateChestSucceed=(7),
     ReceiveNewChest=(8),
     ReceiveChestRefund=(9),
-    ReceiveChestData=(10),
+    ReceiveChestAward=(10),
     ReceiveAllChestData=(11),
     ReceiveRoomData=(12),
     ReceiveCustomRoomData=(13),

+ 1 - 1
Assets/Script/SFS/Data/PlazaRoomReq.cs

@@ -9,7 +9,7 @@
     CheckDefaultChest=(5),
     CheckChestRefund=(6),
 
-    GetChestData=(7),
+    GetChestAward=(7),
     GetAllChestData=(8),
     GetRoomData=(9),
     GetCustomRoomData=(10),

+ 179 - 0
Assets/Script/SFS/Manager/ChestMge.cs

@@ -0,0 +1,179 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.IO;
+using System.Xml;
+using Sfs2X.Entities.Data;
+using UnityEngine;
+
+public class ChestData
+{
+    #region Config
+
+    public int Value;
+    public int Round;
+    public int RemainValue;
+    public int RemainRound;
+    public int DatabaseRoomID;
+    public long ID;
+    public long Owner;
+    public DateTime ActivatedTime;
+    public ChestType ChestType;
+
+    #endregion
+
+    public ChestData(ISFSObject arg)
+    {
+        ID = arg.GetLong(gd_chest.ID);
+        Value = arg.GetInt(gd_chest.Value);
+        Round = arg.GetInt(gd_chest.Round);
+        RemainValue = arg.GetInt(gd_chest.RemainValue);
+        RemainRound = arg.GetInt(gd_chest.RemainRound);
+        DatabaseRoomID = arg.GetInt(gd_chest.DatabaseRoomID);
+        Owner = arg.GetLong(gd_chest.Owner);
+        ActivatedTime = DateUtil.GetJavaTime(arg.GetLong(gd_chest.ActivatedTime).ToString());
+        ChestType = (ChestType) arg.GetInt(gd_chest.Type);
+    }
+}
+
+public class ChestMge : Regist
+{
+    #region Config
+
+    private static string RefundNodeName = "Refund";
+    private static string ReceivedNodeName = "Received";
+
+    private static List<int> RefundRoomIDs = new List<int>();
+    private static List<long> ReceivedChestIDs = new List<long>();
+
+    #endregion
+
+    public override void RegistValueA()
+    {
+        XmlNodeList RefundNodes = ManaData.PlayerNode.SelectNodes(RefundNodeName);
+        XmlNodeList ReceivedNodes = ManaData.PlayerNode.SelectNodes(ReceivedNodeName);
+        for (int i = 0; i < RefundNodes.Count; i++)
+        {
+            RefundRoomIDs.Add(int.Parse(RefundNodes[i].InnerText));
+        }
+        for (int i = 0; i < ReceivedNodes.Count; i++)
+        {
+            ReceivedChestIDs.Add(long.Parse(ReceivedNodes[i].InnerText));
+        }
+        CheckRefund();
+        //RefundRoomIDs.Add(1);
+        //RefundRoomIDs.Add(98);
+        //RefundRoomIDs.Add(99);
+        //foreach (var VARIABLE in RefundRoomIDs)
+        //{
+        //    Debug.Log(VARIABLE);
+        //}
+
+        //foreach (var VARIABLE in ReceivedChestIDs)
+        //{
+        //    Debug.Log(VARIABLE);
+        //}
+        //RefundRoomIDs.Add(1);
+        //RefundRoomIDs.Add(2);
+        //ReceivedChestIDs.Add(100);
+        //ReceivedChestIDs.Add(200);
+        //RefundRoomIDs.Remove(1);
+        //RefundRoomIDs.Remove(2);
+        //ReceivedChestIDs.Remove(100);
+        //ReceivedChestIDs.Remove(200);
+    }
+
+
+    private void CheckRefund()
+    {
+        if (RefundRoomIDs.Count == 0)
+        {
+            return;
+        }
+        else
+        {
+            SFSManager.GardenSmartFox.EventManager.PlazaRoomEvent.CheckChestRefund(RefundRoomIDs);
+        }
+    }
+
+
+    public static void ReceiveAllChestData(List<ChestData> chestDatas)
+    {
+        
+    }
+
+    public static bool HasReceived(long chestID)
+    {
+        if (ReceivedChestIDs.Contains(chestID))
+        {
+            return true;
+        }
+        else
+        {
+            return false;
+        }
+    }
+
+    public static void ActivateSystemChest(long chestID)
+    {
+        ReceivedChestIDs.Remove(chestID);
+    }
+
+    public static void ReceiveChestAward(int award)
+    {
+        //ReceivedChestIDs.Add(chestID);
+
+        if (award == 0)
+        {
+            Bubble.Show(null, Language.GetStr("UI", "Y_SoldOut"));
+        }
+        else
+        {
+            
+        }
+    }
+
+    public static void ReceiveChestRefund(int refund, List<int> databaseRoomIDs)
+    {
+        foreach (var databaseRoomID in databaseRoomIDs)
+        {
+            RefundRoomIDs.Remove(databaseRoomID);
+        }
+
+        if (refund > 0)
+        {
+            ManaCenter.AddDiamond(refund, StaticsManager.ItemID.获得钻石, StaticsManager.ConsumeModule.RoomChestRefund);
+            ManaInfoBox.Show(InfoCategory.Garden, Language.GetStr("UI", "BB_Refund")+refund, 30);
+        }
+    }
+
+    public static void Save()
+    {
+        XmlNode node = ManaData.PlayerNode.SelectSingleNode(RefundNodeName);
+        while (node != null)
+        {
+            ManaData.PlayerNode.RemoveChild(node);
+            node = ManaData.PlayerNode.SelectSingleNode(RefundNodeName);
+        }
+        node = ManaData.PlayerNode.SelectSingleNode(ReceivedNodeName);
+        while (node != null)
+        {
+            ManaData.PlayerNode.RemoveChild(node);
+            node = ManaData.PlayerNode.SelectSingleNode(ReceivedNodeName);
+        }
+
+
+        foreach (var id in RefundRoomIDs)
+        {
+            node = ManaData.PlayerDoc.CreateNode(XmlNodeType.Element, RefundNodeName, null);
+            node.InnerText = id.ToString();
+            ManaData.PlayerNode.AppendChild(node);
+        }
+        foreach (var id in ReceivedChestIDs)
+        {
+            node = ManaData.PlayerDoc.CreateNode(XmlNodeType.Element, ReceivedNodeName, null);
+            node.InnerText = id.ToString();
+            ManaData.PlayerNode.AppendChild(node);
+        }
+    }
+}

+ 12 - 0
Assets/Script/SFS/Manager/ChestMge.cs.meta

@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 6c9bf2426d5ebed4dabd0cc3ca4470e9
+timeCreated: 1508565696
+licenseType: Pro
+MonoImporter:
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 1 - 1
Assets/Script/SFS/Manager/GardenSmartFox.cs

@@ -84,7 +84,7 @@ public class GardenSmartFox
             (
                 baseEven =>
                 {
-                    execute.Invoke();
+                    execute.SafeInvoke();
                 }
             ).Bind(ref Loggor.onLogin);
         }

+ 4 - 4
Assets/Script/SFS/SFSEvent/EventDispatcher.cs

@@ -61,15 +61,15 @@ public class EventDispatcher
         }
         else if (cmd == PlazaRoomRep.ReceiveChestRefund.GetHashString())
         {
-
+            SFSEventManager.PlazaRoomEvent.OnReceiveChestRefund(baseEvent);
         }
-        else if (cmd == PlazaRoomRep.ReceiveChestData.GetHashString())
+        else if (cmd == PlazaRoomRep.ReceiveChestAward.GetHashString())
         {
-
+            SFSEventManager.PlazaRoomEvent.OnReceiveChestAward(baseEvent);
         }
         else if (cmd == PlazaRoomRep.ReceiveAllChestData.GetHashString())
         {
-            
+            SFSEventManager.PlazaRoomEvent.OnReceiveAllChestData(baseEvent);
         }
         else if (cmd == PlazaRoomRep.ReceiveRoomData.GetHashString())
         {

+ 59 - 1
Assets/Script/SFS/SFSEvent/PlazaRoomEvent.cs

@@ -45,7 +45,6 @@ public class PlazaRoomEvent
         SFSEventManager.GardenSmartFox.AddRequest(parameter, RequestType.Immediate);
     }
 
-
     public void GetRoomStatus(List<int> databaseRoomIDs)
     {
         SFSObject parameter = new SFSObject();
@@ -97,6 +96,7 @@ public class PlazaRoomEvent
         );
     }
 
+
     public void SendSynchronizeDestination(Vector3 destination)
     {
         SFSObject sfsObject = new SFSObject();
@@ -142,6 +142,64 @@ public class PlazaRoomEvent
     }
 
 
+    public void GetChestAward(long chestID)
+    {
+        SFSObject parameter = new SFSObject();
+        parameter.PutInt(Label.CommandID, PlazaRoomReq.GetChestAward.GetHashCode());
+        parameter.PutLong(gd_chest.ID, chestID);
+        SFSEventManager.GardenSmartFox.AddRequest(parameter, RequestType.Immediate);
+    }
+
+    public void GetAllChestData(int databaseRoomID)
+    {
+        SFSObject parameter = new SFSObject();
+        parameter.PutInt(Label.CommandID, PlazaRoomReq.GetAllChestData.GetHashCode());
+        parameter.PutInt(Label.DatabaseRoomID, databaseRoomID);
+        SFSEventManager.GardenSmartFox.AddRequest(parameter, RequestType.Immediate);
+    }
+
+    public void CheckChestRefund(List<int> databaseRoomIDs)
+    {
+        SFSManager.GardenSmartFox.ExecuteAfterCheckConection
+        (
+            () =>
+            {
+                SFSObject parameter = new SFSObject();
+                parameter.PutInt(Label.CommandID, PlazaRoomReq.CheckChestRefund.GetHashCode());
+                parameter.PutLong(Label.UserID, long.Parse(ManaServer.SerialNumber));
+                parameter.PutIntArray(Label.DataArray, databaseRoomIDs.ToArray());
+                SFSEventManager.GardenSmartFox.AddRequest(parameter, RequestType.Immediate);
+            }
+        );
+    }
+
+    public void OnReceiveChestAward(BaseEvent baseEvent)
+    {
+        int award = (baseEvent.Params["params"] as ISFSObject).GetInt(Label.Data);
+        ChestMge.ReceiveChestAward(award);
+    }
+
+    public void OnReceiveAllChestData(BaseEvent baseEvent)
+    {
+        ISFSArray array = (baseEvent.Params["params"] as ISFSObject).GetSFSArray(Label.DataArray);
+        List<ChestData> chestDatas = new List<ChestData>();
+        for (int i = 0; i < array.Size(); i++)
+        {
+            chestDatas.Add(new ChestData(array.GetSFSObject(i)));
+        }
+        ChestMge.ReceiveAllChestData(chestDatas);
+    }
+
+    public void OnReceiveChestRefund(BaseEvent baseEvent)
+    {
+        ISFSObject arg = baseEvent.Params["params"] as ISFSObject;
+        int refund = arg.GetInt(Label.Data);
+        List<int> databaseRoomIDs = arg.GetIntArray(Label.DataArray).ToList();
+
+        ChestMge.ReceiveChestRefund(refund, databaseRoomIDs);
+    }
+
+
     public void OnReceiveRoomData(BaseEvent baseEvent)
     {
         ISFSArray array = (baseEvent.Params["params"] as ISFSObject).GetSFSArray(Label.DataArray);

+ 4 - 1
Assets/Script/ThirdParty/DataEyeStatics/StaticsManager.cs

@@ -238,6 +238,8 @@ public class StaticsManager
         获得钻石,
         获得金币,
         获得小游戏,
+        创建派对,
+        创建宝箱,
     }
 
     public enum ItemType
@@ -260,7 +262,8 @@ public class StaticsManager
         ClickFlower,
         Mail,
         VisitRefund,
-        PlazaRoomChest,
+        RoomChestAward,
+        RoomChestRefund,
     }
 
     public static string GetStringByConsumeModule(ConsumeModule module)

+ 2 - 1
Assets/Script/Tool/Auxiliary.cs

@@ -142,13 +142,14 @@ public class Auxiliary : Regist
 
         if (Input.GetKeyDown(KeyCode.Space))
         {
-            SFSManager.GardenSmartFox.SmartFox.Disconnect();
+            SFSManager.GardenSmartFox.EventManager.PlazaRoomEvent.CheckChestRefund(new List<int>() {1,98,99});
             //ManaReso.Get<VerticalLayoutGroup>("R_Grid").CalculateLayoutInputVertical();
             //ManaReso.Get<VerticalLayoutGroup>("R_Grid").SetLayoutVertical();
         }
 
         if (Input.GetKeyDown(KeyCode.A))
         {
+            ManaCenter.Diamond = 0;
             //PlazaRoomMge.DownloadRoomData(0);
             //DatabaseManager.GetRoomList(-1);
 

+ 8 - 0
Assets/Script/Tool/DashGame/DateUtil.cs

@@ -148,6 +148,14 @@ public class DateUtil
         return dtStart.Add(toNow);
     }
 
+    public static DateTime GetJavaTime(string timeStamp)
+    {
+        DateTime dtStart = TimeZone.CurrentTimeZone.ToLocalTime(new DateTime(1970, 1, 1));
+        long lTime = long.Parse(timeStamp + "0000");
+        TimeSpan toNow = new TimeSpan(lTime);
+        return dtStart.Add(toNow);
+    }
+
     /// <summary>
     /// DateTime时间格式转换为Unix时间戳格式
     /// </summary>

+ 7 - 4
第三期.txt

@@ -1,14 +1,17 @@
-不隐藏系统房间
+创建宝箱记得扣费
 
-房间已过期 房间已满的后续处理
-
-测试每过一段时间刷新一次状态(两种模式)
+创建了宝箱后要在refund里记录
 
 新界面的语言
 
 
+公式在新的excel里面
+
+
 服务器新旧版存取档是否兼容(如果不兼容 可能无法从第二期切换到第三期)
 
+关闭ManaDebug
+
 切换到远程服务器
 
 关闭调试按键和界面