Example #1
0
 void OnJobOk(ButtonScript obj, object args, int param1, int param2)
 {
     if (GamePlayer.Instance.GetIprop(PropertyType.PT_Profession) == (int)JobType.JT_Newbie)
     {
         if (QuestSystem.HasQuestByType(QuestKind.QK_Profession))
         {
             PopText.Instance.Show(LanguageManager.instance.GetValue("onlyOneJobQuest"), PopText.WarningType.WT_Warning);
             //Hide();
             return;
         }
         if (IsJobQuestSame(int.Parse(questIds_[crtSelect_])))
         {
             PopText.Instance.Show(LanguageManager.instance.GetValue("bunengjie"));
             return;
         }
         MessageBoxUI.ShowMe(LanguageManager.instance.GetValue("IsToDoJob") + pt[crtSelect_], () =>
         {
             NetConnection.Instance.acceptQuest(int.Parse(questIds_[crtSelect_]));
             Hide();
         });
     }
     else
     {
         GameManager.Instance.ParseNavMeshInfo(Profession.GetData(selectCell.jobId).chuansong_);
     }
 }
Example #2
0
    private void UpdateInfo(int id)
    {
        Profession proData = Profession.GetData(id);

        if (proData == null)
        {
            return;
        }
        proLab.text            = proData.jobName_;
        openLevel.text         = proData.openLV_.ToString();
        descLab.text           = proData.Describe_;
        recommendSkillLab.text = proData.RecommendSkills1_;
        proIcon.spriteName     = proData.jobtype_.ToString();
        string [] Attribute = proData.Recommand_.Split(';');
        recommendPropLab.text = "";
        for (int i = 0; i < Attribute.Length; i++)
        {
            string [] addStr = Attribute[i].Split(':');
            recommendPropLab.text += LanguageManager.instance.GetValue(addStr[0]) + " +" + addStr[1] + "\n";
        }

        HeadIconLoader.Instance.LoadIcon(proData.proffImg, proImg);

        /*	for(int i=0;i<equipIconList.Count;i++)
         *      {
         *              equipIconList[i].gameObject.SetActive(false);
         *              equipNameList[i].gameObject.SetActive(false);
         *      }
         *
         *      string [] equip = proData.RecommendEquippesIcon_.Split(';');
         *      for(int i=0;i<equip.Length;i++)
         *      {
         *              int itemId = int.Parse(equip[i]);
         *              equipIconList[i].gameObject.SetActive(true);
         *              ItemCellUI cell = UIManager.Instance.AddItemCellUI(equipIconList[i],(uint)itemId);
         *              cell.showTips = true;
         *              equipNameList[i].gameObject.SetActive(true);
         *              equipNameList[i].text = ItemData.GetData(itemId).name_;
         *      }
         */
        if (GamePlayer.Instance.GetIprop(PropertyType.PT_Level) < proData.openLV_)
        {
            jobOkBtn.gameObject.SetActive(false);
        }
        else
        {
            jobOkBtn.gameObject.SetActive(true);
        }
    }
Example #3
0
    public int jobId;      //professionDataID

    void Start()
    {
        Profession prof = Profession.GetData(jobId);

        if (prof == null)
        {
            return;
        }
        if (prof.openLV_ > GamePlayer.Instance.GetIprop(PropertyType.PT_Level))
        {
            openlevel.gameObject.SetActive(true);
            openlevel.text = prof.openLV_.ToString() + LanguageManager.instance.GetValue("levelOpen");
        }
        else
        {
            openlevel.gameObject.SetActive(false);
        }
    }