Пример #1
0
    public void AddLeaderSkill(uint _id)
    {
        UnitSkillContext _newSkill = new UnitSkillContext();

        _newSkill.setupLeaderSkill(_id);
        SkillList.Add(_newSkill);
    }
Пример #2
0
    private void setSample()
    {
        baseUnitInfo.Name     = "テストユニット";
        baseUnitInfo.MainRace = null;
        baseUnitInfo.Lv       = "99";
        baseUnitInfo.Slv      = "5";
        baseUnitInfo.Hp       = "2580";
        baseUnitInfo.Atk      = "1860";
        baseUnitInfo.Charm    = "0.0";

        linkUnitInfo.IsActiveLinkUnit = false;
        linkUnitInfo.Name             = "";
        linkUnitInfo.Lv                 = "-";
        linkUnitInfo.LinkSkillName      = "-";
        linkUnitInfo.LinkSkillMessage   = "";
        linkUnitInfo.LinkSkillRate      = "";
        linkUnitInfo.LinkPassiveName    = "-";
        linkUnitInfo.LinkPassiveMessage = "";
        linkUnitInfo.NotMessage         = "";

        baseUnitInfo.LeaderSkill.Clear();
        UnitSkillContext leder = new UnitSkillContext();

        leder.setupLeaderSkill(0);
        baseUnitInfo.LeaderSkill.Add(leder);
    }
Пример #3
0
    void ChangeStatus(PacketStructUnit unitData, GlobalDefine.PartyCharaIndex partyCharaIndex, PacketStructUnit[] partyUnits)
    {
        //-------------------------------------------------
        // ステータスの変更
        //-------------------------------------------------
        if (m_PartyMemberStatusPanel != null)
        {
            m_PartyMemberStatusPanel.ChangeData(unitData, partyCharaIndex, partyUnits);
            //-------------------------------------------------
            // スキルの変更
            //-------------------------------------------------
            if (unitData != null && m_SelectPartyCharaIndex == GlobalDefine.PartyCharaIndex.LEADER)
            {
                m_PartyMemberStatusPanel.Skills.Clear();
                UnitSkillContext     skill      = new UnitSkillContext();
                MasterDataParamChara charMaster = MasterFinder <MasterDataParamChara> .Instance.Find((int)unitData.id);

                skill.setupLeaderSkill(charMaster.skill_leader);
                m_PartyMemberStatusPanel.Skills.Add(skill);
            }
        }
    }
Пример #4
0
    /// <summary>
    /// 詳細領域
    /// </summary>
    void CreatePatyStatusPanel()
    {
        if (m_PartyMemberStatusPanel == null || m_PartyMemberUnitGroup == null)
        {
            return;
        }

        // リーダースキルのHP、攻撃力計算のためにユニット情報配列を作成しておく.
        var partyUnits = new PacketStructUnit[m_PartyMemberUnitGroup.Units.Count];

        for (var i = 0; i < partyUnits.Length; i++)
        {
            partyUnits[i] = m_PartyMemberUnitGroup.Units[i].UnitData;
        }

        m_PartyMemberStatusPanel.UnitStatusParams.Clear();
        for (int i = 0; i < m_PartyMemberUnitGroup.Units.Count; ++i)
        {
            m_PartyMemberStatusPanel.AddData(m_PartyMemberUnitGroup.Units[i].UnitData, m_PartyMemberUnitGroup.Units[i].PartyCharaIndex, partyUnits);
        }

        m_PartyMemberStatusPanel.Skills.Clear();
        UnitSkillContext     skill      = new UnitSkillContext();
        MasterDataParamChara charMaster = MasterFinder <MasterDataParamChara> .Instance.Find((int)m_PartyMemberUnitGroup.Units[0].UnitData.id);

        skill.setupLeaderSkill(charMaster.skill_leader);
        m_PartyMemberStatusPanel.Skills.Add(skill);
        m_PartyMemberStatusPanel.NameText = string.Format(GameTextUtil.GetText("questlast_text3"), m_CurrentSelectPartyIndex + 1); // パーティ名
        m_PartyMemberStatusPanel.SetStatusParam();

        if (m_ExpandWindow != null)
        {
            m_ExpandWindow.ViewHeightSize = m_PartyMemberStatusPanel.GetComponent <RectTransform>().rect.height;

            m_PartyMemberStatusPanel.SetParent(m_ExpandWindow.Content);
        }
        StartCoroutine(WaitSkillList());
    }
Пример #5
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;
    }