Files
SVSimServer/SVSim.BattleEngine/Engine/Wizard.Lottery/LotteryMissionData.cs
gamer147 957af3d1ec feat(battle-engine): full Unity/VFX/god-object shims + expanded copy closure (2570 files)
Authored Unity primitive/object-model shim, VFX layer (control-flow-preserving, InstantVfx never invokes its action -- headless suppression), god-object stubs (GameMgr/EffectMgr/UIManager with faithfully-extracted nested enums), View/UI/Touch tree, LitJson+BetterList+Tuple copied, third-party stubs. Discovered Roslyn header-error masking: fixing class-header type errors unmasks body references, so the true copy closure is ~2570 files (was 782 under masking). Errors: masked-25720 -> 268; our shim files compile clean. Remaining: ~50 residual shim/external types, 24 NGUI UI-base overrides, static-type fixes, plus likely 1-2 more unmask waves.
2026-06-05 17:22:20 -04:00

58 lines
1.6 KiB
C#

using LitJson;
namespace Wizard.Lottery;
public class LotteryMissionData
{
public int MissionId { get; private set; }
public string MissionTitle { get; private set; }
public UserGoods.Type UserGoodsType { get; private set; }
public int ItemId { get; private set; }
public int ItemCount { get; private set; }
public RemainTime StartTime { get; private set; }
public RemainTime EndTime { get; private set; }
public int MissionCurrent { get; private set; }
public int MissionMax { get; private set; }
public bool IsCleared { get; private set; }
public bool IsTimeOver { get; private set; }
public float MissionRatio
{
get
{
if (MissionMax == 0)
{
return 0f;
}
return (float)MissionCurrent / (float)MissionMax;
}
}
public LotteryMissionData(JsonData json, double serverTime)
{
MissionId = json["mission_id"].ToInt();
ItemId = json["reward_detail_id"].ToInt();
UserGoodsType = (UserGoods.Type)json["reward_type"].ToInt();
ItemCount = json["reward_number"].ToInt();
MissionTitle = json["mission_name"].ToString();
MissionCurrent = json["total_count"].ToInt();
MissionMax = json["require_number"].ToInt();
IsCleared = json["is_achieved"].ToInt() == 1;
IsTimeOver = json["is_failed"].ToInt() == 1;
string endTime = ConvertTime.UnixTimeToDateTime(json["start_time"].ToInt()).ToString();
string endTime2 = ConvertTime.UnixTimeToDateTime(json["end_time"].ToInt()).ToString();
StartTime = new RemainTime(endTime, serverTime);
EndTime = new RemainTime(endTime2, serverTime);
}
}