/// <summary> /// //Tells a clients all the contents of their chosen characters inventory to be loaded in before they enter into the game world /// </summary> /// <param name="ClientID">NetworkID of target client</param> /// <param name="CharacterName">Name of character who's inventory contents are being sent</param> public static void SendInventoryContents(int ClientID, string CharacterName) { CommunicationLog.LogOut(ClientID + " inventory contents"); //Create a new NetworkPacket object to store the data for this inventory contents request NetworkPacket Packet = new NetworkPacket(); //Grab the list of all the items currently in the characters inventory List <ItemData> InventoryContents = InventoriesDatabase.GetAllInventorySlots(CharacterName); //Write the relevant data values into the packet data Packet.WriteType(ServerPacketType.InventoryContents); Packet.WriteInt(0); PacketQueue.QueuePacket(ClientID, Packet); //Packet.WriteInt(InventoryContents.Count); ////Loop through the list of items in the players inventory and write all of their information into the packet data //foreach(ItemData Item in InventoryContents) //{ // Packet.WriteInt(Item.ItemNumber); // Packet.WriteInt(Item.ItemID); //} ////Add this packet to the target clients outgoing packet queue //PacketQueue.QueuePacket(ClientID, Packet); }
//Tries using the command arguments for performing a database purge private void TryPurgeDatabase(string[] Input) { //Log what is happening here MessageLog.Print("Purging all entries from all databases."); //Purge all the databases AccountsDatabase.PurgeAccounts(); ActionBarsDatabase.PurgeActionBars(); CharactersDatabase.PurgeCharacters(); EquipmentsDatabase.PurgeEquipments(); InventoriesDatabase.PurgeInventories(); }