More group work. Added packet operations to the world server so it can send global group info.

This commit is contained in:
Filip Maj 2016-12-15 12:19:44 -05:00
parent 6c409e93a9
commit 1148619ca5
30 changed files with 1173 additions and 43 deletions

View file

@ -50,6 +50,35 @@ namespace FFXIVClassic_World_Server
return readIn;
}
public static void GetAllCharaNames(Dictionary<uint, string> mIdToNameMap)
{
using (MySqlConnection conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
{
try
{
conn.Open();
MySqlCommand cmd = new MySqlCommand("SELECT id, name FROM characters", conn);
using (MySqlDataReader Reader = cmd.ExecuteReader())
{
while (Reader.Read())
{
uint id = Reader.GetUInt32("id");
string name = Reader.GetString("name");
mIdToNameMap.Add(id, name);
}
}
}
catch (MySqlException e)
{
Program.Log.Error(e.ToString());
}
finally
{
conn.Dispose();
}
}
}
public static uint GetCurrentZoneForSession(uint charId)
{
uint currentZone = 0;