From b82d1347f6b6e44b9824f0b4d456a9245d07af5a Mon Sep 17 00:00:00 2001
From: client_Zxw <826696702@qq.com>
Date: 星期一, 12 十一月 2018 21:07:10 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
---
System/Dungeon/DungeonData.cs | 23 +++++++++++++----------
1 files changed, 13 insertions(+), 10 deletions(-)
diff --git a/System/Dungeon/DungeonData.cs b/System/Dungeon/DungeonData.cs
index 0e2b787..4ad6a95 100644
--- a/System/Dungeon/DungeonData.cs
+++ b/System/Dungeon/DungeonData.cs
@@ -227,23 +227,26 @@
}
- public class DungeonEnterCD
+ public class DungeonEnterCoolDown
{
public int mapId;
- public uint dungeonSurplusTime;
- public uint enterCd;
- public uint clearCdCost;
- public DateTime overdueTime;
+ public int level;
+ public int duration;
+ public int clearCoolDownCost;
+ public DateTime endCoolDownTime;
- public void SetEnterTime(uint _enterTime)
+ public void SetEnterTime(uint tick)
{
- dungeonSurplusTime = _enterTime;
- overdueTime = DateTime.Now.AddSeconds(dungeonSurplusTime);
+ endCoolDownTime = TimeUtility.GetTime(tick);
+ endCoolDownTime = endCoolDownTime.AddTicks(duration * TimeSpan.TicksPerSecond);
}
- public void SetCost(uint _cost)
+ public int suplursSeconds
{
- clearCdCost = _cost;
+ get
+ {
+ return Mathf.Max(0, (int)(endCoolDownTime - TimeUtility.ServerNow).TotalSeconds);
+ }
}
}
--
Gitblit v1.8.0