anzz1 / TacoTip

Better player tooltips - class colors, talents/specialization, GearScore & more - for Classic / TBC / WoTLK
8 stars 18 forks source link

Guild name does not show in Classic client #47

Open stijnherreman opened 9 months ago

stijnherreman commented 9 months ago

When using the Classic client, the guild name is not included on the default tooltip.

This minimal change adds the guild name, but it needs some more work. As you can see, the colour of the third line is wrong when there is a guild name.

        if (guildName and guildRankName) then
            if (TacoTipConfig.show_guild_name) then
+               if (CI:IsClassic() and numLines == 2) then
+                   text[3] = text[2]
+                   text[2] = guildName
+                   self:AddLine(text[3])
+                   numLines = 3
+              end
                if (TacoTipConfig.show_guild_rank) then
                    if (TacoTipConfig.guild_rank_alt_style) then
                        text[2] = string.gsub(text[2], guildName, string.format("|cFF40FB40<%s> (%s)|r", guildName, guildRankName), 1)
                    else
                        text[2] = string.gsub(text[2], guildName, string.format("|cFF40FB40"..L["FORMAT_GUILD_RANK_1"].."|r", guildRankName, guildName), 1)
                    end
                else
                    text[2] = string.gsub(text[2], guildName, string.format("|cFF40FB40<%s>|r", guildName), 1)
                end
            else
                text[2] = string.gsub(text[2], guildName, "", 1)
            end
        end

Screenshots after changes, player without a guild and player with a guild image image

Joshc5 commented 7 months ago

I too have noticed this issue. Guild name doesnt show up even though its enabled. I have had to stick to TipTac for now due to this unfortunately.