OnPlacement() public méthode

public OnPlacement ( Mobile from, Point3D p ) : void
from Mobile
p Point3D
Résultat void
Exemple #1
0
            protected override void OnTarget(Mobile from, object o)
            {
                IPoint3D ip = o as IPoint3D;

                if (ip != null)
                {
                    if (ip is Item)
                    {
                        ip = ((Item)ip).GetWorldTop();
                    }

                    Point3D p = new Point3D(ip);

                    Region region = Region.Find(p, from.Map);

                    if (from.Region != null && from.Region.IsDungeonRules)
                    {
                        from.SendLocalizedMessage(502488);                         // You can not place a ship inside a dungeon.
                    }
                    else if (region is HouseRegion)
                    {
                        from.SendLocalizedMessage(1042549);                         // A boat may not be placed in this area.
                    }
                    else
                    {
                        m_Model.OnPlacement(from, p);
                    }
                }
            }
            protected override void OnTarget(Mobile from, object o)
            {
                IPoint3D ip = o as IPoint3D;

                if (ip != null)
                {
                    if (ip is Item)
                    {
                        ip = ((Item)ip).GetWorldTop();
                    }

                    Point3D p = new Point3D(ip);

                    Region region = Region.Find(p, from.Map);

                    if (region.IsPartOf(typeof(DungeonRegion)))
                    {
                        from.SendLocalizedMessage(502488);                           // You can not place a ship inside a dungeon.
                    }
                    else if (region.IsPartOf(typeof(HouseRegion)) || region.IsPartOf(typeof(ChampionSpawnRegion)))
                    {
                        from.SendLocalizedMessage(1042549); // A boat may not be placed in this area.
                    }
                    else
                    {
                        m_Model.OnPlacement(from, p);
                        from.SendGump(new WarningGump(1060637, 30720, "!!! WARNING WARNING WARNING WARNING !!!\nBoats are SINKABLE by using cannons. When a boat has sustained significant damage, it will also be BOARDABLE (the planks or ropes will open to anybody). This means anything that you have on the boat is at risk! The owner of a sunken boat can (through a deed that appears in their bank) either pay a ransom to those who destroyed the boat OR risk venturing out to repair the boat themselves, in which case they have a certain time window to do so or else it can be repaired and captured by anybody else (and therefore LOST TO THEM). Boat deeds and dry-docked boats ARE blessed.", 0xFFC000, 320, 240, null, null));
                    }
                }
            }
Exemple #3
0
            protected override void OnTarget(Mobile from, object o)
            {
                IPoint3D ip = o as IPoint3D;

                if (ip != null)
                {
                    if (ip is Item)
                    {
                        ip = ((Item)ip).GetWorldTop();
                    }

                    Point3D p = new Point3D(ip);

                    Region region = Region.Find(p, from.Map);

                    if (region is DungeonRegion)
                    {
                        from.SendAsciiMessage("You can not place a ship inside a dungeon.");
                    }
                    else if (region is HouseRegion)
                    {
                        from.SendAsciiMessage("A boat may not be placed in this area.");
                    }
                    else
                    {
                        m_Model.OnPlacement(from, p);
                    }
                }
            }
Exemple #4
0
            protected override void OnTarget(Mobile from, object o)
            {
                IPoint3D ip = o as IPoint3D;

                if (ip != null)
                {
                    if (ip is Item)
                    {
                        ip = ((Item)ip).GetWorldTop();
                    }

                    Point3D p = new Point3D(ip);

                    Region region = Region.Find(p, from.Map);

                    if (region.IsPartOf(typeof(DungeonRegion)))
                    {
                        from.SendLocalizedMessage(502488);                           // You can not place a ship inside a dungeon.
                    }

                    /*else if ( region.IsPartOf( typeof( HouseRegion ) ) || region.IsPartOf( typeof( ChampionSpawnRegion ) ) )
                     *      from.SendLocalizedMessage( 1042549 ); // A boat may not be placed in this area.*/
                    else
                    {
                        m_Model.OnPlacement(from, p);
                    }
                }
            }
Exemple #5
0
            protected override void OnTarget(Mobile from, object o)
            {
                IPoint3D ip = o as IPoint3D;

                if (ip != null)
                {
                    if (ip is Item)
                    {
                        ip = ((Item)ip).GetWorldTop();
                    }

                    Point3D p = new Point3D(ip);

                    Region region = Region.Find(p, from.Map);

                    if (region.IsPartOf(typeof(DungeonRegion)))
                    {
                        from.SendLocalizedMessage(502488);                           // You can not place a ship inside a dungeon.
                    }
                    else
                    {
                        m_Model.OnPlacement(from, p);
                    }
                }
            }
Exemple #6
0
            protected override void OnTarget(Mobile from, object o)
            {
                IPoint3D ip = o as IPoint3D;

                if (ip != null)
                {
                    if (ip is Item)
                    {
                        ip = ((Item)ip).GetWorldTop();
                    }

                    Point3D p = new Point3D(ip);

                    if (m_Model.DockLocation != Point3D.Zero && !Utility.InRange(p, m_Model.DockLocation, 50))
                    {
                        from.SendMessage("You are too far from the place where this ship was originally docked.");
                        return;
                    }

                    Region region = Region.Find(p, from.Map);

                    if (region is DungeonRegion)
                    {
                        from.SendLocalizedMessage(502488);                           // You can not place a ship inside a dungeon.
                    }
                    else if (region is HouseRegion)
                    {
                        from.SendLocalizedMessage(1042549);                           // A boat may not be placed in this area.
                    }
                    else
                    {
                        m_Model.OnPlacement(from, p);
                    }
                }
            }