mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-04-20 19:57:46 +00:00
Make CommandProcessor more robust
This commit is contained in:
parent
cc5d0b139a
commit
33be97ea9d
1 changed files with 4 additions and 5 deletions
|
@ -299,6 +299,7 @@ namespace FFXIVClassic_Lobby_Server
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: make removeCurrency() remove all quantity of a currency if quantity_to_remove > quantity_in_inventory instead of silently failing
|
||||||
private void removeCurrency(ConnectedPlayer client, uint itemId, int quantity)
|
private void removeCurrency(ConnectedPlayer client, uint itemId, int quantity)
|
||||||
{
|
{
|
||||||
if (client != null)
|
if (client != null)
|
||||||
|
@ -370,7 +371,7 @@ namespace FFXIVClassic_Lobby_Server
|
||||||
|
|
||||||
String[] split = input.Split(' ');
|
String[] split = input.Split(' ');
|
||||||
split = split.Select(temp => temp.ToLower()).ToArray(); // Ignore case on commands
|
split = split.Select(temp => temp.ToLower()).ToArray(); // Ignore case on commands
|
||||||
|
split = split.Where(temp => temp != "").ToArray(); // strips extra whitespace from commands
|
||||||
|
|
||||||
// Debug
|
// Debug
|
||||||
//sendMessage(client, string.Join(",", split));
|
//sendMessage(client, string.Join(",", split));
|
||||||
|
@ -459,13 +460,11 @@ namespace FFXIVClassic_Lobby_Server
|
||||||
else if (split[0].Equals("reloaditems"))
|
else if (split[0].Equals("reloaditems"))
|
||||||
{
|
{
|
||||||
Log.info(String.Format("Got request to reload item gamedata"));
|
Log.info(String.Format("Got request to reload item gamedata"));
|
||||||
if (client != null)
|
sendMessage(client, "Reloading Item Gamedata...");
|
||||||
client.getActor().queuePacket(SendMessagePacket.buildPacket(client.actorID, client.actorID, SendMessagePacket.MESSAGE_TYPE_GENERAL_INFO, "", "Reloading Item Gamedata..."));
|
|
||||||
gamedataItems.Clear();
|
gamedataItems.Clear();
|
||||||
gamedataItems = Database.getItemGamedata();
|
gamedataItems = Database.getItemGamedata();
|
||||||
Log.info(String.Format("Loaded {0} items.", gamedataItems.Count));
|
Log.info(String.Format("Loaded {0} items.", gamedataItems.Count));
|
||||||
if (client != null)
|
sendMessage(client, String.Format("Loaded {0} items.", gamedataItems.Count));
|
||||||
client.getActor().queuePacket(SendMessagePacket.buildPacket(client.actorID, client.actorID, SendMessagePacket.MESSAGE_TYPE_GENERAL_INFO, "", String.Format("Loaded {0} items.", gamedataItems.Count)));
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
Loading…
Add table
Reference in a new issue