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.
118 lines
2.8 KiB
C#
118 lines
2.8 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using Cute;
|
|
using LitJson;
|
|
using UnityEngine;
|
|
using Wizard;
|
|
using Wizard.Lottery;
|
|
|
|
public class PracticePuzzleResultReporter : IBattleResultReporter
|
|
{
|
|
private readonly GameObject _reportEndAgentObj;
|
|
|
|
private readonly PracticePuzzleReportEndAgent _reportEndAgent;
|
|
|
|
public bool IsEnd => _reportEndAgent.IsEnd;
|
|
|
|
public int RankExp => GetRankExp();
|
|
|
|
public int AfterRankExp => GetAfterRankExp();
|
|
|
|
public int ClassExp => GetClassExp();
|
|
|
|
public int WinCount => GetWinCount();
|
|
|
|
public int RankExpBonus => GetRankExpBonus();
|
|
|
|
public List<UserAchievement> UserAchievement => GetUserAchievementList();
|
|
|
|
public List<UserMission> UserMission => GetUserMissionList();
|
|
|
|
public List<ReceivedReward> MissionRewards => GetRewardsList();
|
|
|
|
public List<ReceivedReward> VictoryRewards => null;
|
|
|
|
public LotteryApplyData LotteryData => Data.PracticePuzzleFinishData.AchievedInfo._lotteryData;
|
|
|
|
public MyPageHomeDialogData HomeDialogData => null;
|
|
|
|
public bool IsDataExist => true;
|
|
|
|
public PracticePuzzleResultReporter()
|
|
{
|
|
_reportEndAgentObj = new GameObject();
|
|
_reportEndAgent = _reportEndAgentObj.AddComponent<PracticePuzzleReportEndAgent>();
|
|
}
|
|
|
|
public void Report(bool isWin)
|
|
{
|
|
StartFinishPractice(isWin, delegate
|
|
{
|
|
_reportEndAgent.Finished();
|
|
});
|
|
}
|
|
|
|
public void StartFinishPractice(bool isWin, Action callback)
|
|
{
|
|
DataMgr dataMgr = GameMgr.GetIns().GetDataMgr();
|
|
NetworkManager networkManager = Toolbox.NetworkManager;
|
|
PracticePuzzleBattleFinish practicePuzzleBattleFinish = new PracticePuzzleBattleFinish();
|
|
LocalLog.RecordCheckLog(LocalLog.RecordType.CERBERUS, isWin);
|
|
practicePuzzleBattleFinish.SetParameter(dataMgr.PuzzleQuestId, (BattleManagerBase.GetIns() as PuzzleBattleManager).RetryCount, isWin);
|
|
_reportEndAgent.StartCoroutine(networkManager.Connect(practicePuzzleBattleFinish, delegate
|
|
{
|
|
callback.Call();
|
|
}, BaseTask.OnRequestFailed, BaseTask.OnFailedErrorCode));
|
|
}
|
|
|
|
public void Destroy()
|
|
{
|
|
UnityEngine.Object.Destroy(_reportEndAgentObj);
|
|
}
|
|
|
|
public JsonData GetFinishResponseData()
|
|
{
|
|
return Data.PracticePuzzleFinishData._responseData;
|
|
}
|
|
|
|
public List<UserAchievement> GetUserAchievementList()
|
|
{
|
|
return Data.PracticePuzzleFinishData.achieved_achievement_list;
|
|
}
|
|
|
|
public List<UserMission> GetUserMissionList()
|
|
{
|
|
return Data.PracticePuzzleFinishData.achieved_mission_list;
|
|
}
|
|
|
|
public List<ReceivedReward> GetRewardsList()
|
|
{
|
|
return Data.PracticePuzzleFinishData.Rewards;
|
|
}
|
|
|
|
public int GetRankExp()
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
public int GetAfterRankExp()
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
public int GetClassExp()
|
|
{
|
|
return Data.PracticePuzzleFinishData.get_class_chara_experience;
|
|
}
|
|
|
|
public int GetWinCount()
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
public int GetRankExpBonus()
|
|
{
|
|
return 0;
|
|
}
|
|
}
|