TBag-Shefki

20 - A way to identify items that are in a gear set?

 I have 2-3 equipment sets, using the built in Gear Manager, and it's very troublesome to sort through my equipment and stuff that I have picked up in dungeons and elsewhere. For example, lets say I won the greed roll on an epic item in some dungeon, it would probably be sorted to where my other sets epic shoulder is, I would hate to accidentally vendor or disenchant the wrong item :(.

Could you please add something to cope with the built-in Gear Manager? Thanks!

User When Change
JStrese Wed, 17 Jun 2009 23:05:35 Create

You must login to post a comment. Don't have an account? Register to get one!

  • 1 comment
  • Avatar of -Adron- -Adron- Wed, 02 Sep 2009 23:42:35

    I want this too, so I went ahead and wrote some code for it. Feel free to include it if you see fit. What it does is it adds a keyword "EQUIPMENTSET" that you can use to categorize items. It needs localization. Below is a diff against the "20090810-r345-Shefki" version. Could probably use some tweaking for bank slots if you want those sorted.

    --- TBag/TBag.lua
    +++ TBag-equipmentset/TBag.lua
    @@ -79,6 +79,7 @@
     TBag.I_NEED      = "sn";
     TBag.I_SOULBOUND = "sb";
     TBag.I_ACCTBOUND = "ab";
    +TBag.I_EQUIPMENTSET = "es";
     TBag.I_CHARGES         = "ch";
     
     -- Tokens
    @@ -2490,6 +2491,31 @@
     --    end
       end
     
    +  local i;
    +  for i = 1, GetNumEquipmentSets() do
    +    local name = GetEquipmentSetInfo(i);
    +    local infoArray = GetEquipmentSetLocations(name);
    +    for _,value in pairs(infoArray) do
    +      local bag, slot;
    +      local locationtype = bit.rshift(value, 16);
    +      if locationtype == 0x30 then
    +        bag = bit.band(bit.rshift(value, 8), 0xff);
    +        slot = bit.band(value, 0xff);
    +      elseif locationtype == 0x40 then
    +        bag = BANK_CONTAINER;
    +        slot = bit.band(value, 0xff);
    +      elseif locationtype == 0x60 then
    +        bag = bit.band(bit.rshift(value, 8), 0xff) + NUM_BAG_SLOTS;
    +        slot = bit.band(value, 0xff);
    +      end
    +      if slot ~= nil and itmcache[bag] ~= nil and itmcache[bag][slot] ~= nil then
    +        itmcache[bag][slot][self.I_EQUIPMENTSET] = 1;
    +      end
    +    end
    +  end
    +
    +
    +
     --  UpdateAddOnMemoryUsage();
     --  self:PrintDEBUG('UpdateItmCache End Memory = '..tostring(GetAddOnMemoryUsage("TBag")));
       if (resort_mandatory == 1) then
    @@ -2670,6 +2696,10 @@
         end
       end
     
    +  if (itm[self.I_EQUIPMENTSET] == 1) then
    +    itm[self.I_KEYWORD]["EQUIPMENTSET"] = 1;
    +  end
    +
       if (itm[self.I_SOULBOUND] == 1) then
         itm[self.I_KEYWORD][L["SOULBOUND"]] = 1;
       elseif (itm[self.I_ACCTBOUND]) then
    
    Last edited on 03 Sep 2009 by -Adron-
  • 1 comment

Facts

Last updated on
02 Sep 2009
Reported on
17 Jun 2009
Status
New - Issue has not had initial review yet.
Type
Enhancement - A change which is intended to better the project in some way
Priority
Medium - Normal priority.

Reported by

Possible assignees

Votes (Total: +3, Average: +3.0)