mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-05-20 08:26:59 -04:00
Added all the inventory packets, and implemented add and get inventory from the db to the server. Inventory at login is now connected to the db!
This commit is contained in:
@@ -406,6 +406,23 @@ namespace FFXIVClassic_Lobby_Server
|
||||
}
|
||||
}
|
||||
|
||||
private void giveItem(ConnectedPlayer client, uint itemId)
|
||||
{
|
||||
if (client != null)
|
||||
{
|
||||
Player p = client.getActor();
|
||||
p.addItem(itemId, 0, 1, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (KeyValuePair<uint, ConnectedPlayer> entry in mConnectedPlayerList)
|
||||
{
|
||||
Player p = entry.Value.getActor();
|
||||
p.addItem(itemId, 0, 1, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
internal void doCommand(string input, ConnectedPlayer client)
|
||||
{
|
||||
input.Trim();
|
||||
@@ -451,6 +468,17 @@ namespace FFXIVClassic_Lobby_Server
|
||||
Log.error("Could not load packet: " + e);
|
||||
}
|
||||
}
|
||||
else if (split[0].Equals("giveitem"))
|
||||
{
|
||||
try
|
||||
{
|
||||
giveItem(client, UInt32.Parse(split[1]));
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Log.error("Could not give item.");
|
||||
}
|
||||
}
|
||||
else if (split[0].Equals("music"))
|
||||
{
|
||||
try
|
||||
|
||||
Reference in New Issue
Block a user