Ejemplo n.º 1
0
        public static MapleTable <PortalType> CreatePortalTypeHashtable()
        {
            MapleTable <PortalType> result = new MapleTable <PortalType>();

            result.Add("sp", PortalType.PORTALTYPE_STARTPOINT);
            result.Add("pi", PortalType.PORTALTYPE_INVISIBLE);
            result.Add("pv", PortalType.PORTALTYPE_VISIBLE);
            result.Add("pc", PortalType.PORTALTYPE_COLLISION);
            result.Add("pg", PortalType.PORTALTYPE_CHANGABLE);
            result.Add("pgi", PortalType.PORTALTYPE_CHANGABLE_INVISIBLE);
            result.Add("tp", PortalType.PORTALTYPE_TOWNPORTAL_POINT);
            result.Add("ps", PortalType.PORTALTYPE_SCRIPT);
            result.Add("psi", PortalType.PORTALTYPE_SCRIPT_INVISIBLE);
            result.Add("pcs", PortalType.PORTALTYPE_COLLISION_SCRIPT);
            result.Add("ph", PortalType.PORTALTYPE_HIDDEN);
            result.Add("psh", PortalType.PORTALTYPE_SCRIPT_HIDDEN);
            result.Add("pcj", PortalType.PORTALTYPE_COLLISION_VERTICAL_JUMP);
            result.Add("pci", PortalType.PORTALTYPE_COLLISION_CUSTOM_IMPACT);
            result.Add("pcig", PortalType.PORTALTYPE_COLLISION_UNKNOWN_PCIG);
            return(result);
        }
Ejemplo n.º 2
0
        public void ExtractPortals()
        {
            WzSubProperty portalParent = (WzSubProperty)this["map"].GetObjectFromPath("Map.wz/MapHelper.img/portal");
            WzSubProperty editorParent = (WzSubProperty)portalParent["editor"];

            Program.InfoManager.Portals = new PortalInfo[editorParent.WzProperties.Count];
            foreach (WzCanvasProperty portal in editorParent.WzProperties)
            {
                PortalInfo.Load(portal);
            }
            WzSubProperty gameParent = (WzSubProperty)portalParent["game"];

            foreach (WzSubProperty portal in gameParent.WzProperties)
            {
                if (portal.WzProperties[0] is WzSubProperty)
                {
                    MapleTable <Bitmap> images = new MapleTable <Bitmap>();
                    Bitmap defaultImage        = null;
                    foreach (WzSubProperty image in portal.WzProperties)
                    {
                        WzSubProperty portalContinue = (WzSubProperty)image["portalContinue"];
                        if (portalContinue == null)
                        {
                            continue;
                        }
                        Bitmap portalImage = (Bitmap)portalContinue["0"];
                        if (image.Name == "default")
                        {
                            defaultImage = portalImage;
                        }
                        else
                        {
                            images.Add(image.Name, portalImage);
                        }
                    }
                    Program.InfoManager.GamePortals.Add(PortalInfo.ptByShortName[portal.Name], new PortalGameImageInfo(defaultImage, images));
                }
            }
        }
Ejemplo n.º 3
0
 public PortalGameImageInfo(Bitmap defaultImage, MapleTable <Bitmap> imageList)
 {
     this.defaultImage = defaultImage;
     this.imageList    = imageList;
 }