| | |
| | | return a.CompareTo(b); |
| | | } |
| | | |
| | | public bool TryGetLimitTimeShow(PhantasmPavilionType type, int id, out int remainingSeconds) |
| | | { |
| | | remainingSeconds = 0; |
| | | if (!Has(type, id)) |
| | | return false; |
| | | if (!IsLimitTime(type, id)) |
| | | return false; |
| | | if (!IsUnlock(type, id)) |
| | | return false; |
| | | if (!TryGetInfo(type, id, out var info)) |
| | | return false; |
| | | DateTime endDateTime = TimeUtility.GetTime(info.EndTime); |
| | | TimeSpan remainingTime = endDateTime - TimeUtility.ServerNow; |
| | | remainingSeconds = (int)remainingTime.TotalSeconds; |
| | | return remainingSeconds > 0; |
| | | } |
| | | |
| | | // 除道具解锁外,其他方式暂默认永久 |
| | | // 是否有时效 true 有时间限制 false 永久(无时间限制) |
| | | public bool IsLimitTime(PhantasmPavilionType type, int id) |