feat: track, untrack characters from money, inventory and view

This commit is contained in:
Vati
2026-04-06 13:28:14 +04:00
parent cfc9430fac
commit e40ef41602
5 changed files with 209 additions and 32 deletions
+22
View File
@@ -26,6 +26,11 @@ function DB:Initialize()
}
end
-- Initialize gold blacklist (account-wide)
if not Guda_DB.goldBlacklist then
Guda_DB.goldBlacklist = {}
end
-- Initialize character DB
if not Guda_CharDB then
Guda_CharDB = {
@@ -431,6 +436,23 @@ function DB:GetTotalMoney(sameFactionOnly, currentRealmOnly)
return total
end
-- Check if a character is excluded from gold/inventory tracking
function DB:IsGoldBlacklisted(fullName)
return Guda_DB.goldBlacklist and Guda_DB.goldBlacklist[fullName]
end
-- Toggle a character's exclusion from gold/inventory tracking
function DB:ToggleGoldBlacklist(fullName)
if not Guda_DB.goldBlacklist then
Guda_DB.goldBlacklist = {}
end
if Guda_DB.goldBlacklist[fullName] then
Guda_DB.goldBlacklist[fullName] = nil
else
Guda_DB.goldBlacklist[fullName] = true
end
end
-- Get character setting
function DB:GetSetting(key)
-- SavedVariables may not be initialized yet when some UI OnLoad scripts run