public static ContextActorLook GetBreedEntityLook(int breedid, bool sex, int cosmeticid, IEnumerable <int> colors) { var breed = Breeds.Find(x => x.Id == breedid); ContextActorLook result; if (!sex) { result = ContextActorLook.Parse(breed.MaleLook); } else { result = ContextActorLook.Parse(breed.FemaleLook); } List <int> futureColors = new List <int>(); int index = 1; foreach (var color in colors) { if (color == -1) { futureColors.Add(GetDefaultBreedColor(breed.Id, sex, index)); } else { futureColors.Add(color); } index++; } result.indexedColors = ContextActorLook.GetDofusColors(futureColors); result.AddSkin((ushort)HeadRecord.GetSkinFromCosmeticId(cosmeticid)); return(result); }
public MountRecord(uint id, string name, string look, ushort certificategid) { this.Id = id; this.Name = name; this.Look = look; this.CertificateGID = certificategid; this.RealLook = ContextActorLook.Parse(Look); this.RealLook.indexedColors = ContextActorLook.GetDofusColors(this.RealLook.indexedColors); }