mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-07-24 19:38:26 +02: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:
parent
c4dea467e3
commit
df2ac1fb32
23 changed files with 1227 additions and 160 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue