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.
92 lines
2.7 KiB
C#
92 lines
2.7 KiB
C#
using LitJson;
|
|
|
|
namespace Wizard;
|
|
|
|
public class BattlePassGaugeInfo
|
|
{
|
|
public int CurrentPoint { get; private set; }
|
|
|
|
public int CurrentLevel { get; private set; }
|
|
|
|
public BattlePassLevelInfo BattlePassLevelInfo => Data.Load.data.BattlePassLevelInfoList[CurrentLevel];
|
|
|
|
public bool IsMaxPoint => CurrentPoint >= BattlePassUtility.BattlePassMaxPoint;
|
|
|
|
public int BeforeCurrentPoint { get; private set; }
|
|
|
|
public int BeforeCurrentLevel { get; private set; }
|
|
|
|
public BattlePassLevelInfo BeforeBattlePassLevelInfo => Data.Load.data.BattlePassLevelInfoList[BeforeCurrentLevel];
|
|
|
|
public bool IsBeforeMaxPoint => BeforeCurrentPoint >= BattlePassUtility.BattlePassMaxPoint;
|
|
|
|
public int PointAdd { get; private set; }
|
|
|
|
public int DailryMissionPoint { get; private set; }
|
|
|
|
public int BattlePassMissionPoint { get; private set; }
|
|
|
|
public int BattleResultPoint { get; private set; }
|
|
|
|
public int WeeklyBattlePassPoint { get; private set; }
|
|
|
|
public int WeeklyLimitPoint { get; private set; }
|
|
|
|
public bool IsPremium { get; private set; }
|
|
|
|
public bool IsLevelChange => CurrentLevel != BeforeCurrentLevel;
|
|
|
|
public float BeforeGaugeValue => (float)(BeforeCurrentPoint - BeforeBattlePassLevelInfo.RequiredPoint) / (float)BattlePassUtility.NextLevelRequiredPoint(BeforeCurrentLevel);
|
|
|
|
public int NextLevelRequiredPoint
|
|
{
|
|
get
|
|
{
|
|
if (!IsMaxPoint)
|
|
{
|
|
return Data.Load.data.BattlePassLevelInfoList[CurrentLevel + 1].RequiredPoint - CurrentPoint;
|
|
}
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
public int BeforeLevelNextLevelRequiredPoint
|
|
{
|
|
get
|
|
{
|
|
if (!IsBeforeMaxPoint)
|
|
{
|
|
return Data.Load.data.BattlePassLevelInfoList[BeforeCurrentLevel + 1].RequiredPoint - BeforeCurrentPoint;
|
|
}
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
public BattlePassGaugeInfo(JsonData jsonData)
|
|
{
|
|
CurrentPoint = jsonData["current_point"].ToInt();
|
|
CurrentLevel = jsonData["current_level"].ToInt();
|
|
if (jsonData.Keys.Contains("point_add"))
|
|
{
|
|
BeforeCurrentPoint = jsonData["before_current_point"].ToInt();
|
|
BeforeCurrentLevel = jsonData["before_target_level"].ToInt();
|
|
DailryMissionPoint = jsonData["daily_mission_point"].ToInt();
|
|
BattlePassMissionPoint = jsonData["battle_pass_mission_point"].ToInt();
|
|
BattleResultPoint = jsonData["battle_result_point"].ToInt();
|
|
IsPremium = jsonData["is_premium"].ToBoolean();
|
|
PointAdd = jsonData["point_add"].ToInt();
|
|
}
|
|
WeeklyBattlePassPoint = jsonData.GetValueOrDefault("weekly_battle_pass_point", 0);
|
|
WeeklyLimitPoint = jsonData.GetValueOrDefault("weekly_limit_point", 0);
|
|
}
|
|
|
|
public float CurrentGaugeValue()
|
|
{
|
|
if (IsMaxPoint)
|
|
{
|
|
return 1f;
|
|
}
|
|
return (float)(CurrentPoint - BattlePassLevelInfo.RequiredPoint) / (float)BattlePassUtility.NextLevelRequiredPoint(CurrentLevel);
|
|
}
|
|
}
|