예제 #1
0
 public void Destroy()
 {
     if (DisplayedInventory != null)
     {
         DisplayedInventory.Clear();
     }
 }
예제 #2
0
 private void removeAllHiddenItemsFromDisplayedInventory()
 {
     for (int i = 0; i < HiddenItems.Count; i++)
     {
         DisplayedInventory.Remove(HiddenItems[i]);
     }
 }
예제 #3
0
 public void SetDisplayedInventoryToHidden()
 {
     DisplayedInventory = HiddenItems;
     if (DisplayedInventory.Count > 0)
     {
         DisplayedInventory.Sort(compareInventoryIdByCreationDate);
     }
     InventoryContext.EventBus.DispatchEvent(new InventoryModelEvents.DisplayedInventoryUpdated(DisplayedInventory.Count));
 }
예제 #4
0
 public void SetDisplayedInventoryToEquipped()
 {
     if (InventoryData.CurrentAvatarEquipment.Count > 0)
     {
         DisplayedInventory = InventoryData.CurrentAvatarEquipment;
         DisplayedInventory.Sort(compareInventoryIdByCreationDate);
     }
     InventoryContext.EventBus.DispatchEvent(new InventoryModelEvents.DisplayedInventoryUpdated(DisplayedInventory.Count));
 }
예제 #5
0
 public void DeleteEquipment(long id)
 {
     if (InventoryData.CurrentAvatarEquipment.Contains(id))
     {
         RequestRemoveEquipment(id);
         new SaveOutfitToWearCMD(InventoryData.CurrentAvatarEquipment.ToArray(), GetCurrentAvatarEquipment()).Execute();
     }
     if (DisplayedInventory.Contains(id))
     {
         DisplayedInventory.Remove(id);
     }
     InventoryData.Inventory.Remove(id);
     memberInventory.Remove(id);
     nonmemberInventory.Remove(id);
 }
예제 #6
0
 public void SetDisplayedInventoryToAll(bool ignoreHiddenItems)
 {
     if (InventoryData.Inventory.Count > 0)
     {
         List <long> list = new List <long>();
         list.AddRange(nonmemberInventory);
         list.AddRange(memberInventory);
         DisplayedInventory = list;
         if (ignoreHiddenItems)
         {
             removeAllHiddenItemsFromDisplayedInventory();
         }
         DisplayedInventory.Sort(compareInventoryIdByCreationDate);
     }
     InventoryContext.EventBus.DispatchEvent(new InventoryModelEvents.DisplayedInventoryUpdated(DisplayedInventory.Count));
 }