Skip to content

Commit

Permalink
fix: friend list now ignore Plunderstorm players
Browse files Browse the repository at this point in the history
  • Loading branch information
fang2hou committed Mar 22, 2024
1 parent 8c01529 commit f5876fb
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions Modules/Social/FriendList.lua
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,8 @@ function FL:UpdateFriendButton(button)
local suffix = expansionData[wowID].suffix and " (" .. expansionData[wowID].suffix .. ")" or ""
local serverStrings = {strsplit(" - ", gameAccountInfo.richPresence)}
server = (serverStrings[#serverStrings] or BNET_FRIEND_TOOLTIP_WOW_CLASSIC .. suffix) .. "*"
elseif wowID and wowID == 1 and name == "" then
server = gameAccountInfo.richPresence -- Plunderstorm
else
server = gameAccountInfo.realmDisplayName or ""
end
Expand Down Expand Up @@ -342,9 +344,9 @@ function FL:UpdateFriendButton(button)
end

-- combine Real ID and Name
if nameString and realIDString then
if nameString and nameString ~= "" and realIDString and realIDString ~= "" then
buttonTitle = realIDString .. " \124\124 " .. nameString
elseif nameString then
elseif nameString and nameString ~= "" then
buttonTitle = nameString
else
buttonTitle = realIDString or ""
Expand All @@ -354,10 +356,12 @@ function FL:UpdateFriendButton(button)

-- area
if area then
if server and server ~= "" and server ~= E.myrealm then
if area and area ~= "" and server and server ~= "" and server ~= E.myrealm then
buttonText = F.CreateColorString(area .. " - " .. server, self.db.areaColor)
else
elseif area and area ~= "" then
buttonText = F.CreateColorString(area, self.db.areaColor)
else
buttonText = server or ""
end

button.info:SetText(buttonText)
Expand Down

0 comments on commit f5876fb

Please sign in to comment.