Ejemplo n.º 1
0
        public static MobInfo Get(string id)
        {
            WzImage mobImage = (WzImage)Program.WzManager["mob"][id + ".img"];

            if (mobImage == null)
            {
                return(null);
            }
            if (!mobImage.Parsed)
            {
                mobImage.ParseImage();
            }
            if (mobImage.HCTag == null)
            {
                mobImage.HCTag = MobInfo.Load(mobImage);
            }
            MobInfo result = (MobInfo)mobImage.HCTag;

            result.ParseImageIfNeeded();
            return(result);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Get monster by ID
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public static MobInfo Get(string id)
        {
            foreach (string mobWzFile in WzFileManager.MOB_WZ_FILES)
            {
                WzImage mobImage = (WzImage)Program.WzManager[mobWzFile.ToLower()]?[id + ".img"];
                if (mobImage == null)
                {
                    continue;
                }

                if (!mobImage.Parsed)
                {
                    mobImage.ParseImage();
                }
                if (mobImage.HCTag == null)
                {
                    mobImage.HCTag = MobInfo.Load(mobImage);
                }
                MobInfo result = (MobInfo)mobImage.HCTag;
                result.ParseImageIfNeeded();
                return(result);
            }
            return(null);
        }
Ejemplo n.º 3
0
        public static MobInfo Get(string id)
        {
            WzImage mobImage = SearchMobImg(id);

            if (mobImage == null)
            {
                return(null);
            }

            if (!mobImage.Parsed)
            {
                mobImage.ParseImage();
            }

            if (mobImage.HCTag == null)
            {
                mobImage.HCTag = MobInfo.Load(mobImage);
            }

            MobInfo result = (MobInfo)mobImage.HCTag;

            result.ParseImageIfNeeded();
            return(result);
        }