public void UpdateFellowInfo(Fellow fellow) { if (fellow == null) { return; } if (fellow.IsValid() == false) { return; } m_LevelUpSkillChooseBuffer = GlobeVar.INVALID_ID; m_SkillInfo.SetActive(true); m_SkillChooseWindow.SetActive(false); m_LevelUpWindowType = LEVELUP_WINDOWTYPE.TYPE_INVALID; UpdateFellowInfo_TalentSkill(fellow); UpdateFellowInfo_ElementSkill(fellow); m_Fellow = fellow; if (sendPackageCallback != null) { sendPackageCallback(); sendPackageCallback = null; } }
/// <summary> /// 打开元素技能升级界面 /// </summary> /// <param name="skillid"></param> public void OnElementSkillLevelUpClick(int skillid) { Tab_CabalFellowElementSkill tabCurSkill = TableManager.GetCabalFellowElementSkillByID(skillid, 0); if (tabCurSkill == null) { return; } m_SkillLevelUpWindow.SetActive(true); m_LevelUpWindowType = LEVELUP_WINDOWTYPE.TYPE_ELEMENT; //m_TalentSkillBookBtn.SetActive(false); m_SkillCurLevel.InitElementSkill(skillid); m_SkillLevelUpCostName.text = StrDictionary.GetClientDictionaryString("#{10193}"); int nNextSkillId = tabCurSkill.NextSkillId; UIImageButton upgradeBtn = skillbookArea.transform.parent.FindChild("OKButton").GetComponent <UIImageButton>(); if (nNextSkillId == GlobeVar.INVALID_ID) { // 满级 m_SkillNextLevel.InitElementSkill(skillid); skillbookArea.SetActive(false); upgradeBtn.isEnabled = false; } else { // 非满级 skillbookArea.SetActive(true); upgradeBtn.isEnabled = true; m_SkillBookSlot.InitInfo_Item(tabCurSkill.NeedBookId, ItemSlotLogic.OnClickOpenTips); if (tabCurSkill.NeedBookCount > 0) { m_SkillLevelUpCostSprite.value = (float)GameManager.gameManager.PlayerDataPool.BackPack.GetItemCountByDataId(tabCurSkill.NeedBookId) / (float)tabCurSkill.NeedBookCount; } m_SkillLevelUpCostLabel.text = GameManager.gameManager.PlayerDataPool.BackPack.GetItemCountByDataId(tabCurSkill.NeedBookId).ToString() + "/" + tabCurSkill.NeedBookCount.ToString(); m_SkillNextLevel.InitElementSkill(tabCurSkill.NextSkillId); InitGetInfoDialog(tabCurSkill.NeedBookId); } m_LevelUpSkillChooseBuffer = skillid; }