Files
SVSimServer/SVSim.BattleEngine/Engine/TutorialResultReporter.cs
gamer147 824309ec44 feat(battle-engine): close the AI-simulation subsystem (verbatim)
Copied the 89 uncopied AI*SimulationUtility/extension files defining the
AIVirtualCard/AIVirtualField extension methods; the compile loop then auto-closed
the revealed type deps (~3049 files total, drift-clean). 10.0k -> 62 errors.
2026-06-05 20:30:59 -04:00

114 lines
2.8 KiB
C#

using System;
using System.Collections.Generic;
using Cute;
using LitJson;
using UnityEngine;
using Wizard;
using Wizard.Battle.Tutorial;
using Wizard.Lottery;
public class TutorialResultReporter : IBattleResultReporter
{
private readonly GameObject m_reportEndAgentObj;
private readonly TutorialReportEndAgent m_reportEndAgent;
public bool IsEnd => m_reportEndAgent.IsEnd;
public int ClassExp => GetClassExp();
public List<UserAchievement> UserAchievement => GetUserAchievementList();
public List<UserMission> UserMission => GetUserMissionList();
public List<ReceivedReward> MissionRewards => null;
public List<ReceivedReward> VictoryRewards => null;
public LotteryApplyData LotteryData => LotteryApplyData.EmptyData();
public MyPageHomeDialogData HomeDialogData => null;
public bool IsDataExist => true;
public TutorialResultReporter()
{
m_reportEndAgentObj = new GameObject();
m_reportEndAgent = m_reportEndAgentObj.AddComponent<TutorialReportEndAgent>();
}
public void Report(bool isWin)
{
int tutorial_step = 0;
if (isWin && Data.SelectedStoryInfo.IsTutorial)
{
if (Data.Load.data._userTutorial.tutorial_step == 1)
{
tutorial_step = 11;
}
else if (Data.Load.data._userTutorial.tutorial_step == 11)
{
tutorial_step = 21;
}
else if (Data.Load.data._userTutorial.tutorial_step == 21)
{
tutorial_step = 31;
PlayerPrefsWrapper.SetValue(PlayerPrefsWrapper.FIRST_TIPS_AFTER_ROTATION_USER_FLAG, 1);
}
bool isSkip = BattleManagerBase.GetIns() is TutorialBattleMgrBase tutorialBattleMgrBase && tutorialBattleMgrBase.IsUseTutorialSkip;
StartTutorialUpdateTaskData(tutorial_step, isSkip, delegate
{
m_reportEndAgent.Finished();
});
}
else
{
m_reportEndAgent.Finished();
}
}
public void StartTutorialUpdateTaskData(int tutorial_step, bool isSkip, Action callback)
{
FinishTutorialReport(tutorial_step);
TutorialUpdateTask tutorialUpdateTask = new TutorialUpdateTask();
tutorialUpdateTask.SetParameter(tutorial_step, isSkip);
m_reportEndAgent.StartCoroutine(Toolbox.NetworkManager.Connect(tutorialUpdateTask, delegate
{
callback.Call();
}, BaseTask.OnRequestFailed, BaseTask.OnFailedErrorCode));
}
public JsonData GetFinishResponseData()
{
return null;
}
public List<UserAchievement> GetUserAchievementList()
{
return new List<UserAchievement>();
}
public List<UserMission> GetUserMissionList()
{
return new List<UserMission>();
}
public void Destroy()
{
UnityEngine.Object.Destroy(m_reportEndAgentObj);
}
public int GetClassExp()
{
return 0;
}
private void FinishTutorialReport(int tutorial_step)
{
if (tutorial_step == 31)
{
AdjustManager.TutorialCompleteEvent();
}
}
}