Exemplo n.º 1
0
        public void setHeroUpLvInfo(cmd_entity_statichero_upgrade cmdInfo)
        {
            heroIcon.sprite = USpriteManager.Instance.GetSprite(USpriteManager.ESpriteType.EST_HeadPortrait, WndID.WND_ID_WAR_RECORDTABLE_END, 1, 3, cmdInfo.nHeroID);
            heroName.text   = cmdInfo.chHeroName;
            heroLv.text     = cmdInfo.nCurrntLv.ToString();
            if (heroIcon.sprite == null)
            {
                heroIcon.sprite = USpriteManager.Instance.GetSprite(USpriteManager.ESpriteType.EST_HeadPortrait, WndID.WND_ID_WAR_RECORDTABLE_END, 1, 3, 10);
            }
            int nHeroStar = cmdInfo.nStarLv;
            int nGrade    = (nHeroStar - 1) / UDefines.UPGRADE_VALUE + 1;
            int nGradeLv  = nHeroStar % UDefines.UPGRADE_VALUE;

            if (nGradeLv == 0)
            {
                nGradeLv = UDefines.UPGRADE_VALUE;
            }

            for (int i = 0; i < UDefines.PROPERTY_COUNT; ++i)
            {
                if (i >= 2)
                {
                    Hp[i].text           = (cmdInfo.fHP[i] == 0 ? "" : ("+" + cmdInfo.fHP[i].ToString("0.0")));
                    PhysicAttack[i].text = (cmdInfo.fPA[i] == 0 ? "" : ("+" + cmdInfo.fPA[i].ToString("0.0")));
                    PhysicDef[i].text    = (cmdInfo.fPD[i] == 0 ? "" : ("+" + cmdInfo.fPD[i].ToString("0.0")));
                    Mp[i].text           = (cmdInfo.fMagic[i] == 0 ? "" : ("+" + cmdInfo.fMagic[i].ToString("0.0")));
                    MagicAttack[i].text  = (cmdInfo.fMA[i] == 0 ? "" : ("+" + cmdInfo.fMA[i].ToString("0.0")));
                    MagicDef[i].text     = (cmdInfo.fMD[i] == 0 ? "" : ("+" + cmdInfo.fMD[i].ToString("0.0")));
                }
                else
                {
                    Hp[i].text           = cmdInfo.fHP[i].ToString("0.0");
                    PhysicAttack[i].text = cmdInfo.fPA[i].ToString("0.0");
                    PhysicDef[i].text    = cmdInfo.fPD[i].ToString("0.0");
                    Mp[i].text           = cmdInfo.fMagic[i].ToString("0.0");
                    MagicAttack[i].text  = cmdInfo.fMA[i].ToString("0.0");
                    MagicDef[i].text     = cmdInfo.fMD[i].ToString("0.0");
                }
            }
        }
Exemplo n.º 2
0
 public void setStaticHeroUpgradeInfo(cmd_entity_statichero_upgrade HeroUpgradeInfo, bool bIsUpgrade)
 {
     m_CmdUpgradeInfo = HeroUpgradeInfo;
     m_HeroIsUpgrade  = bIsUpgrade;
     LogicDataCenter.playerSystemDataManager.HeroLevelChangeUpdate(HeroUpgradeInfo.nHeroID, HeroUpgradeInfo.nCurrntLv);
 }