OnPlacement() public method

public OnPlacement ( Server.Mobile from, Server.Point3D p ) : void
from Server.Mobile
p Server.Point3D
return void
Example #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 (region.IsPartOf(typeof(HouseRegion)) || region.IsPartOf(typeof(ChampionSpawnRegion)))
                    {
                        from.SendAsciiMessage("A boat may not be placed in this area."); // A boat may not be placed in this area.
                    }
                    else
                    {
                        m_Deed.OnPlacement(from, p);
                    }
                }
            }
Example #2
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)))
                    {
                        from.SendLocalizedMessage(1042549);                           // A boat may not be placed in this area.
                    }
                    else
                    {
                        m_Deed.OnPlacement(from, p);
                    }
                }
            }
Example #3
0
            protected override void OnTarget(Mobile from, object o)
            {
                var ip = o as IPoint3D;

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

                    var p = new Point3D(ip);

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

                    m_Deed.OnPlacement(from, p);
                }
            }