Exemplo n.º 1
0
        private List <ExdData.Features> FeatureD(IEnumerable <SaintCoinach.Xiv.CharaMakeType.CharaMakeFeatureIcon> parse)
        {
            List <ExdData.Features> NewList = new List <ExdData.Features>();

            foreach (var Parse in parse)
            {
                try
                {
                    if (Parse.FacialFeatureIcon == null)
                    {
                        NewList.Add(new ExdData.Features {
                            FeatureID = Parse.Count, Icon = null
                        });
                    }
                    else
                    {
                        NewList.Add(new ExdData.Features {
                            FeatureID = Parse.Count, Icon = ExdData.CreateSource(Parse.FacialFeatureIcon)
                        });
                    }
                }
                catch
                {
                    NewList.Add(new ExdData.Features {
                        FeatureID = Parse.Count, Icon = null
                    });
                }
            }
            return(NewList);
        }
Exemplo n.º 2
0
 public void FillFacialFeature(int FaceKey, int tribeKey, int gender)
 {
     try
     {
         FaceKey--;
         if (FaceKey < 0)
         {
             FaceKey = 0;
         }
         FacialFeatureView.Items.Clear();
         if (FaceKey > 3 && tribeKey >= 2 && tribeKey != 13 && tribeKey != 14 ||
             FaceKey >= 6 && tribeKey == 1 && gender == 0 ||
             FaceKey >= 5 && tribeKey == 1 && gender == 1)
         {
             FaceKey = 0;
         }
         if (tribeKey == 13 || tribeKey == 14)
         {
             gender = 0;                                   //Hrothgar
         }
         if (tribeKey == 15 || tribeKey == 16)
         {
             gender = 1;                                   // Veria
         }
         var valuesAsList = Enum.GetValues(typeof(FacialEnums)).Cast <FacialEnums>().ToList();
         foreach (var CharaFeature in ExdData.CharaMakeFeatures2)
         {
             if (tribeKey != CharaFeature.Value.Tribe)
             {
                 continue;
             }
             if (tribeKey == CharaFeature.Value.Tribe && gender == CharaFeature.Value.Gender)
             {
                 FacialFeatureView.Items.Add(new Features()
                 {
                     FeatureID = 0, FeatureImage = ExdData.GetImageStream((System.Drawing.Image)Properties.Resources.ResourceManager.GetObject("Nope"))
                 });
                 for (int i = 0; i < 7; i++)
                 {
                     try
                     {
                         int IconUIID = FaceKey + (i * 4);
                         int NewID    = (int)valuesAsList[i];
                         FacialFeatureView.Items.Add(new Features()
                         {
                             FeatureID = NewID, FeatureImage = CharaFeature.Value.Features[IconUIID].Icon
                         });
                     }
                     catch
                     {
                         int NewID = (int)valuesAsList[i];
                         FacialFeatureView.Items.Add(new Features()
                         {
                             FeatureID = NewID, FeatureImage = null
                         });
                     }
                 }
                 FacialFeatureView.Items.Add(new Features()
                 {
                     FeatureID = 128, FeatureImage = ExdData.GetImageStream((System.Drawing.Image)Properties.Resources.ResourceManager.GetObject("Legacy"))
                 });
             }
         }
         DidUserInteract = false;
     }
     catch (Exception e)
     {
         throw e;
     }
 }