public ThwargFilterCommandParser(ThwargFilterCommandExecutor cmdExecutor)
 {
     executor = cmdExecutor;
     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 ('/tf bc /t:red *bow*)");
     cmdHandlers.Add(CMD_Broadcast2, BroadcastCommandHandler, "Broadcast command to other games ('/tf bc /t:red *bow*)");
     cmdHandlers.Add(CMD_CreateTeam, CreateTeamCommandHandler, "Create team of specified characters ('/tf ct Tom Bob')");
     cmdHandlers.Add(CMD_CreateTeam2, CreateTeamCommandHandler, null);
     cmdHandlers.Add(CMD_ShowTeams, ListTeamsCommandHandler, "Show all my teams ('/tf st')");
     cmdHandlers.Add(CMD_ShowTeams2, ListTeamsCommandHandler, null);
     cmdHandlers.Add(CMD_JoinTeam, JoinTeamCommandHandler, "Join a team ('/tf jt red')");
     cmdHandlers.Add(CMD_JoinTeam2, JoinTeamCommandHandler, null);
     cmdHandlers.Add(CMD_LeaveTeam, LeaveTeamCommandHandler, "Leave a team ('/tf lt red')");
     cmdHandlers.Add(CMD_LeaveTeam2, LeaveTeamCommandHandler, null);
     cmdHandlers.Add(CMD_Test, TestCommandHandler, "Test submitting a command directly to game ('/tf test somecommandstring')");
     cmdHandlers.Add(CMD_SetWindowTitle, SetWindowTitleCommandHandler, "Set window title ('/tf swt MyGame')");
     cmdHandlers.Add(CMD_Inventory, InventoryCommandHandler, "List inventory to log ('/tf inv')");
     cmdHandlers.Add(CMD_Inventory2, InventoryCommandHandler, null);
     cmdHandlers.Add(CMD_KillClient, KillClientCommandHandler, "Kill current client ('/tf kc')");
     cmdHandlers.Add(CMD_KillClient2, KillClientCommandHandler, null);
     cmdHandlers.Add(CMD_KillAllClients, KillAllClientsCommandHandler, "Kill current client ('/tf kac')");
     cmdHandlers.Add(CMD_KillAllClients2, KillAllClientsCommandHandler, null);
     cmdHandlers.Add(CMD_AddLoginCmd, AddLoginCmdCommandHandler, "Add login cmd to current character ('/tf alc')");
     cmdHandlers.Add(CMD_AddLoginCmd2, AddLoginCmdCommandHandler, null);
     cmdHandlers.Add(CMD_AddLoginCmdGlobal, AddLoginCmdGlobalCommandHandler, "Add login cmd for all characters ('/tf alcg')");
     cmdHandlers.Add(CMD_AddLoginCmdGlobal2, AddLoginCmdGlobalCommandHandler, null);
 }
Example #2
0
        }                                            // for game emulator

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

            defaultFirstCharacterManager = new DefaultFirstCharacterManager(loginCharacterTools);
            chooseCharacterManager       = new LauncherChooseCharacterManager(loginCharacterTools);
            ThwargFilterCommandExecutor  = new ThwargFilterCommandExecutor();
            ThwargFilterCommandParser    = new ThwargFilterCommandParser(ThwargFilterCommandExecutor);
            Heartbeat.SetCommandParser(ThwargFilterCommandParser);
            loginNextCharacterManager           = new LoginNextCharacterManager(loginCharacterTools);
            thwargInventory                     = new ThwargInventory();
            ThwargFilterCommandParser.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);
        }