| | |
| | | {
|
| | | public class TreasureSoulModel : Model, IBeforePlayerDataInitialize, IPlayerLoginOk
|
| | | {
|
| | | public const int TREASURE_SOUL_ID = 115;
|
| | | Redpoint treasureSoulRedpoint = new Redpoint(1, TREASURE_SOUL_ID);
|
| | | Redpoint treasureSoulNewGotRedpoint = new Redpoint(TREASURE_SOUL_ID, 115100);
|
| | |
|
| | | Dictionary<int, TreasureSpecialData> treasureSoulDict = new Dictionary<int, TreasureSpecialData>();
|
| | | List<int> treasureSouls = new List<int>();
|
| | | public Dictionary<int, int> signAddProperty = new Dictionary<int, int>();
|
| | |
| | |
|
| | | public int gotoSoul { get; set; }
|
| | |
|
| | | public int newGotSoul { get; set; }
|
| | |
|
| | | public bool serverInited { get; private set; }
|
| | |
|
| | | PlayerPackModel packModel { get { return ModelCenter.Instance.GetModel<PlayerPackModel>(); } }
|
| | |
| | | {
|
| | | packModel.RefreshItemCountAct += RefreshItemCountAct;
|
| | | PlayerStrengthengDatas.RefreshEquipUpgradLvAct += RefreshEquipSTRLv;
|
| | | FuncOpen.Instance.OnFuncStateChangeEvent += OnFuncStateChangeEvent;
|
| | | ParseConfig();
|
| | | }
|
| | |
|
| | |
| | | special.itemGet = false;
|
| | | special.active = false;
|
| | | }
|
| | | treasureSoulNewGotRedpoint.state = RedPointState.None;
|
| | | }
|
| | |
|
| | | public void OnPlayerLoginOk()
|
| | |
| | | {
|
| | | packModel.RefreshItemCountAct -= RefreshItemCountAct;
|
| | | PlayerStrengthengDatas.RefreshEquipUpgradLvAct -= RefreshEquipSTRLv;
|
| | | FuncOpen.Instance.OnFuncStateChangeEvent -= OnFuncStateChangeEvent;
|
| | | }
|
| | |
|
| | | void ParseConfig()
|
| | |
| | | {
|
| | | signAddProperty.Add(int.Parse(_key), int.Parse(jsonData[_key].ToString()));
|
| | | }
|
| | | }
|
| | |
|
| | | public void SetViewTreasureNewGot()
|
| | | {
|
| | | treasureSoulNewGotRedpoint.state = RedPointState.None;
|
| | | }
|
| | |
|
| | | public List<int> GetTreasureSouls()
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | private void OnFuncStateChangeEvent(int func)
|
| | | {
|
| | | if (func == 126)
|
| | | {
|
| | | UpdateRedpoints();
|
| | | }
|
| | | }
|
| | |
|
| | | public void UpdateTreasurePrivilege(HA353_tagMCMWPrivilegeDataInfo package)
|
| | | {
|
| | | for (int i = 0; i < package.Count; i++)
|
| | |
| | | }
|
| | | bool beforeActived = special.active;
|
| | | special.active = _data.State == 1;
|
| | | //if (!beforeActived && special.active && serverInited && WindowCenter.Instance.CheckOpen<TreasureSoulWin>()
|
| | | // && !WindowCenter.Instance.CheckOpen<TreasureSoulActiveWin>() && !NewBieCenter.Instance.inGuiding)
|
| | | //{
|
| | | // TreasureSoulActiveWin.treasureSoulId = (int)_data.PriID;
|
| | | // WindowCenter.Instance.Open<TreasureSoulActiveWin>();
|
| | | //}
|
| | | if (!beforeActived && special.active && serverInited
|
| | | && !WindowCenter.Instance.CheckOpen<TreasureSoulWin>())
|
| | | {
|
| | | treasureSoulNewGotRedpoint.state = RedPointState.Simple;
|
| | | newGotSoul = (int)_data.PriID;
|
| | | }
|
| | | if ((TreasurePrivilege)_data.PriID == TreasurePrivilege.StrengthenAdd)
|
| | | {
|
| | | if (treasureSoulEvent != null)
|
| | |
| | | totalProgress = configs[configs.Count - 1].countNeed;
|
| | | }
|
| | |
|
| | | redpoint = new Redpoint(TreasureModel.TREASURE_SOUL_ID, TreasureModel.TREASURE_SOUL_ID * 100 + (int)type);
|
| | | redpoint = new Redpoint(TreasureSoulModel.TREASURE_SOUL_ID, TreasureSoulModel.TREASURE_SOUL_ID * 100 + (int)type);
|
| | | switch (_type)
|
| | | {
|
| | | case TreasurePrivilege.DemonJarAtk:
|