Esempio n. 1
0
    public void AddLeaderSkill(uint _id)
    {
        UnitSkillContext _newSkill = new UnitSkillContext();

        _newSkill.setupLeaderSkill(_id);
        SkillList.Add(_newSkill);
    }
    public void CreateSkillList(MasterDataHero master)
    {
        UnitSkillContext unit = new UnitSkillContext();

        unit.setupHeroSkill((uint)master.default_skill_id, 0, 0, true);
        SkillList.Add(unit);
    }
Esempio n. 3
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);
    }
Esempio n. 4
0
    public void AddPassiveSkill(uint _id)
    {
        UnitSkillContext _newSkill = new UnitSkillContext();

        _newSkill.setupPassiveSkill(_id);
        SkillList.Add(_newSkill);
    }
Esempio n. 5
0
    public void AddLimitBreakSkill(uint _id, int level)
    {
        UnitSkillContext _newSkill = new UnitSkillContext();

        _newSkill.setupLimitBreakSkill(_id, (uint)level);
        SkillList.Add(_newSkill);
    }
Esempio n. 6
0
    public void SetDetail(PacketStructHero heroData)
    {
        ClearView();
        if (heroData == null || heroData.hero_id == 0)
        {
            return;
        }
        MasterDataHero heroMaster = MasterFinder <MasterDataHero> .Instance.Find((int)heroData.hero_id);

        if (heroMaster == null)
        {
            return;
        }

        SetUpHeroName(heroData.hero_id); // 名前
        MessageText = heroMaster.detail; // 詳細テキスト

        AssetBundler.Create().Set("hero_" + heroData.hero_id.ToString("0000"), "hero_" + heroData.hero_id.ToString("0000"), (o) =>
        {
            Sprite[] sprite = o.AssetBundle.LoadAssetWithSubAssets <Sprite>("hero_" + heroData.hero_id.ToString("0000"));
            HeroImage       = sprite[4];
        }).Load();
        //------------------------------------------------------------------
        // グレードの設定
        //------------------------------------------------------------------
        m_GradeNum = heroData.level;

        MasterDataHeroLevel nextHeroLevelMaster = MasterFinder <MasterDataHeroLevel> .Instance.Find((int)heroData.level + 1);

        if (nextHeroLevelMaster != null)
        {
            m_NextGradeNum = nextHeroLevelMaster.exp_next_total - heroData.exp;
        }
        else
        {
            m_NextGradeNum = 0;
        }

        //------------------------------------------------------------------
        // イラストレーター名
        //------------------------------------------------------------------

        /*
         *      MasterDataIllustrator illustratorMaster = MasterFinder<MasterDataIllustrator>.Instance.Find((int)heroMaster.illustrator_id);
         *      if (illustratorMaster != null)
         *      {
         *          IllustratorText = illustratorMaster.name;
         *      }
         */
        //------------------------------------------------------------------
        // スキルの設定
        //------------------------------------------------------------------
        List <UnitSkillContext> skillList = new List <UnitSkillContext>();
        UnitSkillContext        skill     = new UnitSkillContext();

        skill.setupHeroSkill((uint)heroMaster.default_skill_id, 0, 0, true);
        skillList.Add(skill);
        Skills = skillList;
    }
Esempio n. 7
0
    public void AddLinkBonus(CharaOnce cCharaOnce, MasterDataParamChara cCharaMasterData)
    {
        UnitSkillContext _newSkill = new UnitSkillContext();

        _newSkill.setupLinkEffectInfo(cCharaOnce, cCharaMasterData, false);
        _newSkill.setLinkTitleImage("linkubo-nasu_gray", "skill_name_bg0");
        SkillList.Add(_newSkill);
    }
Esempio n. 8
0
    public void AddLinkPassive(MasterDataParamChara cCharaMasterData)
    {
        UnitSkillContext _newSkill = new UnitSkillContext();

        _newSkill.setupLinkPassive(cCharaMasterData);
        _newSkill.setLinkTitleImage("LINK PASSIVE_gray", "skill_name_bg0");
        SkillList.Add(_newSkill);
    }
Esempio n. 9
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);
    }
Esempio n. 10
0
    public void AddRaceBonus(MasterDataParamChara cCharaMasterData)
    {
        UnitSkillContext _newSkill = new UnitSkillContext();

        _newSkill.setupRaceBonus(cCharaMasterData);
        _newSkill.setLinkTitleImage("RACE BONUS_gray", "skill_name_bg0");
        SkillList.Add(_newSkill);
    }
Esempio n. 11
0
 public void AddLinkEffectInfo(CharaOnce cCharaOnce, MasterDataParamChara cCharaMasterData, bool bLink)
 {
     if (m_LinkBonus == null)
     {
         m_LinkBonus = new UnitSkillContext();
     }
     m_LinkBonus.setupLinkEffectInfo(cCharaOnce, cCharaMasterData, bLink);
     LinkList.Add(m_LinkBonus);
 }
Esempio n. 12
0
 public void AddLinkPassive(MasterDataParamChara cCharaMasterData)
 {
     if (m_LinkPassive == null)
     {
         m_LinkPassive = new UnitSkillContext();
     }
     m_LinkPassive.setupLinkPassive(cCharaMasterData);
     LinkList.Add(m_LinkPassive);
 }
Esempio n. 13
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);
 }
Esempio n. 14
0
 public void AddRaceBonus(MasterDataParamChara cCharaMasterData)
 {
     if (m_RaceBonus == null)
     {
         m_RaceBonus = new UnitSkillContext();
     }
     m_RaceBonus.setupRaceBonus(cCharaMasterData);
     LinkList.Add(m_RaceBonus);
 }
Esempio n. 15
0
 public void AddUnitDataLink(CharaOnce cCharaParam, MasterDataParamChara cCharaMasterData)
 {
     if (m_LinkBonus == null)
     {
         m_LinkBonus = new UnitSkillContext();
     }
     m_LinkBonus.setupUnitData(cCharaParam, cCharaMasterData);
     LinkList.Add(m_LinkBonus);
 }
    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);
            }
        }
    }
    /// <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());
    }
Esempio n. 18
0
    //----------------------------------------------------------------------------

    /*!
     *          @brief	スキル発動ウィンドウOPEN
     *          @param[in]	GlobalDefine.PartyCharaIndex	(charaIdx)		キャラパーティインデックス
     *          @param[in]	uint							(charaId)		キャラID
     */
    //----------------------------------------------------------------------------
    public void OpenSkillMenu(GlobalDefine.PartyCharaIndex charaIdx, uint charaId, int turn, bool bSealed = false)
    {
        if (m_InGameMenuQuest2 == null)
        {
            return;
        }
        if (charaIdx == GlobalDefine.PartyCharaIndex.ERROR)
        {
            return;
        }
        // 既に開いてる場合
        if (m_SkillMenuActive == true)
        {
            // 一旦初期化する
            if (InGameUtil.isQuest2() == true)
            {
                changePartyUnitParent(false);
            }
            if (m_CharaIdx == GlobalDefine.PartyCharaIndex.HERO)
            {
                m_newSkill.setupHeroSkill(0);
            }
            else
            {
                m_newSkill.setupLimitBreakSkill(0, 0);
            }
            m_InGameMenuQuest2.Skill_menu_active = false;
            m_InGameMenuQuest2.Menu_bg_active    = false;
        }

        m_SkillMenuActive = true;
        m_CharaIdx        = charaIdx;
        uint skill_limitbreak = 0;
        uint limitbreak_lv    = 0;

        if (charaIdx == GlobalDefine.PartyCharaIndex.HERO)
        {
            int unique_id = UserDataAdmin.Instance.m_StructPlayer.current_hero_id;
            for (int i = 0; i < UserDataAdmin.Instance.m_StructHeroList.Length; ++i)
            {
                if (UserDataAdmin.Instance.m_StructHeroList[i].unique_id == unique_id)
                {
                    skill_limitbreak = (uint)UserDataAdmin.Instance.m_StructHeroList[i].current_skill_id;
                }
            }
        }
        else
        {
            MasterDataParamChara _master = InGamePlayerParty.m_PlayerPartyChara[(int)m_CharaIdx].m_CharaMasterDataParam;
            skill_limitbreak = _master.skill_limitbreak;
            limitbreak_lv    = (uint)InGamePlayerParty.m_PlayerPartyChara[(int)m_CharaIdx].m_CharaLBSLv;
        }

        if (m_newSkill == null)
        {
            m_newSkill = new UnitSkillContext();
            m_InGameMenuQuest2.SkillList.Add(m_newSkill);
        }
        if (charaIdx == GlobalDefine.PartyCharaIndex.HERO)
        {
            m_newSkill.setupHeroSkill(skill_limitbreak);
        }
        else
        {
            m_newSkill.setupLimitBreakSkill(skill_limitbreak, limitbreak_lv);
        }

        m_InGameMenuQuest2.Skill_menu_active = true;
        m_InGameMenuQuest2.Menu_bg_active    = true;

        changePartyUnitParent(true);

        SoundUtil.PlaySE(SEID.SE_BATLE_UI_OPEN);
        m_MenuButton.color = m_MenuButtonGray;
        m_OkDisable        = false;
        m_InGameMenuQuest2.SkillMenuOkColor = Color.white;
        if (turn == 0)
        {
            if (bSealed == true)
            {
                m_InGameMenuQuest2.Skill_title_text = GameTextUtil.GetText("unit_action_01");
                m_InGameMenuQuest2.IsBack           = true;
            }
            else
            {
                m_InGameMenuQuest2.Skill_title_text = GameTextUtil.GetText("battle_infotext6");
                m_InGameMenuQuest2.IsBack           = false;
                if (charaIdx != GlobalDefine.PartyCharaIndex.HERO)
                {
                    if (BattleSceneUtil.checkLimitBreak(BattleParam.m_PlayerParty, m_CharaIdx, BattleParam.m_EnemyParam, BattleParam.m_TargetEnemyCurrent) == false)
                    {
                        m_OkDisable = true;
                        m_InGameMenuQuest2.SkillMenuOkColor = Color.gray;
                    }
                }
            }
        }
        else
        {
            if (charaIdx == GlobalDefine.PartyCharaIndex.HERO)
            {
                m_InGameMenuQuest2.Skill_title_text = string.Format(GameTextUtil.GetText("hero_skill_hands_battle"), turn);
            }
            else
            {
                m_InGameMenuQuest2.Skill_title_text = string.Format(GameTextUtil.GetText("unit_skill_turn_battle"), turn);
            }
            m_InGameMenuQuest2.IsBack = true;
        }
        UnityUtil.SetObjectEnabled(m_MenuButtonMask, true);
    }
Esempio n. 19
0
    public void SetDetail(PacketStructHero heroData, Action <HeroStoryListItemContext> _OnClickStoryItem)
    {
        ClearView();
        if (heroData == null || heroData.hero_id == 0)
        {
            return;
        }
        MasterDataHero heroMaster = MasterFinder <MasterDataHero> .Instance.Find((int)heroData.hero_id);

        if (heroMaster == null)
        {
            return;
        }

        SetUpHeroName(heroData.hero_id); // 名前
        MessageText = heroMaster.detail; // 詳細テキスト

        AssetBundler.Create().Set("hero_" + heroData.hero_id.ToString("0000"), "hero_" + heroData.hero_id.ToString("0000"), (o) =>
        {
            Sprite[] sprite = o.AssetBundle.LoadAssetWithSubAssets <Sprite>("hero_" + heroData.hero_id.ToString("0000"));
            HeroImage       = sprite[4];
        }).Load();
        //------------------------------------------------------------------
        // グレードの設定
        //------------------------------------------------------------------
        m_GradeNum = heroData.level;

        MasterDataHeroLevel nextHeroLevelMaster = MasterFinder <MasterDataHeroLevel> .Instance.Find((int)heroData.level + 1);

        if (nextHeroLevelMaster != null)
        {
            m_NextGradeNum = nextHeroLevelMaster.exp_next_total - heroData.exp;
        }
        else
        {
            m_NextGradeNum = 0;
        }

        //------------------------------------------------------------------
        // イラストレーター名
        //------------------------------------------------------------------
        MasterDataIllustrator illustratorMaster = MasterFinder <MasterDataIllustrator> .Instance.Find((int)heroMaster.illustrator_id);

        if (illustratorMaster != null)
        {
            IllustratorText = illustratorMaster.name;
        }

        //------------------------------------------------------------------
        // スキルの設定
        //------------------------------------------------------------------
        List <UnitSkillContext> skillList = new List <UnitSkillContext>();
        UnitSkillContext        skill     = new UnitSkillContext();

        skill.setupHeroSkill((uint)heroMaster.default_skill_id, heroData.hero_id, m_GradeNum, true);
        skillList.Add(skill);
        Skills = skillList;

        //------------------------------------------------------------------
        // ストーリの設定
        //------------------------------------------------------------------
        List <HeroStoryListItemContext> storyList = new List <HeroStoryListItemContext>();

        for (int i = 0; i < 4; ++i)
        {
            var model = new ListItemModel((uint)i);
            HeroStoryListItemContext story = new HeroStoryListItemContext(model);
            story.StoryTitle = "";
            storyList.Add(story);

            model.OnClicked += () =>
            {
                _OnClickStoryItem(story);
            };

            // TODO : 演出を入れるならそこに移動
            model.Appear();
            model.SkipAppearing();
        }

        SetStory(storyList[0], (uint)heroData.hero_id);
        storyList[1].ContentText = "";
        storyList[2].ContentText = "";
        storyList[3].ContentText = "";

        storyList[0].IsOpenStory = true;

        Stories = storyList;
    }
Esempio n. 20
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;
    }