mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-06-08 05:24:34 +02:00
Finished writing the query and editing the inventory methods to use the gamedata.
This commit is contained in:
parent
4bebeb387a
commit
83fb9badd7
5 changed files with 63 additions and 38 deletions
|
@ -35,7 +35,8 @@ namespace FFXIVClassic_Lobby_Server
|
|||
private List<ClientConnection> mConnectionList = new List<ClientConnection>();
|
||||
private LuaEngine mLuaEngine = new LuaEngine();
|
||||
|
||||
private WorldManager mWorldManager;
|
||||
private WorldManager mWorldManager;
|
||||
private static Dictionary<uint, Item> gamedataItems;
|
||||
private static StaticActors mStaticActors;
|
||||
|
||||
private PacketProcessor mProcessor;
|
||||
|
@ -50,10 +51,12 @@ namespace FFXIVClassic_Lobby_Server
|
|||
return mSelf;
|
||||
}
|
||||
|
||||
#region Socket Handling
|
||||
public bool startServer()
|
||||
{
|
||||
mStaticActors = new StaticActors(STATIC_ACTORS_PATH);
|
||||
|
||||
gamedataItems = Database.getItemGamedata();
|
||||
Log.info(String.Format("Loaded {0} items.",gamedataItems.Count));
|
||||
|
||||
mWorldManager = new WorldManager(this);
|
||||
mWorldManager.LoadZoneList();
|
||||
|
@ -99,6 +102,7 @@ namespace FFXIVClassic_Lobby_Server
|
|||
return true;
|
||||
}
|
||||
|
||||
#region Socket Handling
|
||||
private void acceptCallback(IAsyncResult result)
|
||||
{
|
||||
ClientConnection conn = null;
|
||||
|
@ -157,6 +161,14 @@ namespace FFXIVClassic_Lobby_Server
|
|||
return mStaticActors.findStaticActor(name);
|
||||
}
|
||||
|
||||
public static Item getItemGamedata(uint id)
|
||||
{
|
||||
if (gamedataItems.ContainsKey(id))
|
||||
return gamedataItems[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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue