| | |
| | | return false;
|
| | | }
|
| | |
|
| | | public bool IsHaveManyXBTool(int type, out int toolCnt)
|
| | | public bool IsHaveManyXBTool(int type, out int toolCnt,out int needToolCnt)
|
| | | {
|
| | | toolCnt = 0;
|
| | | needToolCnt = 0;
|
| | | XBFuncSet funcSet = GetXBFuncSet(type);
|
| | | if (funcSet == null) return false;
|
| | |
|
| | | toolCnt = playerPack.GetItemCountByID(PackType.rptItem, funcSet.costToolIds[1]);
|
| | | needToolCnt = funcSet.costToolNums[1];
|
| | | if (toolCnt > 0)
|
| | | {
|
| | | return true;
|
| | |
| | | public const int RuneXB_RedKey = 20302;
|
| | | public const int XBStore_RedKey = 20303;
|
| | | public const int XBWarehouse_RedKey = 20304;
|
| | | public const int BestXB_OneRedKey = 20301001;
|
| | | public const int BestXB_ManyRedKey = 20301002;
|
| | | public const int RuneXB_OneRedKey = 20302001;
|
| | | public const int RuneXB_ManyRedKey = 20302002;
|
| | |
|
| | | public Redpoint mainTopRed = new Redpoint(MainTop_RedKey);
|
| | | public Redpoint happyXBRed = new Redpoint(MainTop_RedKey, HappyXB_RedKey);
|
| | |
| | | public Redpoint runeXBRed = new Redpoint(HappyXB_RedKey, RuneXB_RedKey);
|
| | | public Redpoint xbStoreRed = new Redpoint(HappyXB_RedKey,XBStore_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 runeXBOneRed = new Redpoint(RuneXB_RedKey, RuneXB_OneRedKey);
|
| | | public Redpoint runeXBManyRed = new Redpoint(RuneXB_RedKey, RuneXB_ManyRedKey);
|
| | |
|
| | | public void RefreshXBWarehouse()
|
| | | {
|
| | |
| | | {
|
| | | if (!FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.HappyFindTreasure)) return;
|
| | |
|
| | | if (IsHaveFreeXB(1) || IsHaveOneXBTool(1))
|
| | | int xbtoolCnt = 0;
|
| | | int needtoolCnt = 0;
|
| | | if (IsHaveFreeXB(1))
|
| | | {
|
| | | bestXBRed.state = RedPointState.Simple;
|
| | | }
|
| | | else if(IsHaveManyXBTool(1,out xbtoolCnt,out needtoolCnt))
|
| | | {
|
| | | if(xbtoolCnt >= needtoolCnt)
|
| | | {
|
| | | bestXBManyRed.state = RedPointState.Simple;
|
| | | }
|
| | | else
|
| | | {
|
| | | bestXBManyRed.state = RedPointState.None;
|
| | | }
|
| | | bestXBOneRed.state = RedPointState.Simple;
|
| | | }
|
| | | else
|
| | | {
|
| | | bestXBRed.state = RedPointState.None;
|
| | | bestXBOneRed.state = RedPointState.None;
|
| | | bestXBManyRed.state = RedPointState.None;
|
| | | }
|
| | |
|
| | | if (IsHaveFreeXB(2) || IsHaveOneXBTool(2))
|
| | | if (IsHaveFreeXB(2))
|
| | | {
|
| | | runeXBRed.state = RedPointState.Simple;
|
| | | }
|
| | | else if(IsHaveManyXBTool(2,out xbtoolCnt,out needtoolCnt))
|
| | | {
|
| | | if (xbtoolCnt >= needtoolCnt)
|
| | | {
|
| | | runeXBManyRed.state = RedPointState.Simple;
|
| | | }
|
| | | else
|
| | | {
|
| | | runeXBManyRed.state = RedPointState.None;
|
| | | }
|
| | | runeXBOneRed.state = RedPointState.Simple;
|
| | | }
|
| | | else
|
| | | {
|
| | | runeXBRed.state = RedPointState.None;
|
| | | runeXBOneRed.state = RedPointState.None;
|
| | | runeXBManyRed.state = RedPointState.None;
|
| | | }
|
| | | }
|
| | |
|