From c9feef07b7f4114d7b306828541235f08f65dd67 Mon Sep 17 00:00:00 2001 From: Filip Maj Date: Mon, 29 Aug 2016 12:40:47 -0400 Subject: [PATCH] Moved ZoneConnection to dataobjects namespace. Cleaned up Server.cs. --- .../FFXIVClassic Map Server.csproj | 2 +- FFXIVClassic Map Server/Server.cs | 50 +++++++++---------- .../{ => dataobjects}/ZoneConnection.cs | 2 +- 3 files changed, 27 insertions(+), 27 deletions(-) rename FFXIVClassic Map Server/{ => dataobjects}/ZoneConnection.cs (97%) diff --git a/FFXIVClassic Map Server/FFXIVClassic Map Server.csproj b/FFXIVClassic Map Server/FFXIVClassic Map Server.csproj index e91aecf7..77879f8c 100644 --- a/FFXIVClassic Map Server/FFXIVClassic Map Server.csproj +++ b/FFXIVClassic Map Server/FFXIVClassic Map Server.csproj @@ -91,7 +91,7 @@ - + diff --git a/FFXIVClassic Map Server/Server.cs b/FFXIVClassic Map Server/Server.cs index ffd0d8d2..898bdfb3 100644 --- a/FFXIVClassic Map Server/Server.cs +++ b/FFXIVClassic Map Server/Server.cs @@ -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; - } - + /// /// 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. /// @@ -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; + } + } } \ No newline at end of file diff --git a/FFXIVClassic Map Server/ZoneConnection.cs b/FFXIVClassic Map Server/dataobjects/ZoneConnection.cs similarity index 97% rename from FFXIVClassic Map Server/ZoneConnection.cs rename to FFXIVClassic Map Server/dataobjects/ZoneConnection.cs index 167714e5..96197dd1 100644 --- a/FFXIVClassic Map Server/ZoneConnection.cs +++ b/FFXIVClassic Map Server/dataobjects/ZoneConnection.cs @@ -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 {