• Visit Rebornbuddy
  • Itemrole seems to be broken.

    Discussion in 'Community Developer Forum' started by ComfyEcho, Jan 23, 2017.

    1. ComfyEcho

      ComfyEcho New Member

      Joined:
      Mar 25, 2016
      Messages:
      10
      Likes Received:
      0
      Trophy Points:
      1
      Running
      Code:
      ClearLog();
      foreach (BagSlot slot in ff14bot.Managers.InventoryManager.FilledSlots.Where(x => x.BagId == InventoryBagId.Bag1 || x.BagId == InventoryBagId.Bag2 || x.BagId == InventoryBagId.Bag3 || x.BagId == InventoryBagId.Bag4))
      {
              Log("Name: {0} EquipmentCatagory: {1} ItemRole: {2}",slot.Name.PadRight(32,' '),slot.Item.EquipmentCatagory.ToString().PadRight(16,' '),slot.Item.ItemRole);
      }
      will return all items as item role 0, although the category seems to be fine.
       
    2. Neverdyne

      Neverdyne Community Developer

      Joined:
      Sep 12, 2014
      Messages:
      644
      Likes Received:
      18
      Trophy Points:
      18
      Yeah, I've noticed this as well.
       
    3. mastahg

      mastahg Administrator Staff Member

      Joined:
      Feb 27, 2011
      Messages:
      5,205
      Likes Received:
      360
      Trophy Points:
      83
      I wish people would stop parroting that linq query, its really bad.

      FilledSlots only contains bags 1-4 + keyitems.
      If you really only want bags 1-4

      Code:
      
      ClearLog();
      foreach (BagSlot slot in ff14bot.Managers.InventoryManager.GetBagsByInventoryBagId(InventoryBagId.Bag1,InventoryBagId.Bag2,InventoryBagId.Bag3,InventoryBagId.Bag4).SelectMany(r=>r.FilledSlots))
      {
              Log("Name: {0} EquipmentCatagory: {1} ItemRole: {2}",slot.Name.PadRight(32,' '),slot.Item.EquipmentCatagory.ToString().PadRight(16,' '),slot.Item.ItemRole);
      }
      
      I'll look into the issue.
       

    Share This Page