What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal

Itemrole seems to be broken.

ComfyEcho

New Member
Joined
Mar 25, 2016
Messages
10
Reaction score
0
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.
 
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.

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.
 
Back
Top