Esempio n. 1
0
 /// <summary>
 /// 计算英雄属性(不包含装备)
 /// </summary>
 public static Dictionary <RoleAttributeType, RoleAttribute> CalcPlayerAttributesDic(PlayerInfo playerInfo)
 {
     if (playerInfo == null)
     {
         return(null);
     }
     return(HeroUtil.CalcHeroAttributesDic(playerInfo.heroData, playerInfo.level, playerInfo.advanceLevel, playerInfo.strengthenLevel));
 }
Esempio n. 2
0
        /// <summary>
        /// 计算英雄属性(不包含装备)
        /// </summary>
        public static Dictionary <RoleAttributeType, RoleAttribute> CalcRoleAttributesDic(RoleInfo roleInfo)
        {
            PlayerInfo player = roleInfo as PlayerInfo;
            HeroInfo   hero   = roleInfo as HeroInfo;

            if (player != null)
            {
                return(PlayerUtil.CalcPlayerAttributesDic(player));
            }
            if (hero != null)
            {
                return(HeroUtil.CalcHeroAttributesDic(hero));
            }
            return(null);
        }