feat: track, untrack characters from money, inventory and view
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user