Indicate which followers assigned to buildings can gain exp #91

  • New
  • Enhancment
Assigned to esembe
  • _ForgeUser3260079 created this issue Apr 22, 2015

    What is the enhancement in mind? How should it look and feel?

    I would like to see Broker Garrison indicate which followers, that are assigned to buildings, will still gain exp from work orders submitted there.

    With six garrisons to maintain, I frequently don't take the time daily to do everything, especially the mine and herb garden. However, it would be very helpful to know which followers assigned to a building can gain experience from work orders submitted to that particular building, when deciding where to spend my time. That would help me know which ones I stood to benefit the most from doing if I didn't have time to do everything on a given day. I imagine I am not alone in this.

    Since the assigned follower icon is fairly small, I wouldn't recommend displaying it there (with a colored icon or colored background behind the icon). Instead, simply coloring the building name text with the rarity color of the assigned follower would be a relatively clean and easy way to show this. I would suggest setting the color to green for uncommon, and blue for rare (while exp can be gained). But, I would also suggest not setting the color to purple for epic, as the follower is no longer gaining exp, but rather use the standard color you are using now if they can no longer gain exp (white?).

    Thanks for your consideration. I've always been a big fan of Broker-style addons, and this one is no exception.

  • _ForgeUser3260079 added the tags New Enhancment Apr 22, 2015
  • _ForgeUser3260079 posted a comment Apr 24, 2015

    I took a stab at modifying your code with my suggested change. I'm a developer, but pretty new to lua and Wow addons. This may not be the best way to to alter your code, but it was pretty localized, and it does work.

    In core.lua, change this:

    tooltip:SetCell(row, 3, ("%s %s %s"):format(, rank, buildingInfoIcon), nil, "LEFT", 1)

    to the following:

    local followerQuality, followerColor
    followerColor = colors.white
    if buildingData.hasFollowerSlot and buildingData.follower and buildingData.follower.quality then
      followerQuality = buildingData.follower.quality
      if followerQuality >=2 and followerQuality <= 3 then
        local r, g, b, hexColor = GetItemQualityColor(followerQuality)
        followerColor = {hex=hexColor}
    tooltip:SetCell(row, 3, ("%s %s %s"):format(getColoredString(, followerColor), rank, buildingInfoIcon), nil, "LEFT", 1)

    I also updated Garrison.getColoredString() (in helper.lua) to work if a hex value is provided, as string.format() seemed like overkill for what can be done with simple concatenation. The above could easily be changed to define followerColor as {r, g, b}, and this could be left as is.

    function Garrison.getColoredString(text, color)
      if color.hex then
        return "|c"..color.hex..text.."|r"
        return string.format("|cff%02x%02x%02x%s|r",color.r*255,color.g*255,color.b*255, text)
  • esembe posted a comment Apr 24, 2015

    thank you for your contribution, we will look into it!

To post a comment, please login or register a new account.