public void MakeRandomGame(Client.GameDifficulty difficulty) { String gamePass = Utils.RandomString(3); String gameName = Utils.RandomString(10); MakeGame(difficulty, gameName, gamePass); }
public McpHandler(ref McpConnection conn, String character, Client.GameDifficulty difficulty) : base(conn) { m_loggedIn = false; m_character = character; m_classByte = 0; m_difficulty = difficulty; }
public McpHandler(ref McpConnection conn, String character, Client.GameDifficulty difficulty) : base(conn) { m_loggedIn = false; m_character = character; m_classByte = 0; m_difficulty = difficulty; }
public void MakeGame(Client.GameDifficulty difficulty, String gameName, String gamePass) { m_gameName = gameName; m_gamePass = gamePass; byte[] temp = { 0x01, 0xff, 0x08 }; byte[] packet = m_connection.BuildPacket(0x03, BitConverter.GetBytes((UInt16)2), BitConverter.GetBytes(Utils.GetDifficulty(difficulty)), temp, System.Text.Encoding.ASCII.GetBytes(m_gameName), GenericHandler.zero, System.Text.Encoding.ASCII.GetBytes(m_gamePass), GenericHandler.zero, GenericHandler.zero); m_connection.Write(packet); }
public void MakeRandomGame(Client.GameDifficulty difficulty) { String gamePass = Utils.RandomString(3); String gameName = Utils.RandomString(10); Logger.Write("Create Game {0} with Password {1}", gameName, gamePass); MakeGame(difficulty, gameName, gamePass); }
public void MakeGame(Client.GameDifficulty difficulty, String gameName, String gamePass) { _gameName = gameName; _gamePass = gamePass; byte[] temp = { 0x01, 0xff, 0x08 }; byte[] packet = Connection.BuildPacket(0x03, BitConverter.GetBytes((ushort)(2 * _nextGameIndex)), BitConverter.GetBytes(Utils.GetDifficulty(difficulty)), temp, Encoding.ASCII.GetBytes(_gameName), Zero, Encoding.ASCII.GetBytes(_gamePass), Zero, Zero); Connection.Write(packet); }
public void MakeGameFromSettings(Client.GameDifficulty difficulty, string gameName, string gamePass) { var name = gameName.Replace("%i", _nextGameIndex.ToString()); var pass = gamePass.Replace("%i", _nextGameIndex.ToString()); Logger.Write($"Create Game {name} // {pass}"); MakeGame(difficulty, name, pass); _nextGameIndex++; }
private void InitServers(String character, String account, String password, Client.GameDifficulty difficulty, String classicKey, String expansionKey, String exeInfo) { _bncsConnection = new BncsConnection(); _bncsReader = new BncsReader(ref _bncsConnection); _bncsHandler = new BncsHandler(ref _bncsConnection, account, password, classicKey, expansionKey, exeInfo); _mcpConnection = new McpConnection(); _mcpReader = new McpReader(ref _mcpConnection); _mcpHandler = new McpHandler(ref _mcpConnection, character, difficulty); }
public static UInt32 GetDifficulty(Client.GameDifficulty difficulty) { switch (difficulty) { default: case Client.GameDifficulty.Normal: return(0x0000); case Client.GameDifficulty.Nightmare: return(0x1000); case Client.GameDifficulty.Hell: return(0x2000); } }
public static UInt32 GetDifficulty(Client.GameDifficulty difficulty) { switch (difficulty) { default: case Client.GameDifficulty.NORMAL: return(0x0000); case Client.GameDifficulty.NIGHTMARE: return(0x1000); case Client.GameDifficulty.HELL: return(0x2000); } }
public Bnet(IPAddress server, String character, String account, String password, Client.GameDifficulty difficulty, String classicKey, String expansionKey, String exeInfo) { _server = server; InitServers(character, account, password, difficulty, classicKey, expansionKey, password); InitThreads(account); AssociateEvents(); }
public void MakeRandomGame(Client.GameDifficulty difficulty) { _mcpHandler.MakeRandomGame(difficulty); }
public void MakeGameFromSettings(Client.GameDifficulty difficulty, string gameName, string gamePass) { _mcpHandler.MakeGameFromSettings(difficulty, gameName, gamePass); }
public void MakeGame(Client.GameDifficulty difficulty, String gameName, String gamePass) { m_mcpHandler.MakeGame(difficulty, gameName, gamePass); }