示例#1
0
      public void OnEngage(fMap Window) {
         if (engaged)
            throw new Exception("Editor already engaged.");
         if (!(Window.Instance is IFFXIGameContainer))
            throw new Exception("Instance does not support FFXI.");
         if (!(Window.Instance is IFFXIMapImageContainer))
            throw new Exception("Instance does not support FFXI image maps.");

         engaged = true;
         window = Window;
         engine = Window.Engine;
         window.Engine.Game.Highlighted = null;
         icontainer = window.Instance as IFFXIGameContainer;
         imap = Window.Instance as IFFXIMapImageContainer;

         if (ui == null)
            ui = new FFXIMapImageEditorUI(this);
         ui.Show(window);
         ui.Left = window.Left;
         ui.Top = window.Bottom;
         ui.Width = window.Width;
         engine.MapAlternativeImage = null;

         BuildMapList();
         ui.updateMapInfo();
         icontainer.ZoneChanged += new EventHandler(icontainer_ZoneChanged);
      }
示例#2
0
        public void OnEngage(fMap Window)
        {
            if (engaged)
            {
                throw new Exception("Editor already engaged.");
            }
            if (!(Window.Instance is IFFXIGameContainer))
            {
                throw new Exception("Instance does not support FFXI.");
            }
            if (!(Window.Instance is IFFXIMapImageContainer))
            {
                throw new Exception("Instance does not support FFXI image maps.");
            }

            engaged = true;
            window  = Window;
            engine  = Window.Engine;
            window.Engine.Game.Highlighted = null;
            icontainer = window.Instance as IFFXIGameContainer;
            imap       = Window.Instance as IFFXIMapImageContainer;

            if (ui == null)
            {
                ui = new FFXIMapImageEditorUI(this);
            }
            ui.Show(window);
            ui.Left  = window.Left;
            ui.Top   = window.Bottom;
            ui.Width = window.Width;
            engine.MapAlternativeImage = null;

            BuildMapList();
            ui.updateMapInfo();
            icontainer.ZoneChanged += new EventHandler(icontainer_ZoneChanged);
        }