int GetSlotLockedLevel(int slot) { Tab_GemOpenLimit line = TableManager.GetGemOpenLimitByID(slot + 1, 0); if (line != null) { return(line.OpenLevel); } return(0); }
void ClickGemSlot(int slot) { ClearGemSlotMark(); if (m_CurEquipSlot < 0 || m_CurEquipSlot >= (int)EquipPackSlot.Slot_NUM) { Singleton <ObjManager> .GetInstance().MainPlayer.SendNoticMsg(false, "#{2108}"); return; } Tab_GemOpenLimit line = TableManager.GetGemOpenLimitByID(slot + 1, 0); if (line == null) { return; } //自身等级小于开放等级 if (Singleton <ObjManager> .Instance.MainPlayer.BaseAttr.Level < line.OpenLevel) { Singleton <ObjManager> .GetInstance().MainPlayer.SendNoticMsg(false, "#{2165}", line.OpenLevel); return; } m_CurGemSlot = slot; //m_GemSlotMark[m_CurGemSlot].gameObject.SetActive(true); if (m_GemSlotId[m_CurGemSlot] >= 0) { ShowUnEquipPage(); } else { ShowEquipPage(); } ClearGemSlotChoose(); ClearGemItemChoose(); m_GemSlotChooseSprite[slot].gameObject.SetActive(true); if (slot == 1) { GameManager.gameManager.PlayerDataPool.CommonData.AskSetCommonFlag((int)USER_COMMONFLAG.CF_GEMHOLE_OPENFLAG1, true); } else if (slot == 2) { GameManager.gameManager.PlayerDataPool.CommonData.AskSetCommonFlag((int)USER_COMMONFLAG.CF_GEMHOLE_OPENFLAG2, true); } else if (slot == 3) { GameManager.gameManager.PlayerDataPool.CommonData.AskSetCommonFlag((int)USER_COMMONFLAG.CF_GEMHOLE_OPENFLAG3, true); } }
bool IsSlotLocked(int slot) { Tab_GemOpenLimit line = TableManager.GetGemOpenLimitByID(slot + 1, 0); if (line == null) { return(true); } if (Singleton <ObjManager> .Instance.MainPlayer != null) { if (Singleton <ObjManager> .Instance.MainPlayer.BaseAttr.Level < line.OpenLevel) { return(true); } } return(false); }