Menu

#895 Enhancement: Profession Bags show separate / include large Prof Bags

Resolved
nobody
None
Low
Enhancement
2015-04-20
2013-03-23
Anonymous
No

Originally created by: reinhard...@dell.com
Originally owned by: Honor...@gmail.com

What version of Titan Panel are you using and on what operating system?
TitanPanel-5.1.16.50200

What is the expected output? What do you see instead?
Currently Titan Shows only one Bagcount e.g. 56/112. The choice is to include or exclude Profession bags in the Display.
I think it may be a better idea to show the Count for professionbags separate from the universal bags. So you would see two bagcounts. e.g. 56/90 22/36 ( first Count is always the Count for universal bags.

Also are the large profession bags missing in the list. Ammo & Shard bags are obsolete now.

This is the full list for Profession bags de localisation:
L["TITAN_BAG_PROF_BAG_NAMES"] = {"Verzauberter Magiestoffbeutel", "Verzauberte Runenstofftasche", "Grosse Verzauberertasche", "Verzaubererranzen", "Zauberfeuertasche", "Werkzeugkasten aus Khorium", "Werkzeugkasten aus Teufelseisen", "Schwerer Werkzeugkasten", "Edelsteinbeutel", "Juwelenbeutel", "Verst\195\164rkte Bergbautasche", "Bergbausack", "Ranzen des Lederers", "Tasche f\195\188r alle Felle", "Kr\195\164uterbeutel", "Cenarische Kr\195\164utertasche","Cenarischer Ranzen","Mycahs Botanikerbeutel","Reisetasche des Trappers","Mammutbergbautasche","Werkzeugkasten aus Titan","Mysteri\195\182se Tasche","Smaragdtasche","Tasche der endlosen Fächer","Schreibermappe","Hyjalexpeditionstasche","Luxuri\195\182se Edelsteintasche aus Seide", "Dreifach verst\195\164rkte Bergbautasche"};

To mirror the change in the config menu I changed also the following line:
L["TITAN_BAG_MENU_IGNORE_PROF_BAGS_SLOTS"] = "Berufs-Taschen separat";
( again de localisation meaning "Show profession bags separately" )

To get the Display changed according to the Settings I have changed  function TitanPanelBagButton_GetButtonText(id) in Titanbag\Titanbag.lua

function TitanPanelBagButton_GetButtonText(id)
    local button, id = TitanUtils_GetButton(id, true);
    local total = {0};
    local used = {0};
    local available = {0};
    local bslot, slot, ucount;
    local scount = 1;

    for bag = 0, 4 do
        bslot = 1;
        if not TitanGetVar(TITAN_BAG_ID, "CountProfBagSlots") and TitanBag_IsProfBag(GetBagName(bag)) then
            scount = scount + 1;
            bslot = scount;
            total[bslot] = 0;
            used[bslot] = 0;
        end
        local size = GetContainerNumSlots(bag);
        if (size and size > 0) then
            ucount = 0;
            for slot = 1, size do
                if (GetContainerItemInfo(bag, slot)) then
                    ucount = ucount + 1;
                end
            end
            total[bslot] = total[bslot] + size;
            used[bslot] = used[bslot] + ucount;
            available[bslot] = total[bslot] - used[bslot];
        end
    end

    local bagText = "";
    local bagRichText, color;
    local umax = 0;
    for slot = 1, scount do
        if slot > 1 then
            bagText = bagText .. " ";
        end
        if (TitanGetVar(TITAN_BAG_ID, "ShowUsedSlots")) then
            bagText = bagText .. format(L["TITAN_BAG_FORMAT"], used[slot], total[slot]);
        else
            bagText = bagText .. format(L["TITAN_BAG_FORMAT"], available[slot], total[slot]);
        end
        if umax < used[slot] / total[slot] then
            umax = used[slot] / total[slot];
        end
    end

    if ( TitanGetVar(TITAN_BAG_ID, "ShowColoredText") ) then    
        color = TitanUtils_GetThresholdColor(TITAN_BAG_THRESHOLD_TABLE, umax);
        bagRichText = TitanUtils_GetColoredText(bagText, color);
    else
        bagRichText = TitanUtils_GetHighlightText(bagText);
    end

    return L["TITAN_BAG_BUTTON_LABEL"], bagRichText;
end

Related

Wiki: Titan_Panel_Version_History

Discussion

  • Anonymous

    Anonymous - 2013-03-23

    Originally posted by: reinhard...@dell.com

    Addendum:
    If you have more than one Profession bag, ( e.g. your professions are Mining and Herb gathering ) you will receive an additional count for each Profession bag. like: 56/60 9/36 15/36

     
  • Anonymous

    Anonymous - 2013-03-23

    Originally posted by: reinhard...@dell.com

    missed another Profession bag as well ....
    L["TITAN_BAG_PROF_BAG_NAMES"] = {"Verzauberter Magiestoffbeutel", "Verzauberte Runenstofftasche", "Grosse Verzauberertasche", "Verzaubererranzen", "Zauberfeuertasche", "Werkzeugkasten aus Khorium", "Werkzeugkasten aus Teufelseisen", "Schwerer Werkzeugkasten", "Edelsteinbeutel", "Juwelenbeutel", "Verst\195\164rkte Bergbautasche", "Bergbausack", "Ranzen des Lederers", "Tasche f\195\188r alle Felle", "Kr\195\164uterbeutel", "Cenarische Kr\195\164utertasche", "Cenarischer Ranzen", "Mycahs Botanikerbeutel", "Reisetasche des Trappers", "Mammutbergbautasche", "Werkzeugkasten aus Titan", "Mysteri\195\182se Tasche", "Smaragdtasche", "Tasche der endlosen Fächer", "Schreibermappe", "Hyjalexpeditionstasche", "Luxuri\195\182se Edelsteintasche aus Seide", "Dreifach verst\195\164rkte Bergbautasche", "Ranzen des k\195\182niglichen Scribenten"};

     
  • Anonymous

    Anonymous - 2013-03-24

    Originally posted by: Honor...@gmail.com

    (No comment was entered for this change.)

    Status: Pending

     
  • Anonymous

    Anonymous - 2013-03-24

    Originally posted by: Honor...@gmail.com

    (No comment was entered for this change.)

    Labels: Type-Enhancement

     
  • Anonymous

    Anonymous - 2013-08-18

    Originally posted by: Honor...@gmail.com

    I like this idea.  I will be adopting it formally and incorporating it into TitanBags in a future release.

    Owner: Honor...@gmail.com
    Status: Accepted

     
  • Anonymous

    Anonymous - 2014-05-24

    Originally posted by: Honor...@gmail.com

    I've started doing some work on this and I will try to make some progress on it soon but real life is impacting my available coding time quite a bit lately.

     
  • HonorGoG

    HonorGoG - 2015-04-20

    This was added in 5.6.0

     
  • HonorGoG

    HonorGoG - 2015-04-20
    • Description has changed:

    Diff:

    
    
    • status: Accepted --> Resolved
    • Priority: --> Low
     

Log in to post a comment.