Files
hjha-server/GlobalSever/Manager/ActivityPropData/ActivityPropData_MenPiao.cs
xiaoou e9616125ce feat: initial commit - HJHA game server full source
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
2026-07-07 12:02:15 +08:00

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;
}
}
}
}