Exemplo n.º 1
0
    public void AddLinkSkill(MasterDataParamChara cCharaMasterData, uint nLinkPoint)
    {
        UnitSkillContext _newSkill = new UnitSkillContext();

        _newSkill.setupLinkSkill(cCharaMasterData, nLinkPoint);
        _newSkill.setLinkTitleImage("LINK SKILL_gray", "skill_name_bg0");
        SkillList.Add(_newSkill);
    }
Exemplo n.º 2
0
 public void AddLinkSkill(MasterDataParamChara cCharaMasterData, uint nLinkPoint)
 {
     if (m_LinkSkill == null)
     {
         m_LinkSkill = new UnitSkillContext();
     }
     m_LinkSkill.setupLinkSkill(cCharaMasterData, nLinkPoint);
     LinkList.Add(m_LinkSkill);
 }
Exemplo n.º 3
0
    public void setupChara(PacketStructUnit _mainUnit, PacketStructUnit _subUnit, bool dispCharm)
    {
        m_baseChara = new CharaOnce();

        if (_mainUnit.link_info == (uint)ServerDataDefine.CHARALINK_TYPE.CHARALINK_TYPE_BASE &&
            _subUnit != null)
        {
            m_baseChara.CharaSetupFromID(
                _mainUnit.id,
                (int)_mainUnit.level,
                (int)_mainUnit.limitbreak_lv,
                (int)_mainUnit.limitover_lv,
                (int)_mainUnit.add_pow,
                (int)_mainUnit.add_hp,
                _subUnit.id,
                (int)_subUnit.level,
                (int)_subUnit.add_pow,
                (int)_subUnit.add_hp,
                (int)_mainUnit.link_point,
                (int)_subUnit.limitover_lv
                );
        }
        else
        {
            m_baseChara.CharaSetupFromID(
                _mainUnit.id,
                (int)_mainUnit.level,
                (int)_mainUnit.limitbreak_lv,
                (int)_mainUnit.limitover_lv,
                (int)_mainUnit.add_pow,
                (int)_mainUnit.add_hp,
                0,
                0,
                0,
                0,
                0,
                0
                );
        }
        if (m_baseChara.m_CharaMasterDataParam != null)
        {
            UnitIconImageProvider.Instance.Get(
                _mainUnit.id,
                sprite =>
            {
                baseUnitInfo.Icon = sprite;
            });

            baseUnitInfo.LeaderSkill.Clear();
            UnitSkillContext leder = new UnitSkillContext();
            if (m_baseChara.m_CharaMasterDataParam.skill_leader != 0)
            {
                leder.setupLeaderSkill(m_baseChara.m_CharaMasterDataParam.skill_leader);
            }
            else
            {
                leder.setupLeaderSkill(0);
            }
            baseUnitInfo.LeaderSkill.Add(leder);
        }

        /**
         * サブユニット情報
         */
        if (_subUnit != null)
        {
            linkUnitInfo.IsActiveLinkUnit = true;
            MasterDataParamChara _subMaster = MasterFinder <MasterDataParamChara> .Instance.Find((int)_subUnit.id);

            if (_subMaster != null)
            {
                linkUnitInfo.Name = _subMaster.name;
                linkUnitInfo.Lv   = string.Format("{0}/{1}", _subUnit.level, _subMaster.level_max);
                UnitIconImageProvider.Instance.Get(
                    _subUnit.id,
                    sprite =>
                {
                    linkUnitInfo.Icon = sprite;
                });
                SkillList.Clear();
                UnitSkillContext _newSkill = new UnitSkillContext();
                _newSkill.setupLinkSkill(_subMaster, 0);
                _newSkill.setLinkTitleImage("LINK SKILL", "skill_name_bg3");
                SkillList.Add(_newSkill);
                _newSkill = new UnitSkillContext();
                _newSkill.setupLinkPassive(_subMaster);
                _newSkill.setLinkTitleImage("LINK PASSIVE", "skill_name_bg4");
                SkillList.Add(_newSkill);
            }
            else
            {
#if BUILD_TYPE_DEBUG
                linkUnitInfo.Name = "<color=#FF0000>No MasterDataParamChara fix_id:" + _subUnit.id + "</color>";
#endif
            }
        }
        else
        {
            linkUnitInfo.IsActiveLinkUnit = false;
            linkUnitInfo.NotMessage       = GameTextUtil.GetText("unit_linkstatus5");
        }

        bSetup = true;
    }