/// <summary> /// //Tells a client all the items currently equipped on their chosen character 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 equipped items are being sent</param> public static void SendEquippedItems(int ClientID, string CharacterName) { CommunicationLog.LogOut(ClientID + " equipped items"); //Create a new NetworkPacket object to store the data for this equipped items request NetworkPacket Packet = new NetworkPacket(); //Grab the list of all the items currently equipped on the character List <ItemData> EquippedItems = EquipmentsDatabase.GetAllEquipmentSlots(CharacterName); //Write the relevant data values into the packet data Packet.WriteType(ServerPacketType.EquippedItems); Packet.WriteInt(0); PacketQueue.QueuePacket(ClientID, Packet); //Packet.WriteInt(EquippedItems.Count); ////Loop through the list and write in each items information into the packet data //foreach(ItemData Item in EquippedItems) //{ // Packet.WriteInt((int)Item.ItemEquipmentSlot); // 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(); }