Пример #1
0
        void ContextMenu_Popup(object sender, EventArgs e)
        {
            ContextMenu cm = this.ContextMenu;

            cm.MenuItems.Clear();
            if (World.Player != null && PacketHandlers.Party.Count > 0)
            {
                MapMenuItem mi = new MapMenuItem("You", new EventHandler(FocusChange));
                mi.Tag = World.Player.Serial;
                cm.MenuItems.Add(mi);
                foreach (Serial s in PacketHandlers.Party)
                {
                    Mobile m = World.FindMobile(s);
                    if (m.Name != null)
                    {
                        mi     = new MapMenuItem(m.Name, new EventHandler(FocusChange));
                        mi.Tag = s;
                        if (this.Map.FocusMobile == m)
                        {
                            mi.Checked = true;
                        }
                        cm.MenuItems.Add(mi);
                    }
                }
            }

            this.ContextMenu = cm;
        }
Пример #2
0
        private void FocusChange(object sender, System.EventArgs e)
        {
            if (sender != null)
            {
                MapMenuItem mItem = sender as MapMenuItem;

                if (mItem != null)
                {
                    Serial s = (Serial)mItem.Tag;
                    Mobile m = World.FindMobile(s);
                    this.Map.FocusMobile = m;
                    this.Map.FullUpdate();
                }
            }
        }
        static void DuplicateEffectAtMenu(MapMenuItem menuItem, object arg2)
        {
            //if (menuItem != null)
            //	Talespire.Log.Warning($"menuItem.gameObject.name = {menuItem.gameObject.name}");

            CreatureBoardAsset creatureAtMenu = RadialUI.RadialUIPlugin.CreatureAtMenu;

            //Talespire.Log.Warning($"DuplicateEffectAtMenu: \"{menuItem}\", \"{arg2}\"");
            //Talespire.Log.Warning($"CreatureAtMenu: {creatureAtMenu.Creature.Name}");

            if (creatureAtMenu != null)
            {
                IOldPersistentEffect persistentEffect = creatureAtMenu.GetPersistentEffect();
                //string persistentEffectData = creatureAtMenu.GetPersistentEffectData();
                Talespire.PersistentEffects.Duplicate(persistentEffect, creatureAtMenu.GetOnlyCreatureName());
            }
        }
Пример #4
0
        void ContextMenu_Popup(object sender, EventArgs e)
        {
            ContextMenu cm = this.ContextMenu;
            cm.MenuItems.Clear();
            if (World.Player != null && PacketHandlers.Party.Count > 0)
            {
                MapMenuItem mi  = new MapMenuItem("You", new EventHandler(FocusChange));
                mi.Tag = World.Player.Serial;
                cm.MenuItems.Add(mi);
                foreach (Serial s in PacketHandlers.Party)
                {
                    Mobile m = World.FindMobile(s);
                    if (m.Name != null)
                    {
                        mi = new MapMenuItem(m.Name, new EventHandler(FocusChange));
                        mi.Tag = s;
                        if ( this.Map.FocusMobile == m )
                            mi.Checked = true;
                        cm.MenuItems.Add(mi);

                    }
                }
            }
            this.ContextMenu = cm;
        }
 static void HideOrb(MapMenuItem menuItem, object arg2)
 {
     SetHidden(true);
 }
 static void LockRotation(MapMenuItem menuItem, object arg2)
 {
     SetRotationLock(true);
 }