Example #1
0
 public static void SetNpcStateImage(Dictionary <int, ResStateInfo> list, CharacterState state, string fileName)
 {
     if (list == null)
     {
         return;
     }
     if (!list.ContainsKey((int)state))
     {
         list[(int)state] = new ResStateInfo();
     }
     list[(int)state].SetImageFilePath(ImageType.ASF, GetAsfFilePathBase(fileName, ResType.Npc), fileName, null);
 }
Example #2
0
        private static ResStateInfo GetStateInfo(string image, string shd, string sound, ResType type)
        {
            var info = new ResStateInfo();

            var ext = Path.GetExtension(image);

            ext = string.IsNullOrEmpty(ext) ? "" : ext;
            ext = ext.ToLower();
            switch (ext)
            {
            case ".asf":
                info.SetImageFilePath(ImageType.ASF, GetAsfFilePathBase(image, type), image, shd);
                break;

            case ".mpc":
                info.SetImageFilePath(ImageType.MPC, GetMpcFilePathBase(image, type), image, shd);
                break;
            }
            info.SetSound(sound);
            return(info);
        }