Beispiel #1
0
        private static void JoinDeathCamEvent(PlayerMobile cam)
        {
            if (cam == null)
            {
                return;
            }

            if (DeathCams.Remove(cam))
            {
                cam.SendMessage("You have been removed from the regular death cameras list.");
            }

            if (DeathCamsEvents.ContainsKey(cam))
            {
                return;
            }

            DeathCamsEvents.Add(cam, DateTime.UtcNow);

            cam.BodyValue = 0;
            cam.Blessed   = true;
            cam.SendMessage("You are now a battle death camera.  Type [DCquit to stop.");

            cam.CloseAllGumps();

            RefreshUI(cam);
        }
Beispiel #2
0
        public void CloseAll()
        {
            PlayerMobile pm = RootParent as PlayerMobile;

            pm.CloseAllGumps();

            Hue = 1175;
        }
Beispiel #3
0
        public void RefreshAllGumps()
        {
            PlayerMobile pm = RootParent as PlayerMobile;

            pm.CloseAllGumps();

            for (int i = 0; i < GumpItems.Count; i++)
            {
                GumpItems[i].RefreshGump(pm);
                GumpItems[i].BBLayer = i;
            }
        }
Beispiel #4
0
        public void DeleteElement(int GumpIndex)
        {
            if (GumpIndex < GumpItems.Count && GumpIndex >= 0)
            {
                BBGumpItem item = GumpItems[GumpIndex];

                GumpItems.RemoveAt(GumpIndex);

                item.Delete();

                if (GumpItems.Count <= 0)
                {
                    PlayerMobile pm = RootParent as PlayerMobile;

                    pm.CloseAllGumps();

                    Delete();
                }
                else
                {
                    RefreshAllGumps();
                }
            }
        }