-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix error caused by guild mission end
- Loading branch information
Showing
2 changed files
with
19 additions
and
11 deletions.
There are no files selected for viewing
24 changes: 14 additions & 10 deletions
24
MementoMori.Ortega/Share/Master/Table/GuildMissionTable.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,22 @@ | ||
using MementoMori.Ortega.Share.Master.Data; | ||
using MementoMori.Ortega.Share.Utils; | ||
|
||
namespace MementoMori.Ortega.Share.Master.Table | ||
{ | ||
public class GuildMissionTable : TableBase<GuildMissionMB> | ||
{ | ||
public GuildMissionMB GetCurrentGuildMissionMB(OrtegaTimeManager timeManager) | ||
{ | ||
// int num = 0; | ||
// bool flag; | ||
// if (!flag) | ||
// { | ||
// num++; | ||
// } | ||
throw new NullReferenceException(); | ||
} | ||
public GuildMissionMB GetCurrentGuildMissionMB(DateTime serverNow) | ||
{ | ||
foreach (var guildMissionMb in this._datas) | ||
{ | ||
var startTime = guildMissionMb.StartTime.ToDateTime(); | ||
var endTime = guildMissionMb.EndTime.ToDateTime(); | ||
if (startTime <= serverNow && serverNow <= endTime) | ||
{ | ||
return guildMissionMb; | ||
} | ||
} | ||
return null; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters