mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-30 15:40:51 +00:00
Drop CreateGoldString's fallback for clients without coin icons
ClassicAPI always provides GetCoinTextureString, so the presence check and the hand-built "g/s/c" string after it never ran.
This commit is contained in:
+1
-14
@@ -722,20 +722,7 @@ end
|
||||
function pfUI.api.CreateGoldString(money)
|
||||
if type(money) ~= "number" then return "-" end
|
||||
|
||||
if _G.GetCoinTextureString then
|
||||
return "|cffffffff" .. _G.GetCoinTextureString(money) .. "|r"
|
||||
end
|
||||
|
||||
local gold = floor(money/ 100 / 100)
|
||||
local silver = floor(mod((money/100),100))
|
||||
local copper = floor(mod(money,100))
|
||||
|
||||
local string = ""
|
||||
if gold > 0 then string = string .. "|cffffffff" .. gold .. "|cffffd700g" end
|
||||
if silver > 0 or gold > 0 then string = string .. "|cffffffff " .. silver .. "|cffc7c7cfs" end
|
||||
string = string .. "|cffffffff " .. copper .. "|cffeda55fc"
|
||||
|
||||
return string
|
||||
return "|cffffffff" .. _G.GetCoinTextureString(money) .. "|r"
|
||||
end
|
||||
|
||||
-- [ Enable Movable ]
|
||||
|
||||
Reference in New Issue
Block a user