Files
SVSimServer/SVSim.BattleEngine/Engine/Wizard/CampaignBattleWin.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

78 lines
1.8 KiB
C#

using System;
using System.Collections.Generic;
using LitJson;
namespace Wizard;
public class CampaignBattleWin
{
public enum eBoxGrade
{
None,
One,
Two,
Three,
Four,
Five,
Six
}
public enum eBoxStatus
{
NO_GET,
ACTIVE,
ALREADY_GET
}
public bool IsInSessionCampaign { get; private set; }
public bool IsHaveSpecialWinReward { get; private set; }
public int EndUnixTime { get; private set; }
public int MaxBoxNum { get; private set; }
public int GetBoxNum { get; private set; }
public eBoxGrade BoxGrade { get; private set; }
public eBoxStatus BoxStatus { get; private set; }
public List<CampaignRewardInfo> RewardList { get; private set; }
public SpecialTreasureInfo SpecialTreasureInfo { get; private set; }
public void Parse(JsonData json)
{
IsInSessionCampaign = true;
GetBoxNum = json["daily_box_got_num"].ToInt();
MaxBoxNum = json["max_daily_box_got_num"].ToInt();
BoxGrade = (eBoxGrade)json["grade_id"].ToInt();
BoxStatus = (eBoxStatus)json["daily_rare_box_state"].ToInt();
EndUnixTime = (int)ConvertTime.DateTimeToUnixTime(DateTime.Parse(json["end_time"].ToString()));
RewardList = new List<CampaignRewardInfo>();
JsonData jsonData = json["limited_reward_info"];
for (int i = 0; i < jsonData.Count; i++)
{
RewardList.Add(new CampaignRewardInfo(jsonData[i]));
}
if (json.Keys.Contains("special_treasure_info"))
{
IsHaveSpecialWinReward = true;
SpecialTreasureInfo = new SpecialTreasureInfo(json["special_treasure_info"]);
}
}
public void Clear()
{
IsInSessionCampaign = false;
IsHaveSpecialWinReward = false;
RewardList = new List<CampaignRewardInfo>();
}
public void OnFinishCanpaignTime()
{
Clear();
}
}