Exemplo n.º 1
0
        public static void Run(GameContext context)
        {
            var nameTypeDict = new Dictionary <string, Type>();

            nameTypeDict.Add("Intersect.GameObjects.Maps.TileArray[]", typeof(LegacyTileArray[]));
            mCeras = new Ceras(nameTypeDict);

            RemoveByteBufferUsageFromMaps(context);

            //Fix SetSwitch/SetVariable Event Commands
            FixVariableCommandsAndConditions(context, "Events", "Pages");

            //Convert Conditions (Events/EventCommands/Items/Quests/etc/etc/etc)
            FixVariableCommandsAndConditions(context, "Npcs", "AttackOnSightConditions");
            FixVariableCommandsAndConditions(context, "Npcs", "PlayerCanAttackConditions");
            FixVariableCommandsAndConditions(context, "Npcs", "PlayerFriendConditions");
            FixVariableCommandsAndConditions(context, "Spells", "CastRequirements");
            FixVariableCommandsAndConditions(context, "Resources", "HarvestingRequirements");
            FixVariableCommandsAndConditions(context, "Quests", "Requirements");
            FixVariableCommandsAndConditions(context, "Items", "UsageRequirements");
        }
        public static void Run(GameContext context)
        {
            var nameTypeDict = new Dictionary <string, Type>();

            nameTypeDict.Add("Intersect.GameObjects.Maps.TileArray[]", typeof(LegacyTileArray[]));

            nameTypeDict.Add("Intersect.GameObjects.Maps.MapAttribute[,]", typeof(LegacyMapAttribute[, ]));
            nameTypeDict.Add("Intersect.GameObjects.Maps.MapAttribute", typeof(LegacyMapAttribute));
            nameTypeDict.Add("Intersect.GameObjects.Maps.MapBlockedAttribute", typeof(LegacyMapBlockedAttribute));
            nameTypeDict.Add("Intersect.GameObjects.Maps.MapItemAttribute", typeof(LegacyMapItemAttribute));
            nameTypeDict.Add("Intersect.GameObjects.Maps.MapZDimensionAttribute", typeof(LegacyMapZDimensionAttribute));
            nameTypeDict.Add("Intersect.GameObjects.Maps.MapNpcAvoidAttribute", typeof(LegacyMapNpcAvoidAttribute));
            nameTypeDict.Add("Intersect.GameObjects.Maps.MapWarpAttribute", typeof(LegacyMapWarpAttribute));
            nameTypeDict.Add("Intersect.GameObjects.Maps.MapSoundAttribute", typeof(LegacyMapSoundAttribute));
            nameTypeDict.Add("Intersect.GameObjects.Maps.MapResourceAttribute", typeof(LegacyMapResourceAttribute));
            nameTypeDict.Add("Intersect.GameObjects.Maps.MapAnimationAttribute", typeof(LegacyMapAnimationAttribute));
            nameTypeDict.Add("Intersect.GameObjects.Maps.MapGrappleStoneAttribute", typeof(LegacyMapGrappleStoneAttribute));
            nameTypeDict.Add("Intersect.GameObjects.Maps.MapSlideAttribute", typeof(LegacyMapSlideAttribute));

            mOldCeras = new LegacyCeras(nameTypeDict);

            UpdateMapTilesAttributesWithCerasVersionTolerance(context);
        }