Exemplo n.º 1
0
    public static int GetChangeCareerID(int index)
    {
        ZhuanZhiJiChuPeiZhi zhuanZhiJiChuPeiZhi = DataReader <ZhuanZhiJiChuPeiZhi> .Get(EntityWorld.Instance.EntSelf.TypeID);

        if (zhuanZhiJiChuPeiZhi == null)
        {
            return(0);
        }
        if (zhuanZhiJiChuPeiZhi.jobList.get_Count() >= 2)
        {
            if (index < zhuanZhiJiChuPeiZhi.jobList.get_Count())
            {
                return(zhuanZhiJiChuPeiZhi.jobList.get_Item(index));
            }
        }
        else if (zhuanZhiJiChuPeiZhi.jobList.get_Count() >= 1)
        {
            ZhuanZhiJiChuPeiZhi zhuanZhiJiChuPeiZhiBasic = ChangeCareerManager.GetZhuanZhiJiChuPeiZhiBasic(zhuanZhiJiChuPeiZhi.job, zhuanZhiJiChuPeiZhi.jobList.get_Item(0));
            if (zhuanZhiJiChuPeiZhiBasic.jobList.get_Count() >= 2 && index < zhuanZhiJiChuPeiZhiBasic.jobList.get_Count())
            {
                return(zhuanZhiJiChuPeiZhiBasic.jobList.get_Item(index));
            }
        }
        return(0);
    }
Exemplo n.º 2
0
    private void ChangeCareerNoFirstTime(int profession)
    {
        if (profession <= 0)
        {
            return;
        }
        ZhuanZhiJiChuPeiZhi zhuanZhiJiChuPeiZhi = DataReader <ZhuanZhiJiChuPeiZhi> .Get(profession);

        if (zhuanZhiJiChuPeiZhi == null)
        {
            return;
        }
        int vIP = ChangeCareerManager.GetVIP(profession);

        if (EntityWorld.Instance.EntSelf.VipLv < vIP)
        {
            UIManagerControl.Instance.ShowToastText("VIP等级不足, 需要VIP等级" + vIP);
            return;
        }
        if (EntityWorld.Instance.EntSelf.Diamond < ChangeCareerManager.GetDiamond(profession))
        {
            UIManagerControl.Instance.ShowToastText("钻石不足");
            return;
        }
        string text           = "是否选择{0}";
        string chineseContent = GameDataUtils.GetChineseContent(zhuanZhiJiChuPeiZhi.jobName, false);

        DialogBoxUIViewModel.Instance.ShowAsOKCancel("选择职业", string.Format(text, chineseContent), null, delegate
        {
            this.SendChangeCareer(profession);
        }, GameDataUtils.GetChineseContent(505113, false), GameDataUtils.GetChineseContent(505114, false), "button_orange_1", "button_yellow_1", null, true, true);
    }
Exemplo n.º 3
0
    private void MessageOneTaskFinish(int taskId)
    {
        ZhuanZhiRenWu zhuanZhiRenWu = DataReader <ZhuanZhiRenWu> .Get(taskId);

        if (zhuanZhiRenWu != null)
        {
            string chineseContent = GameDataUtils.GetChineseContent(1410, false);
            UIManagerControl.Instance.ShowToastText(string.Format(chineseContent, ChangeCareerManager.GetTaskName(zhuanZhiRenWu)));
        }
    }
Exemplo n.º 4
0
    public void SetName(ZhuanZhiRenWu dataRW, int count, bool isfinish)
    {
        this.jump = dataRW.uiJump;
        string text = ChangeCareerManager.GetTaskName(dataRW);

        if (dataRW.missionType == 1)
        {
            if (dataRW.missionData.get_Count() >= 2)
            {
                text += string.Format(dataRW.message1, count, dataRW.missionData.get_Item(1));
            }
        }
        else if (dataRW.missionType == 2)
        {
            if (dataRW.missionData.get_Count() >= 2)
            {
                text += string.Format(dataRW.message1, count, dataRW.missionData.get_Item(1));
            }
        }
        else if (dataRW.missionType == 3)
        {
            if (dataRW.missionData.get_Count() >= 3)
            {
                text += string.Format(dataRW.message1, count, dataRW.missionData.get_Item(2));
            }
        }
        else if (dataRW.missionType == 4)
        {
            if (dataRW.missionData.get_Count() >= 2)
            {
                text += string.Format(dataRW.message1, count, dataRW.missionData.get_Item(1));
            }
        }
        else if (dataRW.missionType == 5)
        {
        }
        text = TextColorMgr.FilterColor(text);
        if (isfinish)
        {
            base.get_transform().FindChild("TaskName").GetComponent <Text>().set_text(TextColorMgr.GetColor(text, "FFC32D", string.Empty));
        }
        else
        {
            base.get_transform().FindChild("TaskName").GetComponent <Text>().set_text(TextColorMgr.GetColor(text, "75523E", string.Empty));
        }
    }
Exemplo n.º 5
0
    private void ResetAll()
    {
        this.m_isIn = true;
        this.ShowAnimation(true);
        this.m_currentInfo = null;
        int changeCareerID = ChangeCareerManager.GetChangeCareerID(0);

        if (changeCareerID > 0)
        {
            this.m_info1.SetCareerPos(-500f, 34f);
            this.m_info1.SetCareerButtonClick(true);
            if (ChangeCareerManager.Instance.GetTaskFirstTime() || ChangeCareerManager.Instance.IsCareerChangedOrSelectedChange(changeCareerID))
            {
                this.m_info1.SetCareerButtonBlack(false);
            }
            else
            {
                this.m_info1.SetCareerButtonBlack(true);
            }
            this.m_info1.profession = changeCareerID;
            this.m_info1.Show(true, false);
            this.m_info1.ShowAnimation(false);
        }
        int changeCareerID2 = ChangeCareerManager.GetChangeCareerID(1);

        if (changeCareerID2 > 0)
        {
            this.m_info2.SetCareerPos(405f, 4f);
            this.m_info2.SetCareerButtonClick(true);
            if (ChangeCareerManager.Instance.GetTaskFirstTime() || ChangeCareerManager.Instance.IsCareerChangedOrSelectedChange(changeCareerID2))
            {
                this.m_info2.SetCareerButtonBlack(false);
            }
            else
            {
                this.m_info2.SetCareerButtonBlack(true);
            }
            this.m_info2.profession = changeCareerID2;
            this.m_info2.Show(true, false);
            this.m_info2.ShowAnimation(false);
        }
    }