Пример #1
0
 public MagFilterCommandParser(MagFilterCommandExecutor cmdExecutor)
 {
     executor = cmdExecutor;
     cmdHandlers.Add("alcmq", null, "After Login Complete Message Queue (add, clear, list, show, wait set, wait clear). Global commands are updated by using '/mfglobal'");
     cmdHandlers.Add("dlc", null, "Default Login Character (set, clear)");
     cmdHandlers.Add("lcmq", null, "Login Complete Message Queue (add, clear)");
     cmdHandlers.Add("lnq", null, "Login Next Queue (set, clear)");
     cmdHandlers.Add(CMD_Version, VersionCommandHandler, "Display assembly version info");
     cmdHandlers.Add(CMD_Help, HelpCommandHandler, "List all mf commands");
     cmdHandlers.Add(CMD_Help2, HelpCommandHandler, null);
     cmdHandlers.Add(CMD_Help3, HelpCommandHandler, null);
     cmdHandlers.Add(CMD_Broadcast, BroadcastCommandHandler, "Broadcast command to other games ('/mf bc /t:red *bow*)");
     cmdHandlers.Add(CMD_Broadcast2, BroadcastCommandHandler, "Broadcast command to other games ('/mf bc /t:red *bow*)");
     cmdHandlers.Add(CMD_CreateTeam, CreateTeamCommandHandler, "Create team of specified characters ('/mf ct Tom Bob')");
     cmdHandlers.Add(CMD_CreateTeam2, CreateTeamCommandHandler, null);
     cmdHandlers.Add(CMD_ShowTeams, ListTeamsCommandHandler, "Show all my teams ('/mf st')");
     cmdHandlers.Add(CMD_ShowTeams2, ListTeamsCommandHandler, null);
     cmdHandlers.Add(CMD_JoinTeam, JoinTeamCommandHandler, "Join a team ('/mf jt red')");
     cmdHandlers.Add(CMD_JoinTeam2, JoinTeamCommandHandler, null);
     cmdHandlers.Add(CMD_LeaveTeam, LeaveTeamCommandHandler, "Leave a team ('/mf lt red')");
     cmdHandlers.Add(CMD_LeaveTeam2, LeaveTeamCommandHandler, null);
     cmdHandlers.Add(CMD_Test, TestCommandHandler, "Test submitting a command directly to game ('/mf test somecommandstring')");
     cmdHandlers.Add(CMD_SetWindowTitle, SetWindowTitleCommandHandler, "Set window title ('/mf swt MyGame')");
     cmdHandlers.Add(CMD_Inventory, InventoryCommandHandler, "List inventory to log ('/mf inv')");
     cmdHandlers.Add(CMD_Inventory2, InventoryCommandHandler, null);
 }
Пример #2
0
        }                                            // for game emulator

        protected override void Startup()
        {
            Debug.Init(FileLocations.PluginPersonalFolder.FullName + @"\Exceptions.txt", PluginName);
            SettingsFile.Init(FileLocations.GetFilterSettingsFilepath(), PluginName);
            LogStartup();

            defaultFirstCharacterManager = new DefaultFirstCharacterManager(loginCharacterTools);
            chooseCharacterManager       = new LauncherChooseCharacterManager(loginCharacterTools);
            magFilterCommandExecutor     = new MagFilterCommandExecutor();
            magFilterCommandParser       = new MagFilterCommandParser(magFilterCommandExecutor);
            Heartbeat.SetCommandParser(magFilterCommandParser);
            loginNextCharacterManager        = new LoginNextCharacterManager(loginCharacterTools);
            thwargInventory                  = new ThwargInventory();
            magFilterCommandParser.Inventory = thwargInventory;

            ClientDispatch += new EventHandler <NetworkMessageEventArgs>(FilterCore_ClientDispatch);
            ServerDispatch += new EventHandler <NetworkMessageEventArgs>(FilterCore_ServerDispatch);
            WindowMessage  += new EventHandler <WindowMessageEventArgs>(FilterCore_WindowMessage);

            CommandLineText += new EventHandler <ChatParserInterceptEventArgs>(FilterCore_CommandLineText);
        }