| | |
| | | public void OnBeforePlayerDataInitialize()
|
| | | {
|
| | | m_storeModel.RefreshTCBPlayerDataEvent -= RefreshStoreScore;
|
| | | FuncOpen.Instance.OnFuncStateChangeEvent -= UpdateFuncState;
|
| | | playerPack.RefreshItemCountAct -= RefreshXBTool;
|
| | | isXBCoolTime = false;
|
| | | XBNotifyParms.Clear();
|
| | | xbTypeInfoDict.Clear();
|
| | |
| | | HAPPYXBITEMKEY = StringUtility.Contact(PlayerDatas.Instance.baseData.PlayerID, "HappyXBItemTime");
|
| | | XBWarehouseRedPoint();
|
| | | m_storeModel.RefreshTCBPlayerDataEvent += RefreshStoreScore;
|
| | | playerPack.RefreshItemCountAct -= RefreshXBTool;
|
| | | playerPack.RefreshItemCountAct += RefreshXBTool;
|
| | | FuncOpen.Instance.OnFuncStateChangeEvent += UpdateFuncState;
|
| | | }
|
| | |
|
| | | public override void UnInit()
|
| | |
| | | public const int XBWarehouse_RedKey = 20304;
|
| | | public const int BestXB_OneRedKey = 20301001;
|
| | | public const int BestXB_ManyRedKey = 20301002;
|
| | | public const int BestXB_FreeRedKey = 20301003;
|
| | | public const int RuneXB_OneRedKey = 20302001;
|
| | | public const int RuneXB_ManyRedKey = 20302002;
|
| | | public const int RuneXB_FreeRedKey = 20302003;
|
| | |
|
| | | public Redpoint mainTopRed = new Redpoint(MainTop_RedKey);
|
| | | public Redpoint happyXBRed = new Redpoint(MainTop_RedKey, HappyXB_RedKey);
|
| | |
| | | public Redpoint xbWarehouseRed = new Redpoint(HappyXB_RedKey,XBWarehouse_RedKey);
|
| | | public Redpoint bestXBOneRed = new Redpoint(BestXB_RedKey,BestXB_OneRedKey);
|
| | | public Redpoint bestXBManyRed = new Redpoint(BestXB_RedKey,BestXB_ManyRedKey);
|
| | | public Redpoint bestXBFreeRed = new Redpoint(BestXB_RedKey,BestXB_FreeRedKey);
|
| | | public Redpoint runeXBOneRed = new Redpoint(RuneXB_RedKey, RuneXB_OneRedKey);
|
| | | public Redpoint runeXBManyRed = new Redpoint(RuneXB_RedKey, RuneXB_ManyRedKey);
|
| | | public Redpoint runeXBFreeRed = new Redpoint(RuneXB_RedKey, RuneXB_FreeRedKey);
|
| | |
|
| | | private void UpdateFuncState(int funcId)
|
| | | {
|
| | | if (funcId != (int)FuncOpenEnum.HappyFindTreasure) return;
|
| | | XBWarehouseRedPoint();
|
| | | BestAndRuneXBRedPoint();
|
| | | XBStoreRedPoint();
|
| | | }
|
| | |
|
| | | public void RefreshXBWarehouse()
|
| | | {
|
| | |
| | | int needtoolCnt = 0;
|
| | | if (IsHaveFreeXB(1))
|
| | | {
|
| | | bestXBRed.state = RedPointState.Simple;
|
| | | bestXBFreeRed.state = RedPointState.Simple;
|
| | | }
|
| | | else if(IsHaveManyXBTool(1,out xbtoolCnt,out needtoolCnt))
|
| | | else
|
| | | {
|
| | | bestXBFreeRed.state = RedPointState.None;
|
| | | }
|
| | |
|
| | | if(IsHaveManyXBTool(1,out xbtoolCnt,out needtoolCnt))
|
| | | {
|
| | | if(xbtoolCnt >= needtoolCnt)
|
| | | {
|
| | |
| | | {
|
| | | bestXBOneRed.state = RedPointState.None;
|
| | | bestXBManyRed.state = RedPointState.None;
|
| | | bestXBRed.state = RedPointState.None;
|
| | | }
|
| | |
|
| | | if (IsHaveFreeXB(2))
|
| | | {
|
| | | runeXBRed.state = RedPointState.Simple;
|
| | | runeXBFreeRed.state = RedPointState.Simple;
|
| | | }
|
| | | else if(IsHaveManyXBTool(2,out xbtoolCnt,out needtoolCnt))
|
| | | else
|
| | | {
|
| | | runeXBFreeRed.state = RedPointState.None;
|
| | | }
|
| | |
|
| | | if(IsHaveManyXBTool(2,out xbtoolCnt,out needtoolCnt))
|
| | | {
|
| | | if (xbtoolCnt >= needtoolCnt)
|
| | | {
|
| | |
| | | {
|
| | | runeXBOneRed.state = RedPointState.None;
|
| | | runeXBManyRed.state = RedPointState.None;
|
| | | runeXBRed.state = RedPointState.None;
|
| | | }
|
| | | }
|
| | |
|