Prefer GetCoinTextureString in CreateGoldString

If the global GetCoinTextureString exists, use it to format money (wrapped in white color codes) for CreateGoldString. Keeps the existing numeric fallback formatting for environments without GetCoinTextureString.
This commit is contained in:
Brues
2026-08-18 04:38:09 -05:00
parent bb39c9d94e
commit 8cdaf1fc00
+4
View File
@@ -671,6 +671,10 @@ end
function pfUI.api.CreateGoldString(money) function pfUI.api.CreateGoldString(money)
if type(money) ~= "number" then return "-" end 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 gold = floor(money/ 100 / 100)
local silver = floor(mod((money/100),100)) local silver = floor(mod((money/100),100))
local copper = floor(mod(money,100)) local copper = floor(mod(money,100))