Exemplo n.º 1
0
        public static void AddTeleporters(ShameWall wall)
        {
            Map map = wall.Map;

            if (map == null || map == Map.Internal)
            {
                return;
            }

            foreach (AddonComponent component in wall.Components)
            {
                foreach (Point3D[] pnts in _TeleportLocs)
                {
                    if (component.Location == pnts[0])
                    {
                        ConditionTeleporter oldtele = map.FindItem <ConditionTeleporter>(new Point3D(pnts[1]));

                        if (oldtele != null)
                        {
                            WeakEntityCollection.Remove("newshame", oldtele);
                            oldtele.Delete();
                        }

                        ShameWallTeleporter teleporter = new ShameWallTeleporter(pnts[2], map);
                        teleporter.MoveToWorld(pnts[1], map);

                        WeakEntityCollection.Add("newshame", teleporter);
                    }
                }
            }
        }
Exemplo n.º 2
0
        public static void AddTeleporters(ShameWall wall)
        {
            Map map = wall.Map;

            if (map == null || map == Map.Internal)
            {
                return;
            }

            foreach (var component in wall.Components)
            {
                foreach (Point3D[] pnts in _TeleportLocs)
                {
                    if (component.Location == pnts[0])
                    {
                        var teleporter = new ConditionTeleporter();
                        //teleporter.DeadOnly = true;
                        teleporter.ClilocNumber   = 1072790; // The wall becomes transparent, and you push your way through it.
                        teleporter.MapDest        = map;
                        teleporter.PointDest      = pnts[2];
                        teleporter.DisableMessage = false;
                        teleporter.MoveToWorld(pnts[1], map);
                        WeakEntityCollection.Add("newshame", teleporter);
                    }
                }
            }
        }
Exemplo n.º 3
0
        public static void AddTeleporters(ShameWall wall)
        {
            Map map = wall.Map;

            if (map == null || map == Map.Internal)
            {
                return;
            }

            for (var index = 0; index < wall.Components.Count; index++)
            {
                AddonComponent component = wall.Components[index];

                for (var i = 0; i < _TeleportLocs.Length; i++)
                {
                    Point3D[] pnts = _TeleportLocs[i];

                    if (component.Location == pnts[0])
                    {
                        ConditionTeleporter oldtele = map.FindItem <ConditionTeleporter>(new Point3D(pnts[1]));

                        if (oldtele != null)
                        {
                            WeakEntityCollection.Remove("newshame", oldtele);
                            oldtele.Delete();
                        }

                        ShameWallTeleporter teleporter = new ShameWallTeleporter(pnts[2], map);
                        teleporter.MoveToWorld(pnts[1], map);

                        WeakEntityCollection.Add("newshame", teleporter);
                    }
                }
            }
        }
Exemplo n.º 4
0
        public static void AddTeleporters(ShameWall wall)
        {
            Map map = wall.Map;

            if (map == null || map == Map.Internal)
            {
                return;
            }

            foreach (var component in wall.Components)
            {
                foreach (Point3D[] pnts in _TeleportLocs)
                {
                    if (component.Location == pnts[0])
                    {
                        var teleporter = new ConditionTeleporter();
                        teleporter.DeadOnly       = true;
                        teleporter.MapDest        = map;
                        teleporter.PointDest      = pnts[2];
                        teleporter.DisableMessage = true;
                        teleporter.MoveToWorld(pnts[1], map);
                        WeakEntityCollection.Add("newshame", teleporter);
                    }
                }
            }
        }