More work on the world server. Modified map server to communicate with it.

This commit is contained in:
Filip Maj 2016-08-29 08:17:14 -04:00
parent bd26a71fef
commit 6bffe69b21
16 changed files with 507 additions and 577 deletions

View file

@ -20,50 +20,20 @@ namespace FFXIVClassic_Map_Server.dataobjects
public uint languageCode = 1;
private ClientConnection zoneConnection;
private ClientConnection chatConnection;
private ZoneConnection zoneConnection;
private uint lastPingPacket = Utils.UnixTimeStampUTC();
public string errorMessage = "";
public ConnectedPlayer(uint actorId)
public ConnectedPlayer(ZoneConnection zc, uint actorId)
{
zoneConnection = zc;
this.actorID = actorId;
playerActor = new Player(this, actorId);
actorInstanceList.Add(playerActor);
}
public void SetConnection(int type, ClientConnection conn)
{
conn.connType = type;
switch (type)
{
case BasePacket.TYPE_ZONE:
zoneConnection = conn;
break;
case BasePacket.TYPE_CHAT:
chatConnection = conn;
break;
}
}
public bool IsClientConnectionsReady()
{
return (zoneConnection != null && chatConnection != null);
}
public void Disconnect()
{
zoneConnection.Disconnect();
chatConnection.Disconnect();
}
public bool IsDisconnected()
{
return (!zoneConnection.IsConnected() && !chatConnection.IsConnected());
}
public void QueuePacket(BasePacket basePacket)
{
zoneConnection.QueuePacket(basePacket);