private void FillFrom(bool isAttacker, BasicCharacterObject character, int seed = -1)
        {
            if (character.Culture != null)
            {
                Character.ArmorColor1    = Utility.ClothingColor1(character.Culture, isAttacker);
                Character.ArmorColor2    = Utility.ClothingColor2(character.Culture, isAttacker);
                Character.BannerCodeText = Utility.BannerFor(character.Culture, isAttacker).Serialize();
            }
            else
            {
                Character.ArmorColor1    = 0;
                Character.ArmorColor2    = 0;
                Character.BannerCodeText = "";
            }
            Character.CharStringId = character.StringId;
            Character.IsFemale     = _config.FemaleRatio > 0.5;
            var equipment = Utility.GetNewEquipmentsForPerks(_config.HeroClass, _config.IsHero,
                                                             _config.SelectedFirstPerk, _config.SelectedSecondPerk, _config.IsHero);

            Character.EquipmentCode  = equipment.CalculateEquipmentCode();
            Character.BodyProperties = null;
            Character.BodyProperties = FaceGen.GetRandomBodyProperties(_config.FemaleRatio > 0.5,
                                                                       character.GetBodyPropertiesMin(false), character.GetBodyPropertiesMax(),
                                                                       (int)equipment.HairCoverType, seed, character.HairTags, character.BeardTags,
                                                                       character.TattooTags).ToString();
            Character.MountCreationKey =
                MountCreationKey.GetRandomMountKey(equipment[10].Item, Common.GetDJB2(character.StringId));
        }
Ejemplo n.º 2
0
 public static BodyProperties GetRandomBodyProperties(
     bool isFemale,
     BodyProperties bodyPropertiesMin,
     BodyProperties bodyPropertiesMax,
     int hairCoverType,
     int seed,
     string hairTags,
     string beardTags,
     string tattooTags)
 {
     return(FaceGen.GetRandomBodyProperties(isFemale, bodyPropertiesMin, bodyPropertiesMax, hairCoverType, seed, hairTags, beardTags, tattooTags));
 }