I've seen one ways in phoenix only error with them is when you put them next to a wall you can go out of the arrayI think I seen them in a R63 before.
I really can't be to sure.
But if you could add that, I'd like it.
Also, is this gonna be an open source EMU or no?
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MySql.Data.MySqlClient;
namespace RevEmu.MySql.MySqlCommands
{
public static class Insert
{
/// <summary>
/// Insert Type Of Query.
/// </summary>
/// <param name="query">Query that will be used for the command.</param>
public static void Invoke(String query)
{
//open connection
if (OpenSqlSession.IsSessionOpen())
{
// Define connection
var connection = new MySqlConnection();
//invoke command
MySqlCommand cmd = new MySqlCommand(query, connection);
//Execute command
cmd.ExecuteNonQuery();
//close connection
CloseSqlSession.CloseSession();
}
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MySql.Data.MySqlClient;
namespace RevEmu.MySql.MySqlCommands
{
public static class Update
{
public static void Invoke(string query)
{
if (OpenSqlSession.IsSessionOpen())
{
var connection = new MySqlConnection();
// Create Command
MySqlCommand cmd = new MySqlCommand();
//Assign the query using CommandText
cmd.CommandText = query;
//Assign the connection using Connection
cmd.Connection = connection;
//Execute query
cmd.ExecuteNonQuery();
//close connection
CloseSqlSession.CloseSession();
}
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MySql.Data.MySqlClient;
namespace RevEmu.MySql
{
public static class OpenSqlSession
{
public static bool IsSessionOpen()
{
try
{
var connection = new MySqlConnection();
connection.Open();
return true;
}
catch (MySqlException ex)
{
//Log common Mysql errors down.
switch (ex.Number)
{
// Can't connect.
case 0:
Console.ForegroundColor = ConsoleColor.Red;
Console.WriteLine("Cannot connect to provided Mysql details.");
break;
// Invalid Username or Password
case 1045:
Console.ForegroundColor = ConsoleColor.Red;
Console.WriteLine("Invalid Mysql User or Password, please check your config and try again");
break;
// Unknown Error.
default:
Console.ForegroundColor = ConsoleColor.Red;
Console.WriteLine("Unknown RevSQL Error.");
Console.WriteLine("Error: " + ex);
break;
}
return false;
}
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MySql.Data.MySqlClient;
namespace RevEmu.MySql
{
public static class CloseSqlSession
{
public static bool CloseSession()
{
try
{
var connection = new MySqlConnection();
connection.Close();
return true;
}
catch (MySqlException ex)
{
Console.WriteLine("Closing MySqlSession Failed Error: " + ex.Message);
return false;
}
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MySql.Data.MySqlClient;
namespace RevEmu.MySql
{
public class DatabaseConnection
{
//Constructor
public DatabaseConnection()
{
Initialize();
}
//Load up Mysql settings using RevEmu.RevConfig
private void Initialize()
{
var connectionBuilder = new MySqlConnectionStringBuilder();
}
}
}
The sockets will be properly the best ever released in a Habbo server.
Not strong as Netty or Mina but way better in using it supports more OS's it even supports the new Windows Azure and also Mono which is unix/linux.
Good luck Zak
Can we see any game play?
Also great to see you using Hibernate
Matty tested Netty and it holds 512, 000 connections simultaneously
It may hold a ton of fuckers.
But the main thing that counts is it's usage in different type of OS's a lot of people are getting into linux these days. But hopefully should see some in-game at the end of week. Also i am not using Hibernate no more too complicated with the mapping. I have made my own simple SQL which is just as good in high usage. These sockets are properly the best to use in C# but of course netty and mina is better at handling connections