Moved ZoneConnection to dataobjects namespace. Cleaned up Server.cs.

This commit is contained in:
Filip Maj 2016-08-29 12:40:47 -04:00
parent cf38454c8f
commit c9feef07b7
3 changed files with 27 additions and 27 deletions

View File

@ -91,7 +91,7 @@
<Compile Include="actors\quest\Quest.cs" />
<Compile Include="actors\StaticActors.cs" />
<Compile Include="actors\world\WorldMaster.cs" />
<Compile Include="ZoneConnection.cs" />
<Compile Include="dataobjects\ZoneConnection.cs" />
<Compile Include="CommandProcessor.cs" />
<Compile Include="ConfigConstants.cs" />
<Compile Include="Database.cs" />

View File

@ -38,12 +38,7 @@ namespace FFXIVClassic_Map_Server
{
mSelf = this;
}
public static Server GetServer()
{
return mSelf;
}
public bool StartServer()
{
mStaticActors = new StaticActors(STATIC_ACTORS_PATH);
@ -178,25 +173,7 @@ namespace FFXIVClassic_Map_Server
mServerSocket.BeginAccept(new AsyncCallback(AcceptCallback), mServerSocket);
}
}
public static Actor GetStaticActors(uint id)
{
return mStaticActors.GetActor(id);
}
public static Actor GetStaticActors(string name)
{
return mStaticActors.FindStaticActor(name);
}
public static Item GetItemGamedata(uint id)
{
if (mGamedataItems.ContainsKey(id))
return mGamedataItems[id];
else
return null;
}
/// <summary>
/// Receive Callback. Reads in incoming data, converting them to base packets. Base packets are sent to be parsed. If not enough data at the end to build a basepacket, move to the beginning and prepend.
/// </summary>
@ -268,6 +245,11 @@ namespace FFXIVClassic_Map_Server
#endregion
public static Server GetServer()
{
return mSelf;
}
public static ZoneConnection GetWorldConnection()
{
return mWorldConnection;
@ -283,5 +265,23 @@ namespace FFXIVClassic_Map_Server
return mGamedataItems;
}
public static Actor GetStaticActors(uint id)
{
return mStaticActors.GetActor(id);
}
public static Actor GetStaticActors(string name)
{
return mStaticActors.FindStaticActor(name);
}
public static Item GetItemGamedata(uint id)
{
if (mGamedataItems.ContainsKey(id))
return mGamedataItems[id];
else
return null;
}
}
}

View File

@ -6,7 +6,7 @@ using System.Collections.Concurrent;
using System.Net;
using System.Collections.Generic;
namespace FFXIVClassic_Map_Server
namespace FFXIVClassic_Map_Server.dataobjects
{
class ZoneConnection
{