Ejemplo n.º 1
0
        public static RpgClassDTO GetDTOFromClass(RpgClass rpgClass)
        {
            var rpgClassDTO = new RpgClassDTO()
            {
                level             = rpgClass.Level,
                hitDice           = rpgClass.HitDice,
                name              = rpgClass.Name,
                fortitudeBaseSave = rpgClass.FortitudeBaseSave,
                reflexBaseSave    = rpgClass.ReflexBaseSave,
                willBaseSave      = rpgClass.WillBaseSave,
                baseAttacks       = rpgClass.BaseAttacks
            };

            return(rpgClassDTO);
        }
Ejemplo n.º 2
0
        public static RpgClass GetRpgClassFromDTO(RpgClassDTO classDTO)
        {
            var rpgClass = new RpgClass()
            {
                Level             = classDTO.level,
                HitDice           = classDTO.hitDice,
                Name              = classDTO.name,
                FortitudeBaseSave = classDTO.fortitudeBaseSave,
                ReflexBaseSave    = classDTO.reflexBaseSave,
                WillBaseSave      = classDTO.willBaseSave,
                BaseAttacks       = classDTO.baseAttacks
            };

            return(rpgClass);
        }