private void button1_Click(object sender, EventArgs e) { MySqlDatabaseConnection.Initialize("127.0.0.1", "3306", "MuOnline", "root", ""); Account player = DatabaseOperations.GetObject <Account>(1); DatabaseOperations.SaveObject(player); }
public GameCore() { Logger.Info("[GameCore] Starting..."); SimpleModulus.InitCryptSite(true); Logger.Info("[GameCore] Crypt Keys Change To Server Side"); Xor32Modulus.InitKeys(true); Logger.Info("[GameCore] Crypt Keys Change To Old Keys"); OpCodes.Init(); Logger.Info("[GameCore] OpCodes Initialized"); if (!MySqlDatabaseConnection.Initialize(Define.databaseHost, Define.databasePort, Define.databaseName, Define.databaseLogin, Define.databasePassword)) { MessageBox.Show("No Connection MySql. Exit Process"); Application.Exit(); } socketServer = SocketServer.Instance; socketServer.Initialize(Define.port, Define.ipAddress); clientManager = UserManager.Instance; packetHandler = PacketHandler.Instance; mapService.Init(); Logger.Info("[GameCore] Server Succesfully Initialized, Waiting For Listen"); }