"fixed" by removing this brainfuck dirty-coded server "wanna make something good? make it self lol."
About Phoenix & club559 server source code - poor coded. Nothing else...
Constructive critics:
1. "using NLog;" may be useful. " P.L.Fatal("[MySQL] Error connection. Server couldn't be started");" Better for trace errors than over90000 lines generated by system API....
2. C# methods for MySQL
high outdated.
Code:
_con = Testing
? new MySqlConnection(
"Server=127.0.0.1;Database=rotmg;uid=root;password=123456;Pooling=true;Connection Timeout=30;MinimumPoolSize=10;maximumpoolsize=1200;")
: new MySqlConnection(
"Server=127.0.0.1;Database=rotmg;uid=root;password=123456;Pooling=true;Connection Timeout=30;MinimumPoolSize=10;maximumpoolsize=1200;");
_con.Open();
The right way should be:
Code:
private static string ConnectionString = System.Configuration.ConfigurationSettings.AppSettings["conn"];
private static string UseDb = "USE " + System.Configuration.ConfigurationSettings.AppSettings["db"] + ";";
public static bool SetConnection()
{
try
{
connection = new MySqlConnection(ConnectionString);
connection.Open();
blablabla, other params
}
catch (MySqlException ex)
{
P.L.Info("MySQL Error: {0}", ex);
return false;
}
return true;
}
/* Also, as you know, AppConfig.xml: */
<?xml version="1.0"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
</startup>
<appSettings>
<add key="conn" value="server=localhost;userid=root;
password=123456;database=rotmg;charset=utf8;"/>
<add key="db" value="rotmg"/>
</appSettings>
</configuration>
3. 209 Warnings in project... nuff said
4. wServer/Vector2.cs - facepalm... better way is
pastebin.com/vKpuq8ej
5. character death code bugged (in phoenix)...
All of that "server emulators" has a low-quality by coding standarts. For me better usage of this - saw networking and make PServer self...
