Beispiel #1
0
        public void HandlePositionCommand(CommandEventArgs e)
        {
            var user = e.Mobile as PlayerMobile;

            if (user == null || user.Deleted || user.NetState == null || !ModuleEnabled)
            {
                return;
            }

            if (user.AccessLevel < Access)
            {
                if (user.AccessLevel > AccessLevel.Player)
                {
                    user.SendMessage("You do not have access to that command.");
                }

                return;
            }

            var tb = Toolbars.EnsureState(user).GetToolbarGump();

            SuperGump.Send(
                new OffsetSelectorGump(
                    user,
                    tb.Refresh(true),
                    Toolbars.GetOffset(user),
                    (self, oldValue) =>
            {
                Toolbars.SetOffset(user, self.Value);
                tb.X = self.Value.X;
                tb.Y = self.Value.Y;
                tb.Refresh(true);
            }));
        }
Beispiel #2
0
 protected virtual void ShowPositionSelect(GumpButton b)
 {
     Send(
         new OffsetSelectorGump(
             User,
             Refresh(true),
             Toolbars.GetOffset(User),
             (self, oldValue) =>
     {
         Toolbars.SetOffset(self.User, self.Value);
         X = self.Value.X;
         Y = self.Value.Y;
         Refresh(true);
     }));
 }
Beispiel #3
0
        protected virtual void ShowPositionSelect(GumpButton b)
        {
            if (!(User is PlayerMobile))
            {
                return;
            }

            var user = (PlayerMobile)User;

            new OffsetSelectorGump(
                user,
                Refresh(true),
                Toolbars.GetOffset(user),
                (self, oldValue) =>
            {
                Toolbars.SetOffset(user, self.Value);
                X = self.Value.X;
                Y = self.Value.Y;
                Refresh(true);
            }).Send();
        }