public override void show() { base.show(); SoundData.play("uirn_runepopup"); btnSort.gameObject.SetActive(true); popupSort.hide(); setMode(Mode.Normal); selectSlot = null; updateGold(); updateRuby(); updateRuneStone(); tabPlayer.tabChangeDispatcher -= changePlayerTab; tabPlayer.tabChangeDispatcher += changePlayerTab; tabPlayer.init(GameIDData.Type.Skill); refreshSort(); refreshMySkills(); refreshSkillInven(true); reinforcePanel.hide(); composePanel.hide(); sellPanel.hide(); TutorialManager.instance.check("T37"); // if(GameDataManager.instance.historySkillRunes == null) EpiServer.instance.sendSkillRuneHistory(); }
public void onCompleteChangeSkill() { selectSlot = null; setMode(Mode.Normal); refreshMySkills(); refreshSkillInven(); }
public void onClick(UISkillInvenSlot invenSlot) { switch (onClick(invenSlot.index, invenSlot.data)) { case 1: invenSlot.select = true; break; case -1: invenSlot.select = false; break; } refresh(); }
void resetSelectSlot(GameIDData d, bool isInventorySlot) { if (selectSlot == null && d != null) { UISkillInvenSlot[] ss = invenList.GetComponentsInChildren <UISkillInvenSlot>(); foreach (UISkillInvenSlot ts in ss) { if (ts.data != null && d.serverId == ts.data.serverId) // && ts.isChecked == !isInventorySlot) { selectSlot = ts; break; } } } }
public void onSelectSlot(UISkillInvenSlot s, GameIDData data) { if (UIReinforceBarPanel.isReinforceMode) { selectSlot = null; if (s.data == null) { return; } reinforcePanel.onClick(s); } else if (UIComposePanel.isComposeMode) { selectSlot = null; if (s.data == null) { return; } composePanel.onClick(s); } else if (UIMultiSellPanel.isMultiSell) { selectSlot = null; if (s.data == null) { return; } sellPanel.onClick(s); } else if (mode == Mode.Normal) { if (data != null) { selectSlot = s; s.select = false; GamePlayerData selectHeroData = null; GameDataManager.instance.heroes.TryGetValue(tabPlayer.currentTab, out selectHeroData); GameManager.me.uiManager.popupSkillPreview.show(data, RuneInfoPopup.Type.Normal, s.isInventorySlot, true, selectHeroData); } } else if (mode == Mode.PutOn) { if (s.isInventorySlot || _selectSlotData == null) { return; } switch (s.index) { case 0: _slotId = SkillSlot.S1; break; case 1: _slotId = SkillSlot.S2; break; case 2: _slotId = SkillSlot.S3; break; } SoundData.play("uirn_runeattach"); EpiServer.instance.sendChangeSkillRune(tabPlayer.currentTab, _slotId, _selectSlotData.serverId); } }
void setMode(Mode m, GameIDData gd = null) { mode = m; if (m == Mode.Normal) { if (selectSlot != null) { selectSlot.select = false; } refreshMySkills(); selectSlot = null; putOnPanel.SetActive(false); } else if (m == Mode.PutOn) { putOnPanel.SetActive(true); //_selectSlot.select = true; _selectSlotData = null; bool alreadyPutOnItem = false; if (selectSlot != null && selectSlot.data != null) { spSelectSlotBorder.enabled = true; spSelectSlotBorder.cachedTransform.position = selectSlot.spSelectBorder.cachedTransform.position; alreadyPutOnItem = checkSameBaseSkillInMySlot(selectSlot.data.skillData.baseId, tabPlayer.currentTab); _selectSlotData = selectSlot.data; } else if (gd != null) { spSelectSlotBorder.enabled = false; alreadyPutOnItem = checkSameBaseSkillInMySlot(gd.skillData.baseId, tabPlayer.currentTab); _selectSlotData = gd; } if (alreadyPutOnItem) { lbPutOnModeMsg.text = Util.getUIText("CAN_PUTON_SAMERUNE"); } else { lbPutOnModeMsg.text = Util.getUIText("SELECT_SLOT"); } for (int i = 0; i < 3; ++i) { if (GameDataManager.instance.playerSkillSlots[tabPlayer.currentTab][i].isOpen) { if (alreadyPutOnItem) { if (TutorialManager.instance.isTutorialMode) { spNowSelectedSlots[i].SetActive(false); } else { spNowSelectedSlots[i].SetActive(_selectSlotData.skillData.baseId == GameDataManager.instance.playerSkillSlots[tabPlayer.currentTab][i].infoData.skillData.baseId); } nowSlots[i].buttonEnabled = (_selectSlotData.skillData.baseId == GameDataManager.instance.playerSkillSlots[tabPlayer.currentTab][i].infoData.skillData.baseId); } else { if (TutorialManager.instance.isTutorialMode) { spNowSelectedSlots[i].SetActive(false); } else { spNowSelectedSlots[i].SetActive(true); } nowSlots[i].buttonEnabled = true; } } else { if (TutorialManager.instance.isTutorialMode) { spNowSelectedSlots[i].SetActive(false); } else { spNowSelectedSlots[i].SetActive(!alreadyPutOnItem); } nowSlots[i].buttonEnabled = !alreadyPutOnItem; } } } }
void onClickShop(GameObject go) { selectSlot = null; GameManager.me.uiManager.popupShop.showSpecialShop(); }