6 major server modules (PdkFriendServer/GlobalSever/ServerCore/GameModule/GameNetModule) + game logic (GameFix/GameDAL/ServerData) + network layer (NetWorkMessage) + data layer (ObjectModel) + utilities (MrWu/Core/Config/CloudAPI/dll) + adapters (zyxAdapter/base) .NET 8.0 C# solution, 16 projects, 958 source files
48 lines
1.2 KiB
C#
48 lines
1.2 KiB
C#
using System;
|
|
|
|
#if Server
|
|
namespace Server
|
|
#else
|
|
namespace UnityGame
|
|
#endif
|
|
{
|
|
public class ActivityPropData_MenPiao : ActivityPropDataInfo
|
|
{
|
|
/// <summary>
|
|
/// 获取道具名称 保质期是两周
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
public override string[] GetPropNames()
|
|
{
|
|
return new string[]
|
|
{
|
|
//本周过期
|
|
GetNowWeekSunDay().ToString("yyyyMMdd"),
|
|
//下周过期
|
|
GetNowWeekSunDay().AddDays(7).ToString("yyyyMMdd")
|
|
};
|
|
}
|
|
|
|
public override ActivityPropType PropType
|
|
{
|
|
get
|
|
{
|
|
return ActivityPropType.MenPiao;
|
|
}
|
|
}
|
|
|
|
public override DateTime GetExpireTime(string propName)
|
|
{
|
|
if (DateTime.TryParseExact(propName, "yyyyMMdd", null, System.Globalization.DateTimeStyles.None,
|
|
out DateTime time))
|
|
{
|
|
return time;
|
|
}
|
|
else
|
|
{
|
|
return DateTime.Now;
|
|
}
|
|
}
|
|
|
|
}
|
|
} |