Files
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

79 lines
2.3 KiB
C#

using LitJson;
using Wizard;
public class UserRank : HeaderData
{
public class GrandMasterData
{
public int[] id = new int[3];
public int[] periodNum = new int[3];
public int[] masterPoint = new int[3];
public int[] rankId = new int[3];
public int targetMasterPoint;
public int currentMasterPoint;
}
public const int GRAND_MASTER_PERIOD = 3;
public const int MASTER_RANK_INDEX = 24;
public int rank;
public int battle_point;
public int master_point;
public int successive_win_number;
public bool is_master_rank;
public bool is_grand_master_rank;
public GrandMasterData grandMasterData = new GrandMasterData();
public UserPromotionMatch user_promotion_match = new UserPromotionMatch();
public static bool IsGrandMasterAvailability { get; set; }
public void Initialize(JsonData userRank, Format format)
{
rank = userRank["rank"].ToInt();
battle_point = userRank["battle_point"].ToInt();
master_point = userRank["master_point"].ToInt();
successive_win_number = userRank["successive_win_number"].ToInt();
is_master_rank = userRank["is_master_rank"].ToInt() != 0;
is_grand_master_rank = userRank.GetValueOrDefault("is_grand_master_rank", 0) != 0;
user_promotion_match.is_promotion = userRank["is_promotion"].ToInt() != 0;
if (user_promotion_match.is_promotion)
{
user_promotion_match.match_count = userRank["user_promotion_match"]["match_count"].ToInt();
user_promotion_match.battle_result = userRank["user_promotion_match"]["battle_result"].ToInt();
user_promotion_match.win = userRank["user_promotion_match"]["win"].ToInt();
user_promotion_match.lose = userRank["user_promotion_match"]["lose"].ToInt();
}
if (is_master_rank && format != Format.Crossover)
{
IsGrandMasterAvailability = false;
if (userRank.Keys.Contains("target_grand_master_point"))
{
grandMasterData.targetMasterPoint = userRank["target_grand_master_point"].ToInt();
IsGrandMasterAvailability = true;
}
if (userRank.Keys.Contains("current_grand_master_point"))
{
grandMasterData.currentMasterPoint = userRank["current_grand_master_point"].ToInt();
IsGrandMasterAvailability = true;
}
}
if (is_master_rank && format == Format.Crossover)
{
grandMasterData.currentMasterPoint = master_point;
}
}
}