コード例 #1
0
    public void SetLinkEffectSkill(MasterDataParamChara cCharaMasterData, uint nLinkPoint)
    {
        //------------------------------------------------------------
        // LINK SKILL
        //------------------------------------------------------------
        MasterDataSkillActive cSkillParamLinkActive = null;

        if (cCharaMasterData != null)
        {
            cSkillParamLinkActive = MasterDataUtil.GetActiveSkillParamFromID(cCharaMasterData.link_skill_active);
        }
        if (null != cSkillParamLinkActive)
        {
            // スキル名
            LinkSkillName = cSkillParamLinkActive.skill_link_name;

            // 説明文
            LinkSkillMessage = cSkillParamLinkActive.skill_link_detail;

            //発動率
            float fSkillOdds = CharaLinkUtil.GetLinkSkillOdds(cSkillParamLinkActive, (int)nLinkPoint) * 0.01f;
            LinkSkillRate = string.Format(GameTextUtil.GetText("unit_linkstatus2"), fSkillOdds.ToString("F1"));
        }
        else
        {
            // スキル名
            LinkSkillName = EmptyStr;
            // 説明文
            LinkSkillMessage = EmptyStr;
            // 発動率
            LinkSkillRate = "";
        }

        //------------------------------------------------------------
        // LINK PASSIVE
        //------------------------------------------------------------
        MasterDataSkillPassive cSkillParamLinkPassive = null;

        if (cCharaMasterData != null)
        {
            cSkillParamLinkPassive = MasterDataUtil.GetPassiveSkillParamFromID(cCharaMasterData.link_skill_passive);
        }
        if (null != cSkillParamLinkPassive)
        {
            // スキル名
            LinkPassiveName = cSkillParamLinkPassive.name;

            // 説明文
            LinkPassiveMessage = cSkillParamLinkPassive.detail;
        }
        else
        {
            // スキル名
            LinkPassiveName = EmptyStr;

            // 説明文
            LinkPassiveMessage = EmptyStr;
        }
    }
コード例 #2
0
    /// <summary>
    /// リンクスキル設定
    /// </summary>
    /// <param name="skill_id"></param>
    public void setupLinkSkill(MasterDataParamChara cCharaMasterData, uint nLinkPoint)
    {
        BaseHeight  = BASE_DEFAULT_HEIGHT;
        TitleHeight = TITLE_DEFAULT_HEIGHT;
        TitleWidth  = LINK_SKILL_TITLE_WIDTH;
        MessageBgH  = MESSAGE_BG_HEIGHT;
        setLinkTitleImage("skill_name_bg3", "LINK SKILL");
        IsSkillItem  = false;
        IsViewStatus = false;
        IsViewIcon   = false;
        //------------------------------------------------------------
        // LINK SKILL
        //------------------------------------------------------------
        MasterDataSkillActive cSkillParamLinkActive = null;

        if (cCharaMasterData != null)
        {
            cSkillParamLinkActive = MasterDataUtil.GetActiveSkillParamFromID(cCharaMasterData.link_skill_active);
        }
        if (null != cSkillParamLinkActive)
        {
            // スキル名
            LinkTitleText = cSkillParamLinkActive.skill_link_name;

            // 説明文
            SkillDetailText = cSkillParamLinkActive.skill_link_detail;

            //発動率
            float fSkillOdds = CharaLinkUtil.GetLinkSkillOdds(cSkillParamLinkActive, (int)nLinkPoint) * 0.01f;
            LinkSkillRate = string.Format(GameTextUtil.GetText("unit_linkstatus2"), fSkillOdds.ToString("F1"));
        }
        else
        {
            // スキル名
            LinkTitleText = EmptyStr;
            // 説明文
            SkillDetailText = EmptyStr;
            // 発動率
            LinkSkillRate = "";
        }
        MessageBgResize();
    }