// ***********************************************************************
// Assembly : Game
// Author : Kimch
// Created : 2021-06-28
// Description :
// Last Modified By :
// Last Modified On :
// ***********************************************************************
//
//
// ***********************************************************************
using System.Collections;
using System.Collections.Generic;
using CodeStage.AntiCheat.ObscuredTypes;
using UnityEngine;
namespace G
{
///
/// 职业
///
public class JobProxy : F.GameProxy
{
#region 职业
public class JobInfo
{
public readonly ItemChaJob item;
ObscuredInt _curValue;
public int curValue
{
get => _curValue;
set => _curValue = value;
}
public int maxValue => 100;
public int maxLevel => 10;
public int curLevelExpMax => 1000;
public int curLevelExp => 1;
public int curLevel => 1;
public JobInfo(ItemChaJob jobItem)
{
item = jobItem;
}
}
#endregion
#region Field
#endregion
#region Method
private const int MAX_JOB_ID = 5;
private readonly ObscuredInt[] _jobs = new ObscuredInt[MAX_JOB_ID + 1];
void LoadJobs()
{
var dataList = ArchiveProxy.Instance.GetIntList("jobs");
if (dataList != null && dataList.Count > 0)
{
for (int i = 0; i < dataList.Count; i++)
{
_jobs[i] = dataList[i];
}
}
}
void SaveJobs()
{
var dataList = ArchiveProxy.Instance.GetIntList("jobs");
if (dataList != null)
{
dataList.Clear();
dataList.AddRange(_jobs);
}
}
///
///
///
///
///
public int GetJob(int id)
{
return _jobs[id];
}
///
///
///
///
///
public void SetJob(int id, int value)
{
if (_jobs[id] != value)
{
_jobs[id] = value;
}
}
///
///
///
///
public int GetTotalJob()
{
return _jobs[0];
}
public int job1
{
get { return _jobs[1]; }
}
public int job2
{
get { return _jobs[2]; }
}
public int job3
{
get { return _jobs[3]; }
}
public int job4
{
get { return _jobs[4]; }
}
public int job5
{
get { return _jobs[5]; }
}
#endregion
#region Proxy
public static JobProxy Instance => GetInstance();
public override void ReadArchive()
{
}
#endregion
}
}