• Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Equipment Category Mismatch?

    Discussion in 'Community Developer Forum' started by Neverdyne, Mar 12, 2015.

    1. Neverdyne

      Neverdyne Community Developer

      Joined:
      Sep 12, 2014
      Messages:
      649
      Likes Received:
      18
      Trophy Points:
      18
      I've been using this to get eligible items to be equipped for a certain category:

      Code:
      InventoryManager.FilledInventoryAndArmory
         .Where(s => s.Item != null)
         .Where(s => s.Item.EquipmentSlots.CanTake.Contains(EquipmentSlot.Earring));
      
      This works for every slot category except necklaces and earrings, which seem to be mismatched. By running in the console:

      Code:
      var prospects = InventoryManager.FilledInventoryAndArmory
         .Where(s => s.Item.EquipmentSlots.CanTake.Contains(EquipmentSlot.Necklace));
      
      Log("-----");
      foreach (var p in prospects) 
      { 
         Log(p.Name + " Slot: " + p.Slot);
         foreach (var c in p.Item.EquipmentSlots.CanTake) 
         {
            Log(c); 
         }
      }
      
      It displays all my earrings. While doing it for EquipmentSlot.Earring displays all my necklaces. They seem to be crossed. For example, the above code shows:

      Code:
      Storm Sergeant's Earrings Slot: 0
      Necklace
      Ruby Earring Slot: 1
      Necklace
      Mosshorn Earrings Slot: 2
      Necklace
      
       
      Last edited: Mar 12, 2015
    2. mastahg

      mastahg Administrator Staff Member

      Joined:
      Feb 27, 2011
      Messages:
      5,343
      Likes Received:
      383
      Trophy Points:
      83
      Thanks, fixed for next version.
       

    Share This Page