1
Fork 0
mirror of https://bitbucket.org/Ioncannon/project-meteor-server.git synced 2025-04-22 12:47:46 +00:00

Map server will only load maps it's set to load.

This commit is contained in:
Filip Maj 2016-08-29 13:39:50 -04:00
parent 62daa4db89
commit d931f71b06

View file

@ -60,11 +60,14 @@ namespace FFXIVClassic_Map_Server
canRideChocobo, canRideChocobo,
canStealth, canStealth,
isInstanceRaid isInstanceRaid
FROM server_zones FROM server_zones
WHERE zoneName IS NOT NULL"; WHERE zoneName IS NOT NULL and serverIp = @ip and serverPort = @port";
MySqlCommand cmd = new MySqlCommand(query, conn); MySqlCommand cmd = new MySqlCommand(query, conn);
cmd.Parameters.AddWithValue("@ip", ConfigConstants.OPTIONS_BINDIP);
cmd.Parameters.AddWithValue("@port", ConfigConstants.OPTIONS_PORT);
using (MySqlDataReader reader = cmd.ExecuteReader()) using (MySqlDataReader reader = cmd.ExecuteReader())
{ {
while (reader.Read()) while (reader.Read())
@ -268,14 +271,21 @@ namespace FFXIVClassic_Map_Server
using (MySqlDataReader reader = cmd.ExecuteReader()) using (MySqlDataReader reader = cmd.ExecuteReader())
{ {
while (reader.Read()) while (reader.Read())
{ {
uint zoneId = reader.GetUInt32("zoneId");
uint classId = reader.GetUInt32("actorClassId");
if (!actorClasses.ContainsKey(classId))
continue;
if (!zoneList.ContainsKey(zoneId))
continue;
Zone zone = zoneList[zoneId];
if (zone == null)
continue;
string customName = null; string customName = null;
if (!reader.IsDBNull(11)) if (!reader.IsDBNull(11))
customName = reader.GetString("customDisplayName"); customName = reader.GetString("customDisplayName");
string uniqueId = reader.GetString("uniqueId");
uint classId = reader.GetUInt32("actorClassId");
string uniqueId = reader.GetString("uniqueId");
uint zoneId = reader.GetUInt32("zoneId");
string privAreaName = reader.GetString("privateAreaName"); string privAreaName = reader.GetString("privateAreaName");
uint privAreaLevel = reader.GetUInt32("privateAreaLevel"); uint privAreaLevel = reader.GetUInt32("privateAreaLevel");
float x = reader.GetFloat("positionX"); float x = reader.GetFloat("positionX");
@ -284,16 +294,7 @@ namespace FFXIVClassic_Map_Server
float rot = reader.GetFloat("rotation"); float rot = reader.GetFloat("rotation");
ushort state = reader.GetUInt16("actorState"); ushort state = reader.GetUInt16("actorState");
uint animId = reader.GetUInt32("animationId"); uint animId = reader.GetUInt32("animationId");
if (!actorClasses.ContainsKey(classId))
continue;
if (!zoneList.ContainsKey(zoneId))
continue;
Zone zone = zoneList[zoneId];
if (zone == null)
continue;
SpawnLocation spawn = new SpawnLocation(classId, uniqueId, zoneId, privAreaName, privAreaLevel, x, y, z, rot, state, animId); SpawnLocation spawn = new SpawnLocation(classId, uniqueId, zoneId, privAreaName, privAreaLevel, x, y, z, rot, state, animId);
zone.AddSpawnLocation(spawn); zone.AddSpawnLocation(spawn);