diff --git a/Changelog-GuildTithe-release_v2.5.15.txt b/Changelog-GuildTithe-release_v2.5.15.txt
new file mode 100644
index 0000000..e562487
--- /dev/null
+++ b/Changelog-GuildTithe-release_v2.5.15.txt
@@ -0,0 +1,25 @@
+------------------------------------------------------------------------
+r121 | vandesdelca32 | 2014-10-17 03:33:11 +0000 (Fri, 17 Oct 2014) | 1 line
+Changed paths:
+ A /tags/release_v2.5.15 (from /trunk:120)
+
+Tagging latest build.
+------------------------------------------------------------------------
+r120 | vandesdelca32 | 2014-10-17 03:32:15 +0000 (Fri, 17 Oct 2014) | 1 line
+Changed paths:
+ M /trunk/Core.lua
+
+Fixed an error in the default settings pointed out by Kanegasi
+------------------------------------------------------------------------
+r118 | vandesdelca32 | 2014-10-17 00:50:40 +0000 (Fri, 17 Oct 2014) | 1 line
+Changed paths:
+ M /trunk/GuildTitheFrameScripts.lua
+
+Fixed a bug that caused disabling an option to not be saved correctly.
+------------------------------------------------------------------------
+r116 | vandesdelca32 | 2014-10-15 23:49:49 +0000 (Wed, 15 Oct 2014) | 1 line
+Changed paths:
+ M /trunk/GuildTithe.toc
+
+Bump ToC to 60000
+------------------------------------------------------------------------
diff --git a/Core.lua b/Core.lua
new file mode 100644
index 0000000..d70267c
--- /dev/null
+++ b/Core.lua
@@ -0,0 +1,575 @@
+--[[
+------------------------------------------------------------------------
+ Project: GuildTithe
+ File: Core rev. 120
+ Date: 2014-10-17T03:32:15Z
+ Purpose: Core Addon Code
+ Credits: Code written by Vandesdelca32
+
+ Copyright (C) 2011 Vandesdelca32
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+------------------------------------------------------------------------
+]]
+
+-- Import engine and the localization table.
+local addonName, _ = ...
+local E, L = unpack(select(2, ...))
+
+--debugArgs: Returns literal "nil" or the tostring of all of the arguments passed to it.
+function E:debugArgs(...)
+ local tmp = {}
+ for i = 1, select("#", ...) do
+ tmp[i] = tostring(select(i, ...)) or "nil"
+ end
+ return table.concat(tmp, ", ")
+end
+
+-- Get a string for the current version of the addon.
+function E:GetVerString()
+ local v, rev = (GetAddOnMetadata(addonName, "VERSION") or "???"), (tonumber('120') or "???")
+
+ --[===[@debug@
+ -- If this code is run, it's an unpackaged version, show this:
+ if v == "release_v2.5.15" then v = "DEV_VERSION"; end
+ --@end-debug@]===]
+
+ if short then
+ -- Try to discern what release stage:
+ if strfind(v, "release") then
+ return "r" .. rev
+ elseif strfind(v, "beta") then
+ return "b" .. rev
+ else
+ return "a" .. rev
+ end
+ end
+ return v .. "." .. rev
+end
+
+local SettingsDefaults = {
+ SettingsVer = 2,
+ CollectSource = {
+ Quest = -1,
+ Merchant = -1,
+ Mail = -1,
+ Loot = -1,
+ Trade = -1
+ },
+ AutoDeposit = true,
+ Spammy = false,
+ TotalTithe = 0,
+ CurrentTithe = 0,
+ MiniFrameShown = true,
+ MiniFrameLocked = false,
+ SkinElvUI = true,
+ LDBDisplayTotal = false,
+}
+
+-- Get the coin string for the databroker icon, because it needs to be shorter.
+local function GetLDBCoinString()
+ local text = ""
+ local ct = GuildTithe_SavedDB.CurrentTithe
+ local tt = GuildTithe_SavedDB.TotalTithe
+
+ if GuildTithe_SavedDB.LDBDisplayTotal then
+ local gold = floor(tt / COPPER_PER_GOLD)
+ local silver = floor(tt / SILVER_PER_GOLD) % COPPER_PER_SILVER
+ local copper = floor(tt % COPPER_PER_SILVER)
+ if gold ~= 0 then
+ text = format("%s|cffffd700g|r %s|cffc7c7cfs|r %s|cffeda55fc|r", gold, silver, copper)
+ elseif silver ~= 0 then
+ text = format("%s|cffc7c7cfs|r %s|cffeda55fc|r", silver, copper)
+ else
+ text = format("%s|cffeda55fc|r", copper)
+ end
+ else
+ local gold = floor(ct / COPPER_PER_GOLD)
+ local silver = floor(ct / SILVER_PER_GOLD) % COPPER_PER_SILVER
+ local copper = floor(ct % COPPER_PER_SILVER)
+ if gold ~= 0 then
+ text = format("%s|cffffd700g|r %s|cffc7c7cfs|r %s|cffeda55fc|r", gold, silver, copper)
+ elseif silver ~= 0 then
+ text = format("%s|cffc7c7cfs|r %s|cffeda55fc|r", silver, copper)
+ else
+ text = format("%s|cffeda55fc|r", copper)
+ end
+ end
+ return text
+end
+
+function E:Init()
+ --[===[@alpha@
+ E._DebugMode = true
+ --@end-alpha@]===]
+
+ E.Info = {}
+
+ -- Set up the LDB datastream
+ local t = {
+ type = "data source",
+ text = "",
+ icon = "Interface\\ICONS\\inv_misc_coin_17.png",
+ label = "Tithe",
+ OnClick = function(frame, button)
+ GameTooltip:Hide()
+ if button == "LeftButton" then
+ E.FrameScript_MiniTitheFrameOnClick()
+ elseif button == "RightButton" then
+ if not GuildTithe_SavedDB.LDBDisplayTotal then
+ GuildTithe_SavedDB.LDBDisplayTotal = true
+ else
+ GuildTithe_SavedDB.LDBDisplayTotal = false
+ end
+ end
+ end,
+ OnTooltipShow = function(tooltip)
+ if tooltip and tooltip.AddLine then
+ tooltip:SetText("GuildTithe")
+ if GuildTithe_SavedDB.LDBDisplayTotal then
+ tooltip:AddLine(L.TooltipLDBDescriptionTotal, 0.8, 0.8, 0.8, 1)
+ else
+ tooltip:AddLine(L.TooltipLDBDescriptionCurrent, 0.8, 0.8, 0.8, 1)
+ end
+ tooltip:AddLine("\nHint: Left-Click with the guild bank or a letter open to deposit your tithe! Right-Click to toggle between total and current tithes.", 0, 1, 0, 1)
+ tooltip:Show()
+ end
+ end,
+ }
+ E.Info.LDBData = LibStub:GetLibrary("LibDataBroker-1.1"):NewDataObject("GuildTithe", t)
+
+ -- Check the settings:
+ if not GuildTithe_SavedDB or GuildTithe_SavedDB.SettingsVer < SettingsDefaults.SettingsVer then
+ GuildTithe_SavedDB = SettingsDefaults
+ end
+
+ -- Load the frames
+ GT_MiniTitheFrame:EnableMouse(not GuildTithe_SavedDB.MiniFrameLocked)
+ if GuildTithe_SavedDB.MiniFrameShown then
+ GT_MiniTitheFrame:Show()
+ end
+end
+
+function E:ResetWindowSettings()
+ GT_OptionsFrame:SetUserPlaced(false)
+ GT_MiniTitheFrame:SetUserPlaced(false)
+ ReloadUI()
+end
+
+function E:ResetCurrentTithe()
+ GuildTithe_SavedDB.CurrentTithe = 0
+end
+
+-- Reset default settings
+function E:ResetConfig()
+ GuildTithe_SavedDB = SettingsDefaults
+ if GT_OptionsFrame:IsShown() then
+ self.UpdateOptions(GT_OptionsFrame)
+ end
+ return self:ResetWindowSettings()
+end
+
+-- This is used to check the special tithe amounts for merchant/mail/trade.
+-- They all need the same function, but have slightly different methods. THis way is faster.
+local function CheckSpecialTitheAmounts(source, startGold, finishGold)
+
+ local titheAmount
+
+ -- Get the 'difference' in money
+ local diff
+ diff = finishGold - startGold
+
+ -- Check for profit
+ if diff <= 0 then
+ diff = 0
+ end
+
+ -- Update
+ titheAmount = diff
+
+ return titheAmount or 0
+end
+
+-- Quest, Merchant, Mail, Loot, Trade
+-- Updates the current tithe, passing update will update the totals.
+function E:UpdateOutstandingTithe(source, update, ...)
+ self:PrintDebug("UpdateOutstandingTithe(" .. self:debugArgs(source, update, ...) .. ")")
+
+ if not update then
+ self.Info.CurrentGold = GetMoney()
+ return
+ else
+ self.Info.FinishGold = GetMoney()
+ end
+ self:PrintDebug(" CurrentGold = " .. self:debugArgs(self.Info.CurrentGold) .. ", FinishGold = " .. self:debugArgs(self.Info.FinishGold))
+
+ -- Try to extract what GOLD, SILVER, and COPPER are in the client language
+ local GOLD = strmatch(format(GOLD_AMOUNT, 20), "%d+%s(.+)") -- This will return what's in the brackets, which on enUS would be "Gold"
+ local SILVER = strmatch(format(SILVER_AMOUNT, 20), "%d+%s(.+)")
+ local COPPER = strmatch(format(COPPER_AMOUNT, 20), "%d+%s(.+)")
+ ---self:PrintDebug(self:debugArgs(GOLD, SILVER, COPPER))
+
+
+ -- Make some storage for the tithe amount
+ local titheAmount
+
+ -- Checking the source of the money event
+ -- From Loot, Quest
+ if source == "Loot" or source == "Quest" then
+ local arg1 = ...
+ --Try and parse the current amount from the string.
+ local g = tonumber(arg1:match("(%d+)%s" .. GOLD)) or 0
+ local s = tonumber(arg1:match("(%d+)%s" .. SILVER)) or 0
+ local c = tonumber(arg1:match("(%d+)%s" .. COPPER)) or 0
+
+ titheAmount = (g * COPPER_PER_GOLD) + (s * SILVER_PER_GOLD) + c
+
+ -- From Merchants, or Mail, or Trade
+ elseif source == "Merchant" or source == "Mail" or source == "Trade" then
+ -- Check and make a table for cooldown info storage
+ if not E.Info.checkDelays then
+ E.Info.checkDelays = {}
+ end
+
+ --Check the cooldown timer, we're gonna hardcode 2s
+ if (not E.Info.checkDelays[source]) or (GetTime() >= E.Info.checkDelays[source] + 2) then
+ E.Info.checkDelays[source] = GetTime()
+
+ -- Sanity checks.
+ if not (self.Info.FinishGold and self.Info.CurrentGold) then
+ E:PrintDebug("Invalid Type, proper information not available", true)
+ return
+ end
+
+ -- Is this a trade? It needs special conditions
+ if source == "Trade" then
+ -- Trade is a bit laggy, so we pass the guessed gold amount over through this
+ -- and assume that the finishgold is == currentgold+ trade amount.
+ local arg1 = ...
+ if tonumber(arg1) and tonumber(arg1) >= 0 then
+ self:PrintDebug(" tradeGold = " .. tonumber(arg1))
+ self.Info.FinishGold = self.Info.CurrentGold + tonumber(arg1)
+ end
+ end
+ titheAmount = CheckSpecialTitheAmounts(source, self.Info.CurrentGold, self.Info.FinishGold)
+
+ else
+ self:PrintDebug("ON ".. source .." CD", true)
+ return
+ end
+ end
+ self:PrintDebug(" titheAmount = " .. tostring(titheAmount))
+
+ -- Do some maths
+ if (GuildTithe_SavedDB.CollectSource[source]
+ and GuildTithe_SavedDB.CollectSource[source] >= 1) then
+ -- Collecting from this source, get the actual amount we're taking from this
+ local actualTithe = floor((titheAmount * (GuildTithe_SavedDB.CollectSource[source] / 100)))
+ self:PrintDebug(" actualTithe = " .. tostring(actualTithe))
+ GuildTithe_SavedDB.CurrentTithe = GuildTithe_SavedDB.CurrentTithe + actualTithe
+
+ -- Clear the info table for the next guy
+ self.Info.CurrentGold = nil
+ self.Info.FinishGold = nil
+
+ -- Tell the user what we collected if they want to know
+ if GuildTithe_SavedDB.Spammy and actualTithe > 0 then
+ self:PrintMessage(format(L.ChatSpammyCollectedAmount, GetCoinTextureString(actualTithe), strlower(source)))
+ end
+ else
+ self:PrintDebug(" " .. source .. " not collecting", true)
+ if GuildTithe_SavedDB.Spammy then
+ self:PrintMessage(format(L.ChatSpammyNotCollectingSource, source))
+ end
+ end
+end
+
+
+-- Handles depositing the tithe
+function E:DepositTithe(clicked, isMail)
+ self:PrintDebug("DepositTithe(".. self:debugArgs(clicked, isMail) .. ") -- ACTUAL DEPOSIT IS DISABLED IN DEBUG MODE")
+ if not clicked and not GuildTithe_SavedDB.AutoDeposit then
+ if GuildTithe_SavedDB.Spammy then
+ self:PrintMessage(L.ChatAutoDepositDisabled)
+ end
+ self:PrintDebug(" AutoDeposit Disabled")
+ return
+ end
+
+ -- Sanity Check, (stop the error speech when trying to deposit 0c)
+ if GuildTithe_SavedDB.CurrentTithe == 0 then
+ if GuildTithe_SavedDB.Spammy then
+ self:PrintMessage(L.ChatNothingToDeposit, true)
+ end
+ return
+ end
+
+ -- Make sure the player has enough money first, then spam them out if they don't!
+ if GetMoney() < GuildTithe_SavedDB.CurrentTithe then
+ self:PrintMessage(L["ChatNotEnoughFunds"], true)
+ return
+ end
+
+ -- Deposit the money, then reset CurrentTithe and update TotalTithe
+ if not self.DebugMode then
+ if isMail then
+ -- postal fix
+ local goldAmount = floor(GuildTithe_SavedDB.CurrentTithe / COPPER_PER_GOLD)
+ local silverAmount = floor((GuildTithe_SavedDB.CurrentTithe % COPPER_PER_GOLD) / COPPER_PER_SILVER)
+ local copperAmount = floor(GuildTithe_SavedDB.CurrentTithe % COPPER_PER_SILVER)
+ SendMailMoneyGold:SetText(goldAmount)
+ SendMailMoneySilver:SetText(silverAmount)
+ SendMailMoneyCopper:SetText(copperAmount)
+ else
+ DepositGuildBankMoney(GuildTithe_SavedDB.CurrentTithe)
+ end
+ end
+
+ if GuildTithe_SavedDB.Spammy then
+ self:PrintMessage(format(L.ChatDepositTitheAmount, GetCoinTextureString(GuildTithe_SavedDB.CurrentTithe)))
+ end
+ self:PrintDebug(" Deposit amount = " .. GuildTithe_SavedDB.CurrentTithe)
+
+ GuildTithe_SavedDB.TotalTithe = GuildTithe_SavedDB.TotalTithe + GuildTithe_SavedDB.CurrentTithe
+ if not GuildTithe_SavedDB.LDBDisplayTotal or not E.ShowTotalTimer then
+ GuildTithe_SavedDB.LDBDisplayTotal = true
+ E.ShowTotalTimer = E:SetTimer(10, function() GuildTithe_SavedDB.LDBDisplayTotal = false; end)
+ end
+ GuildTithe_SavedDB.CurrentTithe = 0
+end
+
+local numHelpLines = 10
+-- Print Help
+function E:PrintHelpMessages()
+ for i = 1, numHelpLines do
+ if i == 1 then
+ self:PrintMessage(format(L["ChatHelpLine1"], self:GetVerString()))
+ else
+ self:PrintMessage(L["ChatHelpLine" .. i])
+ end
+ end
+end
+
+
+-- Handles slash commands
+function E:OnChatCommand(msg)
+ self:PrintDebug("OnChatCommand(" .. self:debugArgs(msg) .. ")")
+ local cmd, args = strsplit(" ", strlower(msg))
+ self:PrintDebug("cmd = " .. tostring(cmd) .. ", args = " .. tostring(args))
+ if msg == "" or cmd == "help" then
+ -- Print Help
+ self:PrintHelpMessages()
+
+ -- want to reset settings?
+ elseif cmd == "reset" then
+ if not args or args == "tithe" then
+ StaticPopup_Show("GUILDTITHE_RESETTITHE")
+ elseif args == "pos" then
+ self:ResetWindowSettings()
+ elseif args == "config" then
+ StaticPopup_Show("GUILDTITHE_RESETCONFIG")
+ else
+ self:PrintMessage(format(L.ChatArgNotFound, args or "", cmd), true)
+ end
+
+ -- Show the options frame, we don't save this
+ elseif cmd == "options" or cmd == "config" then
+ GT_OptionsFrame:Show()
+
+ -- Get the current tithe
+ elseif cmd == "current" or cmd == "tithe" then
+ self:PrintMessage(L.ChatOutstandingTithe, GetCoinTextureString(GuildTithe_SavedDB.CurrentTithe))
+ -- Show/hide or toggle the mini frame.
+ elseif cmd == "mini" then
+ -- Show or hide the mini frame, this can be forced, or toggled when passed with no args
+ if args == "show" then
+ GT_MiniTitheFrame:Show()
+ GuildTithe_SavedDB.MiniFrameShown = true
+ elseif args == "hide" then
+ GT_MiniTitheFrame:Hide()
+ GuildTithe_SavedDB.MiniFrameShown = false
+ -- Lock the mini-frame
+ elseif args == "lock" then -- This is a toggle
+ if GuildTithe_SavedDB.MiniFrameLocked then
+ self:PrintMessage(L.ChatMiniFrameUnlock)
+ GT_MiniTitheFrame:EnableMouse(true)
+ GuildTithe_SavedDB.MiniFrameLocked = false
+ else
+ self:PrintMessage(L.ChatMiniFrameLock)
+ GT_MiniTitheFrame:EnableMouse(false)
+ GuildTithe_SavedDB.MiniFrameLocked = true
+ end
+ else -- No args clause, toggle.
+ if GuildTithe_SavedDB.MiniFrameShown then
+ GT_MiniTitheFrame:Hide()
+ GuildTithe_SavedDB.MiniFrameShown = false
+ else
+ GT_MiniTitheFrame:Show()
+ GuildTithe_SavedDB.MiniFrameShown = true
+ end
+ end
+
+
+
+ elseif cmd == "total" then
+ self:PrintMessage(format(L.OptionsTotalTitheText, GetCoinTextureString(GuildTithe_SavedDB.TotalTithe)))
+ else
+ -- This is where we're going to actually print the help info... Later though.
+ self:PrintMessage(format(L.ChatCommandNotFound, msg), true)
+ end
+end
+
+function GuildTithe_OnLoad(self)
+ -- Register events
+ self:RegisterEvent("ADDON_LOADED")
+ -- The money events.
+ self:RegisterEvent("CHAT_MSG_MONEY")
+ self:RegisterEvent("GUILDBANKFRAME_OPENED")
+ self:RegisterEvent("MAIL_SHOW")
+ self:RegisterEvent("MAIL_CLOSED")
+ self:RegisterEvent("MERCHANT_SHOW")
+ self:RegisterEvent("MERCHANT_CLOSED")
+ self:RegisterEvent("TRADE_SHOW") -- Trade Opened
+ self:RegisterEvent("TRADE_CLOSED") -- Trade closed
+ self:RegisterEvent("TRADE_MONEY_CHANGED") -- Player's money was updated (used after a trade)
+ self:RegisterEvent("TRADE_REQUEST_CANCEL") -- Cancelled trade.
+
+ --Other events
+ self:RegisterEvent("CHAT_MSG_SYSTEM") -- Quest rewards
+ self:RegisterEvent("PLAYER_LEAVING_WORLD") -- For saving options when we log and the form is closed.
+ self:RegisterEvent("PLAYER_ENTERING_WORLD") -- For updating the frames and output.
+
+ self:SetScript("OnEvent", E.EventHandler)
+
+ -- Register /commands
+ SLASH_GUILDTITHE_MAIN1="/gt"
+ SLASH_GUILDTITHE_MAIN2="/tithe"
+ SLASH_GUILDTITHE_MAIN3="/guildtithe"
+
+ -- We set up the slash command like this, so we can call the function as a method, instead of a table index.
+ SlashCmdList["GUILDTITHE_MAIN"] = function(msg, editBox)
+ E:OnChatCommand(msg)
+ end
+
+ -- Register dialogs
+ StaticPopupDialogs["GUILDTITHE_RESETTITHE"] = {
+ text = L.DialogResetTitheText,
+ button1 = YES,
+ button2 = NO,
+ OnAccept = function()
+ E:ResetCurrentTithe()
+ end,
+ timeout = 0,
+ whileDead = true,
+ hideOnEscape = true,
+ }
+
+ StaticPopupDialogs["GUILDTITHE_RESETCONFIG"] = {
+ text = E:ParseColorCodedString(L.DialogResetConfigText),
+ button1 = YES,
+ button2 = NO,
+ OnAccept = function()
+ E:ResetConfig()
+ end,
+ timeout = 0,
+ whileDead = true,
+ hideOnEscape = true,
+ showAlert = true,
+ cancels = "GUILDTITHE_RESETTITHE",
+ }
+
+ StaticPopupDialogs["GUILDTITHE_SKINRELOADWARNING"] = {
+ text = L.DialogSkinRequiresReload,
+ button1 = OKAY,
+ button2 = NO,
+ OnAccept = function()
+ ReloadUI()
+ end,
+ OnCancel = function()
+ GT_OptionsFrame_Seperator_ExtraOption4:SetChecked(GuildTithe_SavedDB.SkinElvUI)
+ end,
+ timeout = 0,
+ whileDead = true,
+ hideOnEscape = true,
+ }
+end
+
+function E.EventHandler(self, event, ...)
+ local arg1, arg2, arg3, arg4 = ...
+ if event == "ADDON_LOADED" and arg1 == "GuildTithe" then
+ return E:Init()
+
+ elseif event == "PLAYER_ENTERING_WORLD" then
+ -- Hide the options frame
+ GT_OptionsFrame:Hide()
+ -- Skin the frames
+ E:SkinFrames()
+ if not E.Loaded then
+
+ E:PrintMessage(format(L.Loaded, E:GetVerString()))
+ E:PrintDebug("Loaded in §bDebug Mode§r! This will print a lot of extra, mostly useless information to your chat. You can disable debug mode by unchecking the box marked \"Debug mode\" in the options.")
+ E:SetTimer(2, function()
+ GT_MiniTitheFrame.CurrentTithe:SetText(GetCoinTextureString(GuildTithe_SavedDB.CurrentTithe));
+ E.Info.LDBData.text = GetLDBCoinString();
+ end, true, "GT_CTUPDATE")
+ E.Loaded = true
+ end
+
+ -- GUILDBANKFRAME_OPENED: The GB was opened, deposit the outstanding tithe.
+ elseif event == "GUILDBANKFRAME_OPENED" then
+ -- WAIT 3 SECONDS FOR GB TO FULLY OPEN
+ C_Timer.After(3, function() E:DepositTithe() end)
+
+ -- Mail_*: Update outstanding tithe from Mail soruces
+ elseif event == "MAIL_SHOW" then
+ return E:UpdateOutstandingTithe("Mail")
+ elseif event == "MAIL_CLOSED" then
+ return E:UpdateOutstandingTithe("Mail", true)
+
+ -- Merchant_*: Update outstanding tithe from merchants
+ elseif event == "MERCHANT_SHOW" then
+ return E:UpdateOutstandingTithe("Merchant")
+ elseif event == "MERCHANT_CLOSED" then
+ return E:UpdateOutstandingTithe("Merchant", true)
+
+ -- TRADE_*: Update trade amounts;
+ elseif event == "TRADE_SHOW" then
+ return E:UpdateOutstandingTithe("Trade")
+ elseif event == "TRADE_REQUEST_CANCEL" then
+ E.Info.TotalTradeAmount = nil
+ E:UpdateOutstandingTithe("Trade", true, 0)
+ elseif event == "TRADE_CLOSED" then
+ E:UpdateOutstandingTithe("Trade", true, E.Info.TotalTradeAmount or 0)
+ E.Info.TotalTradeAmount = nil
+ elseif event == "TRADE_MONEY_CHANGED" then
+ E.Info.TotalTradeAmount = TradeRecipientMoneyFrame.staticMoney
+
+ -- CHAT_MSG_SYSTEM: Update tithe from Quest rewards
+ elseif event == "CHAT_MSG_SYSTEM" then
+ return E:UpdateOutstandingTithe("Quest", true, arg1)
+
+ -- CHAT_MSG_MONEY: Update tithe from Loot
+ elseif event == "CHAT_MSG_MONEY" then
+ return E:UpdateOutstandingTithe("Loot", true, arg1)
+
+ -- PLAYER_LEAVING_WORLD
+ elseif event == "PLAYER_LEAVING_WORLD" then
+ GT_OptionsFrame:Hide()
+ -- The options frame doesn't need to remember where it was.
+ GT_OptionsFrame:SetUserPlaced(false)
+ end
+end
+
+
+
diff --git a/GlobalStrings.lua b/GlobalStrings.lua
new file mode 100644
index 0000000..7efb7c0
--- /dev/null
+++ b/GlobalStrings.lua
@@ -0,0 +1,55 @@
+--[[
+------------------------------------------------------------------------
+ Project: GuildTithe
+ File: GlobalStrings rev. 65
+ Date: 2012-04-22T23:37:30Z
+ Purpose: The Global and localizable strings for this addon
+ Credits: Code written by Vandesdelca32
+
+ Copyright (C) 2011 Vandesdelca32
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+------------------------------------------------------------------------
+]]
+
+-- Import the addon table
+local addonName, Engine = ...
+
+-- This is called if a localization can't be found for that key
+local function notFound(t,k)
+ return tostring("§c" .. k .. "§r")
+end
+
+-- Get and load a localization
+local function GetL()
+ -- Store this temporarily
+ local rv
+ if not GTLocale["Get_"..GetLocale().."_Strings"] then
+ rv = GTLocale.Get_enUS_Strings()
+ else
+ rv = GTLocale["Get_"..GetLocale().."_Strings"]()
+ end
+ return setmetatable(rv, {__index=notFound})
+end
+
+-- BITCH, WHY DOESN'T THIS FUCKING WORK?!
+local L = GetL()
+
+-- Initialize the addon:
+Engine[1] = {}
+LibStub:GetLibrary("LibVan32-1.0"):Embed(Engine[1], "GuildTithe")
+Engine[2] = L
+
+
+_G[addonName] = Engine
diff --git a/GuildTithe.toc b/GuildTithe.toc
new file mode 100644
index 0000000..cfb05aa
--- /dev/null
+++ b/GuildTithe.toc
@@ -0,0 +1,25 @@
+## Author: Vandesdelca32
+## Interface: 60000
+## Notes: Implements a guild bank tithe, allowing you to auto-deposit a percentage of your income (from various sources) into the guild bank. Originally written by botono9, this version contains much-needed code updates.
+## SavedVariablesPerCharacter: GuildTithe_SavedDB
+## Title: GuildTithe
+## Version: release_v2.5.15
+## OptionalDeps: ElvUI
+## Author: Vandesdelca32
+## X-OriginalAuthor: botono9
+## X-Curse-Packaged-Version: release_v2.5.15
+## X-Curse-Project-Name: Guild Tithe
+## X-Curse-Project-ID: guild-tithe
+## X-Curse-Repository-ID: wow/guild-tithe/mainline
+
+#Libraries
+embeds.xml
+
+#Actual Code
+Locale\loadLocales.xml
+GlobalStrings.lua
+
+Core.lua
+GuildTitheFrames.xml
+
+
diff --git a/GuildTitheFrameScripts.lua b/GuildTitheFrameScripts.lua
new file mode 100644
index 0000000..234d87f
--- /dev/null
+++ b/GuildTitheFrameScripts.lua
@@ -0,0 +1,339 @@
+--[[
+------------------------------------------------------------------------
+ Project: GuildTithe
+ File: Frame scripts rev. 118
+ Date: 2014-10-17T00:50:40Z
+ Purpose: Miscellaneous Frame Scripts.
+ Credits: Code written by Vandesdelca32
+
+ Copyright (C) 2011 Vandesdelca32
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+------------------------------------------------------------------------
+]]
+local E, L = unpack(select(2, ...))
+
+-- Skin the frames to look like ElvUI's frames, if it's available
+function E:SkinFrames()
+ if not ElvUI or not GuildTithe_SavedDB.SkinElvUI then return end
+ local ElvEngine, ElvLocale, ElvProfile, ElvGlobal = unpack(ElvUI)
+
+ local S = ElvEngine:GetModule("Skins")
+
+ local fList = {
+ "GT_MiniTitheFrame",
+ "GT_OptionsFrame",
+ --"GT_OptionsFrame_Title",
+ "GT_OptionsFrame_Seperator",
+ }
+ local chbList = {
+ "GT_OptionsFrame_QuestOptions_Check",
+ "GT_OptionsFrame_LootOptions_Check",
+ "GT_OptionsFrame_MerchantOptions_Check",
+ "GT_OptionsFrame_MailOptions_Check",
+ "GT_OptionsFrame_TradeOptions_Check",
+ "GT_OptionsFrame_Seperator_ExtraOption1",
+ "GT_OptionsFrame_Seperator_ExtraOption2",
+ "GT_OptionsFrame_Seperator_ExtraOption3",
+ "GT_OptionsFrame_Seperator_ExtraOption4",
+ }
+ local sbList = {
+ "GT_OptionsFrame_QuestOptions_Slider",
+ "GT_OptionsFrame_LootOptions_Slider",
+ "GT_OptionsFrame_MerchantOptions_Slider",
+ "GT_OptionsFrame_MailOptions_Slider",
+ "GT_OptionsFrame_TradeOptions_Slider",
+ }
+ local ebList = {
+ "GT_OptionsFrame_QuestOptions_Text",
+ "GT_OptionsFrame_LootOptions_Text",
+ "GT_OptionsFrame_MerchantOptions_Text",
+ "GT_OptionsFrame_MailOptions_Text",
+ "GT_OptionsFrame_TradeOptions_Text",
+ }
+
+ -- Here's where the magic happens
+ for _, v in pairs(fList) do
+ _G[v]:SetTemplate("Transparent")
+ end
+ -- Tweak the frames
+ GT_OptionsFrame_Title:StripTextures()
+ GT_OptionsFrame:SetHeight(292)
+ GT_OptionsFrame:SetWidth(420)
+ GT_MiniTitheFrame.CurrentTithe:Point("BOTTOM", GT_MiniTitheFrame, "BOTTOM", 0, -1)
+
+ -- Close button
+ S:HandleCloseButton(GT_OptionsFrame_CloseButton, GT_OptionsFrame)
+ S:HandleCloseButton(GT_MiniTitheFrame_Close, GT_MiniTitheFrame)
+
+ -- Check Buttons
+ for _, v in pairs(chbList) do
+ S:HandleCheckBox(_G[v])
+ _G[v]:SetSize(24, 24)
+ end
+
+ -- Sliders. These need special handling, they need the thumbs resized or else it will make them HUUUUGE
+ for _, v in pairs(sbList) do
+ S:HandleSliderFrame(_G[v])
+ _G[v]:SetHeight(12)
+ _G[v]:GetThumbTexture():SetSize(10, 14)
+ _G[v .. "Low"]:Point("TOPLEFT", _G[v], "BOTTOMLEFT", 0, -2)
+ _G[v .. "High"]:Point("TOPRIGHT", _G[v], "BOTTOMRIGHT", 0, -2)
+ end
+
+ -- EditBoxes:
+ for _, v in pairs(ebList) do
+ S:HandleEditBox(_G[v])
+ _G[v]:SetHeight(20)
+ end
+
+
+ -- Mark the addon as skinned
+ E.ElvSkinned = true
+end
+
+-- The script called by the template, used to keep the edit box in check
+function E.FrameScript_EditBoxOnEnterPressed(self)
+ -- Get the text
+ local num = self:GetText()
+
+ -- Check to see if the user put a % sign in, because the field implies it is there.
+ if strfind(num, "%%") then return end
+
+ num = tonumber(num)
+ if not num then return end
+ if num < 1 then
+ num = 1
+ self:SetText("1")
+ elseif num > 100 then
+ num = 100
+ self:SetText("100")
+ end
+ self:GetParent().Slider:SetValue(num)
+ self:ClearFocus()
+end
+
+function E.FrameScript_UpdateOptionRow(self)
+ if not self:GetChecked() then
+ self:GetParent().Text:Disable();
+ self:GetParent().Slider:Disable();
+ PlaySound(857)
+ else
+ self:GetParent().Slider:Enable();
+ self:GetParent().Text:Enable();
+ PlaySound(856)
+ end
+end
+
+function E.FrameScript_OptionRowChangeState(self, state)
+ if not E.ElvSkinned then
+ if state == "DISABLE" then
+ self:GetThumbTexture():SetVertexColor(0.5, 0.5, 0.5)
+ _G[self:GetName() .. "Low"]:SetFontObject(GameFontDisableSmall)
+ _G[self:GetName() .. "High"]:SetFontObject(GameFontDisableSmall)
+ elseif state == "ENABLE" then
+ self:GetThumbTexture():SetVertexColor(1, 1, 1)
+ _G[self:GetName() .. "Low"]:SetFontObject(GameFontHighlightSmall)
+ _G[self:GetName() .. "High"]:SetFontObject(GameFontHighlightSmall)
+ else
+ return
+ end
+ else
+ -- Need a different method for this if we're skinning it through ElvUI
+ if state == "DISABLE" then
+ self:GetThumbTexture():Hide()
+ _G[self:GetName() .. "Low"]:SetFontObject(GameFontDisableSmall)
+ _G[self:GetName() .. "High"]:SetFontObject(GameFontDisableSmall)
+ elseif state == "ENABLE" then
+ self:GetThumbTexture():Show()
+ _G[self:GetName() .. "Low"]:SetFontObject(GameFontHighlightSmall)
+ _G[self:GetName() .. "High"]:SetFontObject(GameFontHighlightSmall)
+ end
+ end
+end
+
+function E.FrameScript_MiniTitheFrameOnLoad(self)
+ self:RegisterForDrag("LeftButton")
+ self.Label1:SetText(L.MiniFrameCurrentTitheText)
+end
+
+
+function E.FrameScript_MiniTitheFrameOnClick(self, button)
+ E:PrintDebug("MiniFrame OnClick()")
+ if IsAddOnLoaded("Blizzard_GuildBankUI") and GuildBankFrame:IsVisible() then
+ E:DepositTithe(1)
+ elseif SendMailFrame:IsVisible() then
+ E:DepositTithe(1,1)
+ else
+ if GuildTithe_SavedDB.Spammy then
+ E:PrintMessage(L.ChatNoValidDeposits, true)
+ end
+ end
+end
+
+-- Load the localization-specific strings
+function E.LoadOptionsFrame(self)
+ -- Set the strings
+ self.Title.Text:SetText(L.OptionsTitle)
+ self.Info.text:SetText(L.OptionsExtraText)
+ self.Version.text:SetText(format(L.OptionsVersionText, E:GetVerString()))
+
+ --Set the row's text here.
+ self.QuestOptions.Check.text:SetText(L.OptionsQuestText)
+ self.LootOptions.Check.text:SetText(L.OptionsLootText)
+ self.MerchantOptions.Check.text:SetText(L.OptionsMerchantText)
+ self.MailOptions.Check.text:SetText(L.OptionsMailText)
+ self.TradeOptions.Check.text:SetText(L.OptionsTradeText)
+
+ -- Extra Options
+ self.Extra.AutoDeposit.text:SetText(L.OptionsAutoDeposit)
+ self.Extra.AutoDeposit.text:SetFontObject(GameFontHighlight)
+
+ self.Extra.Spammy.text:SetText(L.OptionsSpammy)
+ self.Extra.Spammy.text:SetFontObject(GameFontHighlight)
+
+ self.Extra.Debug.text:SetText(L.OptionsDebug)
+
+ if ElvUI then
+ self.Extra.SkinElv:Show()
+ self.Extra.SkinElv.text:SetText(L.OptionsElvSkin)
+ self.Extra.SkinElv.text:SetFontObject(GameFontHighlight)
+ else
+ self.Extra.SkinElv:Hide()
+ end
+end
+
+-- Show the user thier options when they open the form.
+function E.UpdateOptions(self)
+ -- load options
+ -- Quests?
+ if (GuildTithe_SavedDB.CollectSource.Quest
+ and GuildTithe_SavedDB.CollectSource.Quest ~= -1) then
+ self.QuestOptions.Check:SetChecked(1)
+ self.QuestOptions.Slider:SetValue(GuildTithe_SavedDB.CollectSource.Quest)
+ else
+ self.QuestOptions.Check:SetChecked(false)
+ self.QuestOptions.Slider:SetValue(20)
+ end
+
+ -- Loot?
+ if (GuildTithe_SavedDB.CollectSource.Loot
+ and GuildTithe_SavedDB.CollectSource.Loot ~= -1) then
+ self.LootOptions.Check:SetChecked(true)
+ self.LootOptions.Slider:SetValue(GuildTithe_SavedDB.CollectSource.Loot)
+ else
+ self.LootOptions.Check:SetChecked(false)
+ self.LootOptions.Slider:SetValue(20)
+ end
+
+ -- Merchant?
+ if (GuildTithe_SavedDB.CollectSource.Merchant
+ and GuildTithe_SavedDB.CollectSource.Merchant ~= -1) then
+ self.MerchantOptions.Check:SetChecked(true)
+ self.MerchantOptions.Slider:SetValue(GuildTithe_SavedDB.CollectSource.Merchant)
+ else
+ self.MerchantOptions.Check:SetChecked(false)
+ self.MerchantOptions.Slider:SetValue(20)
+ end
+
+ -- Mail?
+ if (GuildTithe_SavedDB.CollectSource.Mail
+ and GuildTithe_SavedDB.CollectSource.Mail ~= -1) then
+ self.MailOptions.Check:SetChecked(true)
+ self.MailOptions.Slider:SetValue(GuildTithe_SavedDB.CollectSource.Mail)
+ else
+ self.MailOptions.Check:SetChecked(false)
+ self.MailOptions.Slider:SetValue(20)
+ end
+
+ -- Trade?
+ if (GuildTithe_SavedDB.CollectSource.Trade
+ and GuildTithe_SavedDB.CollectSource.Trade ~= -1) then
+ self.TradeOptions.Check:SetChecked(true)
+ self.TradeOptions.Slider:SetValue(GuildTithe_SavedDB.CollectSource.Trade)
+ else
+ self.TradeOptions.Check:SetChecked(false)
+ self.TradeOptions.Slider:SetValue(20)
+ end
+
+ -- Misc options
+ self.Extra.AutoDeposit:SetChecked(GuildTithe_SavedDB.AutoDeposit)
+ self.Extra.Spammy:SetChecked(GuildTithe_SavedDB.Spammy)
+ self.Extra.Debug:SetChecked(E._DebugMode)
+ self.Extra.SkinElv:SetChecked(GuildTithe_SavedDB.SkinElvUI)
+
+ -- Total Tithe
+ self.TotalTithe.text:SetFormattedText(L.OptionsTotalTitheText, GetCoinTextureString(GuildTithe_SavedDB.TotalTithe))
+
+ -- Force the frame to properly update state.
+ E.FrameScript_UpdateOptionRow(self.QuestOptions.Check)
+ E.FrameScript_UpdateOptionRow(self.LootOptions.Check)
+ E.FrameScript_UpdateOptionRow(self.MerchantOptions.Check)
+ E.FrameScript_UpdateOptionRow(self.MailOptions.Check)
+ E.FrameScript_UpdateOptionRow(self.TradeOptions.Check)
+ PlaySound(850)
+end
+
+-- Save the config when the user closes the form.
+function E.SaveOptions(self)
+ local GuildTithe_SavedDB = GuildTithe_SavedDB
+
+ -- Inc tedium, we're setting the option to the value, or -1 if the check isn't set.
+ -- Quest
+ if self.QuestOptions.Check:GetChecked() then
+ GuildTithe_SavedDB["CollectSource"]["Quest"] = self.QuestOptions.Slider:GetValue()
+ else
+ GuildTithe_SavedDB["CollectSource"]["Quest"] = -1
+ end
+
+ -- Loot
+ if self.LootOptions.Check:GetChecked() then
+ GuildTithe_SavedDB["CollectSource"]["Loot"] = self.LootOptions.Slider:GetValue()
+ else
+ GuildTithe_SavedDB["CollectSource"]["Loot"] = -1
+ end
+
+ -- Mail
+ if self.MailOptions.Check:GetChecked() then
+ GuildTithe_SavedDB["CollectSource"]["Mail"] = self.MailOptions.Slider:GetValue()
+ else
+ GuildTithe_SavedDB["CollectSource"]["Mail"] = -1
+ end
+
+ -- Merchant
+ if self.MerchantOptions.Check:GetChecked() then
+ GuildTithe_SavedDB["CollectSource"]["Merchant"] = self.MerchantOptions.Slider:GetValue()
+ else
+ GuildTithe_SavedDB["CollectSource"]["Merchant"] = -1
+ end
+
+ -- Trade
+ if self.TradeOptions.Check:GetChecked() then
+ GuildTithe_SavedDB["CollectSource"]["Trade"] = self.TradeOptions.Slider:GetValue()
+ else
+ GuildTithe_SavedDB["CollectSource"]["Trade"] = -1
+ end
+
+ GuildTithe_SavedDB["AutoDeposit"] = self.Extra.AutoDeposit:GetChecked()
+ GuildTithe_SavedDB["Spammy"] = self.Extra.Spammy:GetChecked()
+ GuildTithe_SavedDB["SkinElvUI"] = self.Extra.SkinElv:GetChecked()
+ -- DebugMode is never saved, but update the user's choice:
+ if self.Extra.Debug:GetChecked() then
+ E._DebugMode = true
+ else
+ E._DebugMode = false
+ end
+ PlaySound(851)
+end
+
diff --git a/GuildTitheFrames.xml b/GuildTitheFrames.xml
new file mode 100644
index 0000000..e4e723f
--- /dev/null
+++ b/GuildTitheFrames.xml
@@ -0,0 +1,404 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ self.text:SetFontObject(GameFontHighlight)
+ GuildTithe[1].FrameScript_UpdateOptionRow(self, button)
+
+
+
+
+
+
+
+
+
+
+
+ EditBox_HighlightText(self);
+ self:SetNumber(self:GetParent().Slider:GetValue())
+
+
+ EditBox_ClearHighlight(self);
+ if not strfind(self:GetText(), "%%") then
+ self:SetText(self:GetText() .. "%")
+ end
+
+ GuildTithe[1].FrameScript_EditBoxOnEnterPressed(self)
+ self:ClearFocus()
+ self:SetFontObject(ChatFontDisable)
+ self:SetFontObject(ChatFontNormal)
+
+
+
+
+
+
+
+
+
+
+
+
+ _G[self:GetName() .. "Low"]:SetText("1%")
+ _G[self:GetName() .. "High"]:SetText("100%")
+
+
+ self:GetParent().Text:ClearFocus()
+ self:GetParent().Text:SetText(tostring(value) .. "%")
+
+
+ GuildTithe[1].FrameScript_OptionRowChangeState(self, "DISABLE")
+
+
+ GuildTithe[1].FrameScript_OptionRowChangeState(self, "ENABLE")
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ self:RegisterForDrag("LeftButton");
+ self:GetParent():StartMoving();
+ self:GetParent():StopMovingOrSizing();
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ if not self:GetChecked() then
+ PlaySound(857)
+ else
+ PlaySound(856)
+ end
+
+
+
+
+
+
+
+
+
+
+ if not self:GetChecked() then
+ PlaySound(857)
+ else
+ PlaySound(856)
+ end
+
+
+
+
+
+
+
+
+
+
+
+
+
+ self.text:SetFontObject(GameFontHighlightSmall)
+
+ if not self:GetChecked() then
+ PlaySound(857)
+ else
+ PlaySound(856)
+ end
+
+
+
+
+
+
+
+
+
+
+
+
+ if not self:GetChecked() then
+ PlaySound(857)
+ else
+ PlaySound(856)
+ end
+ StaticPopup_Show("GUILDTITHE_SKINRELOADWARNING")
+
+
+
+
+
+
+
+
+ GuildTithe[1].LoadOptionsFrame(self)
+ GuildTithe[1].UpdateOptions(self)
+ GuildTithe[1].SaveOptions(self)
+
+
+
+
+
+
+
+
+
+ GuildTithe_OnLoad(self)
+
+
+
+
\ No newline at end of file
diff --git a/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua b/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua
new file mode 100644
index 0000000..2a64013
--- /dev/null
+++ b/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua
@@ -0,0 +1,238 @@
+--[[ $Id: CallbackHandler-1.0.lua 18 2014-10-16 02:52:20Z mikk $ ]]
+local MAJOR, MINOR = "CallbackHandler-1.0", 6
+local CallbackHandler = LibStub:NewLibrary(MAJOR, MINOR)
+
+if not CallbackHandler then return end -- No upgrade needed
+
+local meta = {__index = function(tbl, key) tbl[key] = {} return tbl[key] end}
+
+-- Lua APIs
+local tconcat = table.concat
+local assert, error, loadstring = assert, error, loadstring
+local setmetatable, rawset, rawget = setmetatable, rawset, rawget
+local next, select, pairs, type, tostring = next, select, pairs, type, tostring
+
+-- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
+-- List them here for Mikk's FindGlobals script
+-- GLOBALS: geterrorhandler
+
+local xpcall = xpcall
+
+local function errorhandler(err)
+ return geterrorhandler()(err)
+end
+
+local function CreateDispatcher(argCount)
+ local code = [[
+ local next, xpcall, eh = ...
+
+ local method, ARGS
+ local function call() method(ARGS) end
+
+ local function dispatch(handlers, ...)
+ local index
+ index, method = next(handlers)
+ if not method then return end
+ local OLD_ARGS = ARGS
+ ARGS = ...
+ repeat
+ xpcall(call, eh)
+ index, method = next(handlers, index)
+ until not method
+ ARGS = OLD_ARGS
+ end
+
+ return dispatch
+ ]]
+
+ local ARGS, OLD_ARGS = {}, {}
+ for i = 1, argCount do ARGS[i], OLD_ARGS[i] = "arg"..i, "old_arg"..i end
+ code = code:gsub("OLD_ARGS", tconcat(OLD_ARGS, ", ")):gsub("ARGS", tconcat(ARGS, ", "))
+ return assert(loadstring(code, "safecall Dispatcher["..argCount.."]"))(next, xpcall, errorhandler)
+end
+
+local Dispatchers = setmetatable({}, {__index=function(self, argCount)
+ local dispatcher = CreateDispatcher(argCount)
+ rawset(self, argCount, dispatcher)
+ return dispatcher
+end})
+
+--------------------------------------------------------------------------
+-- CallbackHandler:New
+--
+-- target - target object to embed public APIs in
+-- RegisterName - name of the callback registration API, default "RegisterCallback"
+-- UnregisterName - name of the callback unregistration API, default "UnregisterCallback"
+-- UnregisterAllName - name of the API to unregister all callbacks, default "UnregisterAllCallbacks". false == don't publish this API.
+
+function CallbackHandler:New(target, RegisterName, UnregisterName, UnregisterAllName)
+
+ RegisterName = RegisterName or "RegisterCallback"
+ UnregisterName = UnregisterName or "UnregisterCallback"
+ if UnregisterAllName==nil then -- false is used to indicate "don't want this method"
+ UnregisterAllName = "UnregisterAllCallbacks"
+ end
+
+ -- we declare all objects and exported APIs inside this closure to quickly gain access
+ -- to e.g. function names, the "target" parameter, etc
+
+
+ -- Create the registry object
+ local events = setmetatable({}, meta)
+ local registry = { recurse=0, events=events }
+
+ -- registry:Fire() - fires the given event/message into the registry
+ function registry:Fire(eventname, ...)
+ if not rawget(events, eventname) or not next(events[eventname]) then return end
+ local oldrecurse = registry.recurse
+ registry.recurse = oldrecurse + 1
+
+ Dispatchers[select('#', ...) + 1](events[eventname], eventname, ...)
+
+ registry.recurse = oldrecurse
+
+ if registry.insertQueue and oldrecurse==0 then
+ -- Something in one of our callbacks wanted to register more callbacks; they got queued
+ for eventname,callbacks in pairs(registry.insertQueue) do
+ local first = not rawget(events, eventname) or not next(events[eventname]) -- test for empty before. not test for one member after. that one member may have been overwritten.
+ for self,func in pairs(callbacks) do
+ events[eventname][self] = func
+ -- fire OnUsed callback?
+ if first and registry.OnUsed then
+ registry.OnUsed(registry, target, eventname)
+ first = nil
+ end
+ end
+ end
+ registry.insertQueue = nil
+ end
+ end
+
+ -- Registration of a callback, handles:
+ -- self["method"], leads to self["method"](self, ...)
+ -- self with function ref, leads to functionref(...)
+ -- "addonId" (instead of self) with function ref, leads to functionref(...)
+ -- all with an optional arg, which, if present, gets passed as first argument (after self if present)
+ target[RegisterName] = function(self, eventname, method, ... --[[actually just a single arg]])
+ if type(eventname) ~= "string" then
+ error("Usage: "..RegisterName.."(eventname, method[, arg]): 'eventname' - string expected.", 2)
+ end
+
+ method = method or eventname
+
+ local first = not rawget(events, eventname) or not next(events[eventname]) -- test for empty before. not test for one member after. that one member may have been overwritten.
+
+ if type(method) ~= "string" and type(method) ~= "function" then
+ error("Usage: "..RegisterName.."(\"eventname\", \"methodname\"): 'methodname' - string or function expected.", 2)
+ end
+
+ local regfunc
+
+ if type(method) == "string" then
+ -- self["method"] calling style
+ if type(self) ~= "table" then
+ error("Usage: "..RegisterName.."(\"eventname\", \"methodname\"): self was not a table?", 2)
+ elseif self==target then
+ error("Usage: "..RegisterName.."(\"eventname\", \"methodname\"): do not use Library:"..RegisterName.."(), use your own 'self'", 2)
+ elseif type(self[method]) ~= "function" then
+ error("Usage: "..RegisterName.."(\"eventname\", \"methodname\"): 'methodname' - method '"..tostring(method).."' not found on self.", 2)
+ end
+
+ if select("#",...)>=1 then -- this is not the same as testing for arg==nil!
+ local arg=select(1,...)
+ regfunc = function(...) self[method](self,arg,...) end
+ else
+ regfunc = function(...) self[method](self,...) end
+ end
+ else
+ -- function ref with self=object or self="addonId" or self=thread
+ if type(self)~="table" and type(self)~="string" and type(self)~="thread" then
+ error("Usage: "..RegisterName.."(self or \"addonId\", eventname, method): 'self or addonId': table or string or thread expected.", 2)
+ end
+
+ if select("#",...)>=1 then -- this is not the same as testing for arg==nil!
+ local arg=select(1,...)
+ regfunc = function(...) method(arg,...) end
+ else
+ regfunc = method
+ end
+ end
+
+
+ if events[eventname][self] or registry.recurse<1 then
+ -- if registry.recurse<1 then
+ -- we're overwriting an existing entry, or not currently recursing. just set it.
+ events[eventname][self] = regfunc
+ -- fire OnUsed callback?
+ if registry.OnUsed and first then
+ registry.OnUsed(registry, target, eventname)
+ end
+ else
+ -- we're currently processing a callback in this registry, so delay the registration of this new entry!
+ -- yes, we're a bit wasteful on garbage, but this is a fringe case, so we're picking low implementation overhead over garbage efficiency
+ registry.insertQueue = registry.insertQueue or setmetatable({},meta)
+ registry.insertQueue[eventname][self] = regfunc
+ end
+ end
+
+ -- Unregister a callback
+ target[UnregisterName] = function(self, eventname)
+ if not self or self==target then
+ error("Usage: "..UnregisterName.."(eventname): bad 'self'", 2)
+ end
+ if type(eventname) ~= "string" then
+ error("Usage: "..UnregisterName.."(eventname): 'eventname' - string expected.", 2)
+ end
+ if rawget(events, eventname) and events[eventname][self] then
+ events[eventname][self] = nil
+ -- Fire OnUnused callback?
+ if registry.OnUnused and not next(events[eventname]) then
+ registry.OnUnused(registry, target, eventname)
+ end
+ end
+ if registry.insertQueue and rawget(registry.insertQueue, eventname) and registry.insertQueue[eventname][self] then
+ registry.insertQueue[eventname][self] = nil
+ end
+ end
+
+ -- OPTIONAL: Unregister all callbacks for given selfs/addonIds
+ if UnregisterAllName then
+ target[UnregisterAllName] = function(...)
+ if select("#",...)<1 then
+ error("Usage: "..UnregisterAllName.."([whatFor]): missing 'self' or \"addonId\" to unregister events for.", 2)
+ end
+ if select("#",...)==1 and ...==target then
+ error("Usage: "..UnregisterAllName.."([whatFor]): supply a meaningful 'self' or \"addonId\"", 2)
+ end
+
+
+ for i=1,select("#",...) do
+ local self = select(i,...)
+ if registry.insertQueue then
+ for eventname, callbacks in pairs(registry.insertQueue) do
+ if callbacks[self] then
+ callbacks[self] = nil
+ end
+ end
+ end
+ for eventname, callbacks in pairs(events) do
+ if callbacks[self] then
+ callbacks[self] = nil
+ -- Fire OnUnused callback?
+ if registry.OnUnused and not next(callbacks) then
+ registry.OnUnused(registry, target, eventname)
+ end
+ end
+ end
+ end
+ end
+ end
+
+ return registry
+end
+
+
+-- CallbackHandler purposefully does NOT do explicit embedding. Nor does it
+-- try to upgrade old implicit embeds since the system is selfcontained and
+-- relies on closures to work.
+
diff --git a/Libs/CallbackHandler-1.0/CallbackHandler-1.0.xml b/Libs/CallbackHandler-1.0/CallbackHandler-1.0.xml
new file mode 100644
index 0000000..876df83
--- /dev/null
+++ b/Libs/CallbackHandler-1.0/CallbackHandler-1.0.xml
@@ -0,0 +1,4 @@
+
+
+
\ No newline at end of file
diff --git a/Libs/LibDataBroker-1.1/LibDataBroker-1.1.lua b/Libs/LibDataBroker-1.1/LibDataBroker-1.1.lua
new file mode 100644
index 0000000..f47c0cd
--- /dev/null
+++ b/Libs/LibDataBroker-1.1/LibDataBroker-1.1.lua
@@ -0,0 +1,90 @@
+
+assert(LibStub, "LibDataBroker-1.1 requires LibStub")
+assert(LibStub:GetLibrary("CallbackHandler-1.0", true), "LibDataBroker-1.1 requires CallbackHandler-1.0")
+
+local lib, oldminor = LibStub:NewLibrary("LibDataBroker-1.1", 4)
+if not lib then return end
+oldminor = oldminor or 0
+
+
+lib.callbacks = lib.callbacks or LibStub:GetLibrary("CallbackHandler-1.0"):New(lib)
+lib.attributestorage, lib.namestorage, lib.proxystorage = lib.attributestorage or {}, lib.namestorage or {}, lib.proxystorage or {}
+local attributestorage, namestorage, callbacks = lib.attributestorage, lib.namestorage, lib.callbacks
+
+if oldminor < 2 then
+ lib.domt = {
+ __metatable = "access denied",
+ __index = function(self, key) return attributestorage[self] and attributestorage[self][key] end,
+ }
+end
+
+if oldminor < 3 then
+ lib.domt.__newindex = function(self, key, value)
+ if not attributestorage[self] then attributestorage[self] = {} end
+ if attributestorage[self][key] == value then return end
+ attributestorage[self][key] = value
+ local name = namestorage[self]
+ if not name then return end
+ callbacks:Fire("LibDataBroker_AttributeChanged", name, key, value, self)
+ callbacks:Fire("LibDataBroker_AttributeChanged_"..name, name, key, value, self)
+ callbacks:Fire("LibDataBroker_AttributeChanged_"..name.."_"..key, name, key, value, self)
+ callbacks:Fire("LibDataBroker_AttributeChanged__"..key, name, key, value, self)
+ end
+end
+
+if oldminor < 2 then
+ function lib:NewDataObject(name, dataobj)
+ if self.proxystorage[name] then return end
+
+ if dataobj then
+ assert(type(dataobj) == "table", "Invalid dataobj, must be nil or a table")
+ self.attributestorage[dataobj] = {}
+ for i,v in pairs(dataobj) do
+ self.attributestorage[dataobj][i] = v
+ dataobj[i] = nil
+ end
+ end
+ dataobj = setmetatable(dataobj or {}, self.domt)
+ self.proxystorage[name], self.namestorage[dataobj] = dataobj, name
+ self.callbacks:Fire("LibDataBroker_DataObjectCreated", name, dataobj)
+ return dataobj
+ end
+end
+
+if oldminor < 1 then
+ function lib:DataObjectIterator()
+ return pairs(self.proxystorage)
+ end
+
+ function lib:GetDataObjectByName(dataobjectname)
+ return self.proxystorage[dataobjectname]
+ end
+
+ function lib:GetNameByDataObject(dataobject)
+ return self.namestorage[dataobject]
+ end
+end
+
+if oldminor < 4 then
+ local next = pairs(attributestorage)
+ function lib:pairs(dataobject_or_name)
+ local t = type(dataobject_or_name)
+ assert(t == "string" or t == "table", "Usage: ldb:pairs('dataobjectname') or ldb:pairs(dataobject)")
+
+ local dataobj = self.proxystorage[dataobject_or_name] or dataobject_or_name
+ assert(attributestorage[dataobj], "Data object not found")
+
+ return next, attributestorage[dataobj], nil
+ end
+
+ local ipairs_iter = ipairs(attributestorage)
+ function lib:ipairs(dataobject_or_name)
+ local t = type(dataobject_or_name)
+ assert(t == "string" or t == "table", "Usage: ldb:ipairs('dataobjectname') or ldb:ipairs(dataobject)")
+
+ local dataobj = self.proxystorage[dataobject_or_name] or dataobject_or_name
+ assert(attributestorage[dataobj], "Data object not found")
+
+ return ipairs_iter, attributestorage[dataobj], 0
+ end
+end
diff --git a/Libs/LibStub/LibStub.lua b/Libs/LibStub/LibStub.lua
new file mode 100644
index 0000000..7e9b5cd
--- /dev/null
+++ b/Libs/LibStub/LibStub.lua
@@ -0,0 +1,51 @@
+-- $Id: LibStub.lua 103 2014-10-16 03:02:50Z mikk $
+-- LibStub is a simple versioning stub meant for use in Libraries. http://www.wowace.com/addons/libstub/ for more info
+-- LibStub is hereby placed in the Public Domain
+-- Credits: Kaelten, Cladhaire, ckknight, Mikk, Ammo, Nevcairiel, joshborke
+local LIBSTUB_MAJOR, LIBSTUB_MINOR = "LibStub", 2 -- NEVER MAKE THIS AN SVN REVISION! IT NEEDS TO BE USABLE IN ALL REPOS!
+local LibStub = _G[LIBSTUB_MAJOR]
+
+-- Check to see is this version of the stub is obsolete
+if not LibStub or LibStub.minor < LIBSTUB_MINOR then
+ LibStub = LibStub or {libs = {}, minors = {} }
+ _G[LIBSTUB_MAJOR] = LibStub
+ LibStub.minor = LIBSTUB_MINOR
+
+ -- LibStub:NewLibrary(major, minor)
+ -- major (string) - the major version of the library
+ -- minor (string or number ) - the minor version of the library
+ --
+ -- returns nil if a newer or same version of the lib is already present
+ -- returns empty library object or old library object if upgrade is needed
+ function LibStub:NewLibrary(major, minor)
+ assert(type(major) == "string", "Bad argument #2 to `NewLibrary' (string expected)")
+ minor = assert(tonumber(strmatch(minor, "%d+")), "Minor version must either be a number or contain a number.")
+
+ local oldminor = self.minors[major]
+ if oldminor and oldminor >= minor then return nil end
+ self.minors[major], self.libs[major] = minor, self.libs[major] or {}
+ return self.libs[major], oldminor
+ end
+
+ -- LibStub:GetLibrary(major, [silent])
+ -- major (string) - the major version of the library
+ -- silent (boolean) - if true, library is optional, silently return nil if its not found
+ --
+ -- throws an error if the library can not be found (except silent is set)
+ -- returns the library object if found
+ function LibStub:GetLibrary(major, silent)
+ if not self.libs[major] and not silent then
+ error(("Cannot find a library instance of %q."):format(tostring(major)), 2)
+ end
+ return self.libs[major], self.minors[major]
+ end
+
+ -- LibStub:IterateLibraries()
+ --
+ -- Returns an iterator for the currently registered libraries
+ function LibStub:IterateLibraries()
+ return pairs(self.libs)
+ end
+
+ setmetatable(LibStub, { __call = LibStub.GetLibrary })
+end
diff --git a/Libs/LibStub/LibStub.toc b/Libs/LibStub/LibStub.toc
new file mode 100644
index 0000000..ac4a1c4
--- /dev/null
+++ b/Libs/LibStub/LibStub.toc
@@ -0,0 +1,13 @@
+## Interface: 60000
+## Title: Lib: LibStub
+## Notes: Universal Library Stub
+## Credits: Kaelten, Cladhaire, ckknight, Mikk, Ammo, Nevcairiel
+## X-Website: http://www.wowace.com/addons/libstub/
+## X-Category: Library
+## X-License: Public Domain
+## X-Curse-Packaged-Version: 1.0.2.60000
+## X-Curse-Project-Name: LibStub
+## X-Curse-Project-ID: libstub
+## X-Curse-Repository-ID: wow/libstub/mainline
+
+LibStub.lua
diff --git a/Libs/LibStub/tests/test.lua b/Libs/LibStub/tests/test.lua
new file mode 100644
index 0000000..276ddab
--- /dev/null
+++ b/Libs/LibStub/tests/test.lua
@@ -0,0 +1,41 @@
+debugstack = debug.traceback
+strmatch = string.match
+
+loadfile("../LibStub.lua")()
+
+local lib, oldMinor = LibStub:NewLibrary("Pants", 1) -- make a new thingy
+assert(lib) -- should return the library table
+assert(not oldMinor) -- should not return the old minor, since it didn't exist
+
+-- the following is to create data and then be able to check if the same data exists after the fact
+function lib:MyMethod()
+end
+local MyMethod = lib.MyMethod
+lib.MyTable = {}
+local MyTable = lib.MyTable
+
+local newLib, newOldMinor = LibStub:NewLibrary("Pants", 1) -- try to register a library with the same version, should silently fail
+assert(not newLib) -- should not return since out of date
+
+local newLib, newOldMinor = LibStub:NewLibrary("Pants", 0) -- try to register a library with a previous, should silently fail
+assert(not newLib) -- should not return since out of date
+
+local newLib, newOldMinor = LibStub:NewLibrary("Pants", 2) -- register a new version
+assert(newLib) -- library table
+assert(rawequal(newLib, lib)) -- should be the same reference as the previous
+assert(newOldMinor == 1) -- should return the minor version of the previous version
+
+assert(rawequal(lib.MyMethod, MyMethod)) -- verify that values were saved
+assert(rawequal(lib.MyTable, MyTable)) -- verify that values were saved
+
+local newLib, newOldMinor = LibStub:NewLibrary("Pants", "Blah 3 Blah") -- register a new version with a string minor version (instead of a number)
+assert(newLib) -- library table
+assert(newOldMinor == 2) -- previous version was 2
+
+local newLib, newOldMinor = LibStub:NewLibrary("Pants", "Blah 4 and please ignore 15 Blah") -- register a new version with a string minor version (instead of a number)
+assert(newLib)
+assert(newOldMinor == 3) -- previous version was 3 (even though it gave a string)
+
+local newLib, newOldMinor = LibStub:NewLibrary("Pants", 5) -- register a new library, using a normal number instead of a string
+assert(newLib)
+assert(newOldMinor == 4) -- previous version was 4 (even though it gave a string)
\ No newline at end of file
diff --git a/Libs/LibStub/tests/test2.lua b/Libs/LibStub/tests/test2.lua
new file mode 100644
index 0000000..eae7172
--- /dev/null
+++ b/Libs/LibStub/tests/test2.lua
@@ -0,0 +1,27 @@
+debugstack = debug.traceback
+strmatch = string.match
+
+loadfile("../LibStub.lua")()
+
+for major, library in LibStub:IterateLibraries() do
+ -- check that MyLib doesn't exist yet, by iterating through all the libraries
+ assert(major ~= "MyLib")
+end
+
+assert(not LibStub:GetLibrary("MyLib", true)) -- check that MyLib doesn't exist yet by direct checking
+assert(not pcall(LibStub.GetLibrary, LibStub, "MyLib")) -- don't silently fail, thus it should raise an error.
+local lib = LibStub:NewLibrary("MyLib", 1) -- create the lib
+assert(lib) -- check it exists
+assert(rawequal(LibStub:GetLibrary("MyLib"), lib)) -- verify that :GetLibrary("MyLib") properly equals the lib reference
+
+assert(LibStub:NewLibrary("MyLib", 2)) -- create a new version
+
+local count=0
+for major, library in LibStub:IterateLibraries() do
+ -- check that MyLib exists somewhere in the libraries, by iterating through all the libraries
+ if major == "MyLib" then -- we found it!
+ count = count +1
+ assert(rawequal(library, lib)) -- verify that the references are equal
+ end
+end
+assert(count == 1) -- verify that we actually found it, and only once
diff --git a/Libs/LibStub/tests/test3.lua b/Libs/LibStub/tests/test3.lua
new file mode 100644
index 0000000..30f7b94
--- /dev/null
+++ b/Libs/LibStub/tests/test3.lua
@@ -0,0 +1,14 @@
+debugstack = debug.traceback
+strmatch = string.match
+
+loadfile("../LibStub.lua")()
+
+local proxy = newproxy() -- non-string
+
+assert(not pcall(LibStub.NewLibrary, LibStub, proxy, 1)) -- should error, proxy is not a string, it's userdata
+local success, ret = pcall(LibStub.GetLibrary, proxy, true)
+assert(not success or not ret) -- either error because proxy is not a string or because it's not actually registered.
+
+assert(not pcall(LibStub.NewLibrary, LibStub, "Something", "No number in here")) -- should error, minor has no string in it.
+
+assert(not LibStub:GetLibrary("Something", true)) -- shouldn't've created it from the above statement
\ No newline at end of file
diff --git a/Libs/LibStub/tests/test4.lua b/Libs/LibStub/tests/test4.lua
new file mode 100644
index 0000000..43eb338
--- /dev/null
+++ b/Libs/LibStub/tests/test4.lua
@@ -0,0 +1,41 @@
+debugstack = debug.traceback
+strmatch = string.match
+
+loadfile("../LibStub.lua")()
+
+
+-- Pretend like loaded libstub is old and doesn't have :IterateLibraries
+assert(LibStub.minor)
+LibStub.minor = LibStub.minor - 0.0001
+LibStub.IterateLibraries = nil
+
+loadfile("../LibStub.lua")()
+
+assert(type(LibStub.IterateLibraries)=="function")
+
+
+-- Now pretend that we're the same version -- :IterateLibraries should NOT be re-created
+LibStub.IterateLibraries = 123
+
+loadfile("../LibStub.lua")()
+
+assert(LibStub.IterateLibraries == 123)
+
+
+-- Now pretend that a newer version is loaded -- :IterateLibraries should NOT be re-created
+LibStub.minor = LibStub.minor + 0.0001
+
+loadfile("../LibStub.lua")()
+
+assert(LibStub.IterateLibraries == 123)
+
+
+-- Again with a huge number
+LibStub.minor = LibStub.minor + 1234567890
+
+loadfile("../LibStub.lua")()
+
+assert(LibStub.IterateLibraries == 123)
+
+
+print("OK")
\ No newline at end of file
diff --git a/Libs/LibVan32-1.0/!LibVan32.toc b/Libs/LibVan32-1.0/!LibVan32.toc
new file mode 100644
index 0000000..16e9951
--- /dev/null
+++ b/Libs/LibVan32-1.0/!LibVan32.toc
@@ -0,0 +1,11 @@
+##Title: Lib|cffAF96FFVan32|r
+##Notes: Private Library, for use with Van32's Addons
+##Interface: 50100
+##Version: release_v1.6.6
+##Dependencies: LibStub
+## X-Curse-Packaged-Version: release_v1.6.6
+## X-Curse-Project-Name: LibVan32
+## X-Curse-Project-ID: libvan32
+## X-Curse-Repository-ID: wow/libvan32/mainline
+
+LibVan32.lua
\ No newline at end of file
diff --git a/Libs/LibVan32-1.0/LibVan32.lua b/Libs/LibVan32-1.0/LibVan32.lua
new file mode 100644
index 0000000..05a433a
--- /dev/null
+++ b/Libs/LibVan32-1.0/LibVan32.lua
@@ -0,0 +1,271 @@
+--[[
+------------------------------------------------------------------------
+ Project: LibVan32
+ File: Core, revision 69
+ Date: 2014-10-15T23:51:06Z
+ Purpose: Library for common addon functions
+ Credits: Code written by Vandesdelca32
+
+ Copyright (C) 2011-2012 Vandesdelca32
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+------------------------------------------------------------------------
+]]
+
+local MAJOR, MINOR = "LibVan32-1.0", tonumber("69")
+
+-- This is for debug builds
+if not MINOR then
+ MINOR = 9999
+else
+ MINOR = MINOR + 99
+end
+
+-- GLOBALS: DEFAULT_CHAT_FRAME
+-- index locals for faster lookups
+local pairs = pairs
+local strgsub = string.gsub
+local pcall, error, type, unpack = pcall, error, type, unpack
+
+local LibVan32, OLDMINOR = LibStub:NewLibrary(MAJOR, MINOR)
+
+if not LibVan32 then return end -- No upgrade needed
+
+-- Parse the $X Color codes from the PrintMessage function
+local function parseMessage(message)
+ if not message then return end
+ local cT = {
+ -- Color codes kindly borrowed from Minecraft!
+ ["§0"]="|cFF000000", -- Black
+ ["§1"]="|cFF0000A0", -- Dark Blue
+ ["§2"]="|cFF00A000", -- Dark Green
+ ["§3"]="|cFF00A0A0", -- Dark Aqua
+ ["§4"]="|cFFA00000", -- Dark Red
+ ["§5"]="|cFFA000A0", -- Purple
+ ["§6"]="|cFFF0A000", -- Gold
+ ["§7"]="|cFFA0A0A0", -- Grey
+ ["§8"]="|cFF505050", -- Dark Grey
+ ["§9"]="|cFF5050F0", -- Indigo
+ ["§a"]="|cFF50F050", -- Bright Green
+ ["§b"]="|cFF50F0F0", -- Aqua
+ ["§c"]="|cFFF05050", -- Red
+ ["§d"]="|cFFF050F0", -- Pink
+ ["§e"]="|cFFF0F050", -- Yellow
+ ["§f"]="|cFFF0F0F0", -- White
+ ["§r"]="|r", -- reset
+ ["§T"]="|cFFAF96FF", -- Title, (ltpurple)
+ ["#c"]="|cFF", -- custom color
+ --["§E"] = "|cFFff1919",
+
+ }
+ local str, newStr = message
+ for k, v in pairs(cT) do
+ newStr = strgsub(str, k, v)
+ str = newStr
+ end
+ return str
+end
+
+---Sets the default chat frame used to print messages.
+--@usage YourAddon:SetDefaultChatFrame(ChatFrame2)
+--@param ChatFrame The frame you want to send messages to. It MUST have an .AddMessage entry
+function LibVan32:SetDefaultChatFrame(chatFrame)
+ if chatFrame and (not chatFrame.AddMessage) then error("invalid chatFrame specified", 2) end
+
+ self._DefaultChatFrame = chatFrame
+end
+
+
+---Used to parse color-coded strings in the same way that PrintMessage does.\\
+-- Provides users with a way to easily color a dialog's strings in the same theme as the chat.
+--@usage string = YourAddon:ParseColorCodedString("string")
+--@param str The string that contains the color-codes.//(string)//
+--@return A string with library color codes replaced with the client's color escape sequence. (|cFFFFFFFF, for example)
+function LibVan32:ParseColorCodedString(str)
+ if type(str) ~= 'string' then error("bad argument #1 to \'ParseColorCodedString\', (string expected, got " .. type(str) ..")", 2) end
+ return parseMessage(str)
+end
+
+--- Prints a color-coded message to the default chat frame.\\
+--Supports Minecraft style escape sequences (§x), where x corresponds to a single hex digit. See library code for color conversions.\\
+--The message output is: title: [ERROR] message
+-- @usage YourAddon:PrintMessage("message", [isError], [isDebug], [chatFrame])
+-- @param message The message to print to the chat.//(string)//
+-- @param isError Whether or not to flag the message as an error.//(boolean)[optional]//
+-- @param isDebug Whether or not to flag the message as debug.//(boolean)[optional]//
+--@param chatFrame The Frame to send the message through. This frame needs to have an AddMessage method.//(Frame)[optional]//
+function LibVan32:PrintMessage(message, isError, isDebug, chatFrame)
+ if type(message) ~= 'string' then error("bad argument #1 to \'PrintMessage\', (string expected, got " .. type(message) ..")", 2) end
+
+ if chatFrame and (not chatFrame.AddMessage) then error("invalid chatFrame specified", 2) end
+
+ local oM = "§T" .. self._AddonRegisteredName .. "§r: "
+ local oF = (chatFrame or self._DefaultChatFrame) or DEFAULT_CHAT_FRAME
+
+ -- Check and append debug header
+ if isDebug then
+ if not self._DebugMode then return end
+ oM = oM .. "§8§r "
+ end
+
+ -- Check and add [ERROR] header
+ if isError then
+ oM = oM .. "§c[ERROR]§r "
+ end
+
+ -- Append the actual message
+ oM = oM .. message
+
+ -- Parse the color codes
+ return oF:AddMessage(parseMessage(oM))
+end
+
+---Prints a message that can only be seen when the calling addon is in debug mode.\\
+--This is the same as calling YourAddon:PrintMessage("message", isError, true)
+--@usage YourAddon:PrintDebug("message", [isError], [chatFrame])
+--@param message The message to print to the chat frame.//(string)//
+--@param isError Whether or not to flag the message as also being an error.//(boolean)[optional]//
+--@param chatFrame The Frame to send the message through. This frame needs to have an AddMessage method.//(Frame)[optional]//
+function LibVan32:PrintDebug(message, isError, chatFrame)
+ if type(message) ~= 'string' then error("bad argument #1 to \'PrintDebug\', (string expected, got " .. type(message) ..")", 2) end
+
+ return self:PrintMessage(message, isError, true, chatFrame)
+end
+
+---Prints a message that will be flagged to the user as an error.\\
+--This is the same as calling YourAddon:PrintMessage("message", true, isDebug)
+--@usage YourAddon:PrintErr("message", [isDebug], [chatFrame])
+--@param message The message to print to the chat frame.//(string)
+--@param isDebug Also mark this message as a debug message.//(boolean)[optional]//\\(It's prefferred that you call :PrintDebug("message", true) for this)
+--@param chatFrame The Frame object to send the message to.//(Frame)[optional]//\\The frame requires the AddMessage method.
+function LibVan32:PrintErr(message, isDebug, chatFrame)
+ if type(message) ~= 'string' then error("bad argument #1 to \'PrintError\', (string expected, got " .. type(message) ..")", 2) end
+
+ return self:PrintMessage(message, true, isDebug, chatFrame)
+end
+
+-- Timers Library
+LibVan32.timers = {}
+
+---Create a recurring or single-tick timer.\\
+-- For example: calling a function after 5 seconds, or updating a list of objects every half-second
+--@usage Timer = YourAddon:SetTimer(interval, callback, [recur, [uID]], [...])
+--@param interval The delay, in seconds, that you want before excecuting //callback//.//(float)//
+--@param callback The function to excecute when //interval// time has passed.//(function)//
+--@param recur Whether or not the timer will repeat each //interval// seconds.//(boolean)//
+--@param uID A Unique identifier assigned to a timer instance. You can use this, for instance, in a recursive function that iterates on a timer.//(anything)//\\Setting this field will deny creation of any new timers with the exact same uID. I reccomend using a string for this field, since it is global, however it will accept anything.
+--@param ... A list of arguments to pass to //callback//.//(vararg)//
+--@return The instance of the timer created, if successful, otherwise -1.
+function LibVan32:SetTimer(interval, callback, recur, uID, ...)
+ --Redundancy checks
+ if type(interval) ~= 'number' then error("bad argument #1 to \'SetTimer\', (number expected, got " .. type(interval) ..")", 2) end
+ if type(callback) ~= 'function' then error("bad argument #2 to \'SetTimer\', (function expected, got " .. type(callback) ..")", 2) end
+
+ local timer = {
+ interval = interval,
+ callback = callback,
+ recur = recur,
+ uID = nil or (recur and uID),
+ update = 0,
+ ...
+ }
+
+ if uID then
+ -- Check the timers existing:
+ for k, _ in pairs(LibVan32.timers) do
+ if k.uID == uID then
+ return -1
+ end
+ end
+ end
+ LibVan32.timers[timer] = timer
+ return timer
+end
+
+---Stop an existing timer. This function requires a timer instance created with :SetTimer()
+--@usage YourAddon:KillTimer(timer)
+--@param timer The timer you wish to stop.//(SetTimer timer)//
+--@return This function returns nil if the timer was sucessfully stopped, making it easier for you to clear the variable you stored the timer instance in originally.\\If it did not find a timer, it will return the variable you sent to it, so that it's not completely lost.
+function LibVan32:KillTimer(timer)
+ if type(timer) ~= 'table' then error("bad argument #1 to \'KillTimer\', (table expected, got " .. type(timer) ..")", 2) end
+ if LibVan32.timers[timer] then
+ LibVan32.timers[timer] = nil
+ return nil
+ else
+ return timer
+ end
+end
+
+
+-- How often to check timers. Lower values are more CPU intensive.
+local granularity = 0.1
+
+local totalElapsed = 0
+local function OnUpdate(self, elapsed)
+ totalElapsed = totalElapsed + elapsed
+ if totalElapsed > granularity then
+ for k,t in pairs(LibVan32.timers) do
+ t.update = t.update + totalElapsed
+ if t.update > t.interval then
+ local success, rv = pcall(t.callback, unpack(t))
+ if not rv and t.recur then
+ t.update = 0
+ else
+ LibVan32.timers[t] = nil
+ if not success then error("Timer Callback failed:" .. rv, 0) end
+ end
+ end
+ end
+ totalElapsed = 0
+ end
+end
+CreateFrame("Frame"):SetScript("OnUpdate", OnUpdate)
+
+LibVan32.mixinTargets = LibVan32.mixinTargets or {}
+local mixins = {
+ "KillTimer",
+ "SetTimer",
+ "PrintMessage",
+ "PrintErr",
+ "PrintDebug",
+ "SetDefaultChatFrame",
+ "ParseColorCodedString",
+}
+
+---Embed this library into an addon, and store it's 'short title' for addon output.\\
+--The addonName is used in PrintMessage, showing which addon is accosting the user with information.\\
+--If you wish to change the default color used by the title, it's possible, by adding your color string in the "addonName" field.
+--@param target The table you want to embed the library into.//(table)//
+--@param addonName The short title of your addon, used in PrintMessage calls.//(string)//
+--@usage LibStub:GetLibrary("LibVan32-1.0"):Embed(YourAddon, "addonName")
+function LibVan32:Embed(target, addonName)
+ --Redundancy checks
+ if type(target) ~= 'table' then error("bad argument #1 to \'Embed\', (table expected, got " .. type(target) ..")", 2) end
+ if type(addonName) ~= 'string' then error("bad argument #2 to \'Embed\', (string expected, got " .. type(addonName) ..")", 2) end
+
+ for _, name in pairs(mixins) do
+ target[name] = LibVan32[name]
+ end
+ -- Pass Lib variables to the addon as well on embed.
+ target._AddonRegisteredName = addonName
+ target._DefaultChatFrame = DEFAULT_CHAT_FRAME
+ target._DebugMode = false
+
+ LibVan32.mixinTargets[target] = true
+end
+
+-- Update the old embeds
+for target, _ in pairs(LibVan32.mixinTargets) do
+ LibVan32:Embed(target, target._AddonRegisteredName)
+end
\ No newline at end of file
diff --git a/Locale/deDE.lua b/Locale/deDE.lua
new file mode 100644
index 0000000..f90280e
--- /dev/null
+++ b/Locale/deDE.lua
@@ -0,0 +1,59 @@
+--[[ deDE.lua -- German translations -- Deutsch-Übersetzungen]]
+
+-- Make a localization table if it's not there:
+if not GTLocale then
+ GTLocale = {}
+end
+
+
+function GTLocale.Get_deDE_Strings()
+ local L = {}
+ -- L["ChatArgNotFound"] = "§b\"%s\"§r isn't a valid argument for §b\"%s\"§r."
+-- L["ChatAutoDepositDisabled"] = "Automatic deposits are disabled."
+-- L["ChatCommandNotFound"] = "§b\"%s\"§r was not found. §b/gt help§r shows the commands list."
+-- L["ChatDepositTitheAmount"] = "Automatically deposited %s."
+-- L["ChatHelpLine1"] = "=== Version §b%s§r - Help ==="
+-- L["ChatHelpLine10"] = "total -- Show the total amount you've tithed."
+-- L["ChatHelpLine2"] = "Arguments in brackets are optional. Commands separated by slashes are interchangeable."
+-- L["ChatHelpLine3"] = "options/config -- Open the options frame."
+-- L["ChatHelpLine4"] = "reset (tithe) -- reset the current tithe."
+-- L["ChatHelpLine5"] = "reset pos -- Reset the Mini-Frame's position."
+-- L["ChatHelpLine6"] = "reset config -- Reset this character's config."
+-- L["ChatHelpLine7"] = "current/tithe -- Show your current outstanding tithe."
+-- L["ChatHelpLine8"] = "mini -- Toggle the Mini-frame."
+-- L["ChatHelpLine9"] = "mini lock -- Lock or unlock the Mini-frame."
+-- L["ChatMiniFrameLock"] = "Mini-Frame locked."
+-- L["ChatMiniFrameUnlock"] = "Mini-frame unlocked."
+-- L["ChatNotEnoughFunds"] = "You don't have enough money to do that!"
+-- L["ChatNothingToDeposit"] = "There's nothing to deposit!"
+-- L["ChatNoValidDeposits"] = "No vaild windows are open for depositing!"
+-- L["ChatOutstandingTithe"] = "Current Tithe - %s"
+-- L["ChatSpammyCollectedAmount"] = "%s collected from §b%s§r"
+-- L["ChatSpammyNotCollectingSource"] = "Not collecting tithes from §b%s§r"
+--[==[ L["DialogResetConfigText"] = [=[§cWARNING!§r
+Resetting GuildTithe's settings can't be undone.
+
+Are you sure?]=] ]==]
+-- L["DialogResetTitheText"] = "Are you sure you want to reset your current tithe?"
+-- L["DialogSkinRequiresReload"] = "Enabling or disabling this feature requires you to reload your User Interface to see the changes."
+-- L["Loaded"] = "Guild Tithe version §b%s§r loaded. §b/gt help§r shows command help."
+-- L["MiniFrameCurrentTitheText"] = "Current Tithe:"
+-- L["OptionsAutoDeposit"] = "Automatically deposit collected tithe"
+-- L["OptionsDebug"] = "Debug Mode"
+-- L["OptionsElvSkin"] = "Enable ElvUI Skin"
+-- L["OptionsExtra2Text"] = "Extra configuration options"
+-- L["OptionsExtraText"] = "Allow collection from..."
+-- L["OptionsLootText"] = "Looted money"
+-- L["OptionsMailText"] = "Mail"
+-- L["OptionsMerchantText"] = "Merchants"
+-- L["OptionsQuestText"] = "Quest Rewards"
+-- L["OptionsSpammy"] = "Output to chat"
+-- L["OptionsTitle"] = "GuildTithe Options"
+-- L["OptionsTotalTitheText"] = "Grand Total - %s"
+-- L["OptionsTradeText"] = "Trade"
+-- L["OptionsVersionText"] = "%s"
+-- L["TooltipLDBDescriptionCurrent"] = "This is your current tithe."
+-- L["TooltipLDBDescriptionTotal"] = "This is your total tithe."
+
+ return L
+end
\ No newline at end of file
diff --git a/Locale/enUS.lua b/Locale/enUS.lua
new file mode 100644
index 0000000..cbd3fc7
--- /dev/null
+++ b/Locale/enUS.lua
@@ -0,0 +1,59 @@
+--[[ enUS.lua -- ENGLISH and DEFUALT LOCALIZATION FOR GUILDTITHE]]
+
+-- Make a localization table if it's not there:
+if not GTLocale then
+ GTLocale = {}
+end
+
+function GTLocale.Get_enUS_Strings()
+ local L = {}
+ L["ChatArgNotFound"] = "§b\"%s\"§r isn't a valid argument for §b\"%s\"§r."
+L["ChatAutoDepositDisabled"] = "Automatic deposits are disabled."
+L["ChatCommandNotFound"] = "§b\"%s\"§r was not found. §b/gt help§r shows the commands list."
+L["ChatDepositTitheAmount"] = "Automatically deposited %s."
+L["ChatHelpLine1"] = "=== Version §b%s§r - Help ==="
+L["ChatHelpLine10"] = "total -- Show the total amount you've tithed."
+L["ChatHelpLine2"] = "Arguments in brackets are optional. Commands separated by slashes are interchangeable."
+L["ChatHelpLine3"] = "options/config -- Open the options frame."
+L["ChatHelpLine4"] = "reset (tithe) -- reset the current tithe."
+L["ChatHelpLine5"] = "reset pos -- Reset the Mini-Frame's position."
+L["ChatHelpLine6"] = "reset config -- Reset this character's config."
+L["ChatHelpLine7"] = "current/tithe -- Show your current outstanding tithe."
+L["ChatHelpLine8"] = "mini -- Toggle the Mini-frame."
+L["ChatHelpLine9"] = "mini lock -- Lock or unlock the Mini-frame."
+L["ChatMiniFrameLock"] = "Mini-Frame locked."
+L["ChatMiniFrameUnlock"] = "Mini-frame unlocked."
+L["ChatNotEnoughFunds"] = "You don't have enough money to do that!"
+L["ChatNothingToDeposit"] = "There's nothing to deposit!"
+L["ChatNoValidDeposits"] = "No vaild windows are open for depositing!"
+L["ChatOutstandingTithe"] = "Current Tithe - %s"
+L["ChatSpammyCollectedAmount"] = "%s collected from §b%s§r"
+L["ChatSpammyNotCollectingSource"] = "Not collecting tithes from §b%s§r"
+L["DialogResetConfigText"] = [=[§cWARNING!§r
+Resetting GuildTithe's settings can't be undone.
+
+Are you sure?]=]
+L["DialogResetTitheText"] = "Are you sure you want to reset your current tithe?"
+L["DialogSkinRequiresReload"] = "Enabling or disabling this feature requires you to reload your User Interface to see the changes."
+L["Loaded"] = "Guild Tithe version §b%s§r loaded. §b/gt help§r shows command help."
+L["MiniFrameCurrentTitheText"] = "Current Tithe:"
+L["OptionsAutoDeposit"] = "Automatically deposit collected tithe"
+L["OptionsDebug"] = "Debug Mode"
+L["OptionsElvSkin"] = "Enable ElvUI Skin"
+L["OptionsExtra2Text"] = "Extra configuration options"
+L["OptionsExtraText"] = "Allow collection from..."
+L["OptionsLootText"] = "Looted money"
+L["OptionsMailText"] = "Mail"
+L["OptionsMerchantText"] = "Merchants"
+L["OptionsQuestText"] = "Quest Rewards"
+L["OptionsSpammy"] = "Output to chat"
+L["OptionsTitle"] = "GuildTithe Options"
+L["OptionsTotalTitheText"] = "Grand Total - %s"
+L["OptionsTradeText"] = "Trade"
+L["OptionsVersionText"] = "%s"
+L["TooltipLDBDescriptionCurrent"] = "This is your current tithe."
+L["TooltipLDBDescriptionTotal"] = "This is your total tithe."
+
+ return L
+end
+
diff --git a/Locale/esES.lua b/Locale/esES.lua
new file mode 100644
index 0000000..7b0c9ba
--- /dev/null
+++ b/Locale/esES.lua
@@ -0,0 +1,59 @@
+--[[ esES.lua -- Spanish(General) translations -- Traducciones generales españolas]]
+
+-- Make a localization table if it's not there:
+if not GTLocale then
+ GTLocale = {}
+end
+
+
+function GTLocale.Get_esES_Strings()
+ local L = {}
+ -- L["ChatArgNotFound"] = "§b\"%s\"§r isn't a valid argument for §b\"%s\"§r."
+-- L["ChatAutoDepositDisabled"] = "Automatic deposits are disabled."
+-- L["ChatCommandNotFound"] = "§b\"%s\"§r was not found. §b/gt help§r shows the commands list."
+-- L["ChatDepositTitheAmount"] = "Automatically deposited %s."
+-- L["ChatHelpLine1"] = "=== Version §b%s§r - Help ==="
+-- L["ChatHelpLine10"] = "total -- Show the total amount you've tithed."
+-- L["ChatHelpLine2"] = "Arguments in brackets are optional. Commands separated by slashes are interchangeable."
+-- L["ChatHelpLine3"] = "options/config -- Open the options frame."
+-- L["ChatHelpLine4"] = "reset (tithe) -- reset the current tithe."
+-- L["ChatHelpLine5"] = "reset pos -- Reset the Mini-Frame's position."
+-- L["ChatHelpLine6"] = "reset config -- Reset this character's config."
+-- L["ChatHelpLine7"] = "current/tithe -- Show your current outstanding tithe."
+-- L["ChatHelpLine8"] = "mini -- Toggle the Mini-frame."
+-- L["ChatHelpLine9"] = "mini lock -- Lock or unlock the Mini-frame."
+-- L["ChatMiniFrameLock"] = "Mini-Frame locked."
+-- L["ChatMiniFrameUnlock"] = "Mini-frame unlocked."
+-- L["ChatNotEnoughFunds"] = "You don't have enough money to do that!"
+-- L["ChatNothingToDeposit"] = "There's nothing to deposit!"
+-- L["ChatNoValidDeposits"] = "No vaild windows are open for depositing!"
+-- L["ChatOutstandingTithe"] = "Current Tithe - %s"
+-- L["ChatSpammyCollectedAmount"] = "%s collected from §b%s§r"
+-- L["ChatSpammyNotCollectingSource"] = "Not collecting tithes from §b%s§r"
+--[==[ L["DialogResetConfigText"] = [=[§cWARNING!§r
+Resetting GuildTithe's settings can't be undone.
+
+Are you sure?]=] ]==]
+-- L["DialogResetTitheText"] = "Are you sure you want to reset your current tithe?"
+-- L["DialogSkinRequiresReload"] = "Enabling or disabling this feature requires you to reload your User Interface to see the changes."
+-- L["Loaded"] = "Guild Tithe version §b%s§r loaded. §b/gt help§r shows command help."
+-- L["MiniFrameCurrentTitheText"] = "Current Tithe:"
+-- L["OptionsAutoDeposit"] = "Automatically deposit collected tithe"
+-- L["OptionsDebug"] = "Debug Mode"
+-- L["OptionsElvSkin"] = "Enable ElvUI Skin"
+-- L["OptionsExtra2Text"] = "Extra configuration options"
+-- L["OptionsExtraText"] = "Allow collection from..."
+-- L["OptionsLootText"] = "Looted money"
+-- L["OptionsMailText"] = "Mail"
+-- L["OptionsMerchantText"] = "Merchants"
+-- L["OptionsQuestText"] = "Quest Rewards"
+-- L["OptionsSpammy"] = "Output to chat"
+-- L["OptionsTitle"] = "GuildTithe Options"
+-- L["OptionsTotalTitheText"] = "Grand Total - %s"
+-- L["OptionsTradeText"] = "Trade"
+-- L["OptionsVersionText"] = "%s"
+-- L["TooltipLDBDescriptionCurrent"] = "This is your current tithe."
+-- L["TooltipLDBDescriptionTotal"] = "This is your total tithe."
+
+ return L
+end
\ No newline at end of file
diff --git a/Locale/esMX.lua b/Locale/esMX.lua
new file mode 100644
index 0000000..11f3d05
--- /dev/null
+++ b/Locale/esMX.lua
@@ -0,0 +1,59 @@
+--[[ esMX.lua -- Spanish(Mexican) translations -- Traducciones al español de México]]
+
+-- Make a localization table if it's not there:
+if not GTLocale then
+ GTLocale = {}
+end
+
+
+function GTLocale.Get_esMX_Strings()
+ local L = {}
+ -- L["ChatArgNotFound"] = "§b\"%s\"§r isn't a valid argument for §b\"%s\"§r."
+-- L["ChatAutoDepositDisabled"] = "Automatic deposits are disabled."
+-- L["ChatCommandNotFound"] = "§b\"%s\"§r was not found. §b/gt help§r shows the commands list."
+-- L["ChatDepositTitheAmount"] = "Automatically deposited %s."
+-- L["ChatHelpLine1"] = "=== Version §b%s§r - Help ==="
+-- L["ChatHelpLine10"] = "total -- Show the total amount you've tithed."
+-- L["ChatHelpLine2"] = "Arguments in brackets are optional. Commands separated by slashes are interchangeable."
+-- L["ChatHelpLine3"] = "options/config -- Open the options frame."
+-- L["ChatHelpLine4"] = "reset (tithe) -- reset the current tithe."
+-- L["ChatHelpLine5"] = "reset pos -- Reset the Mini-Frame's position."
+-- L["ChatHelpLine6"] = "reset config -- Reset this character's config."
+-- L["ChatHelpLine7"] = "current/tithe -- Show your current outstanding tithe."
+-- L["ChatHelpLine8"] = "mini -- Toggle the Mini-frame."
+-- L["ChatHelpLine9"] = "mini lock -- Lock or unlock the Mini-frame."
+-- L["ChatMiniFrameLock"] = "Mini-Frame locked."
+-- L["ChatMiniFrameUnlock"] = "Mini-frame unlocked."
+-- L["ChatNotEnoughFunds"] = "You don't have enough money to do that!"
+-- L["ChatNothingToDeposit"] = "There's nothing to deposit!"
+-- L["ChatNoValidDeposits"] = "No vaild windows are open for depositing!"
+-- L["ChatOutstandingTithe"] = "Current Tithe - %s"
+-- L["ChatSpammyCollectedAmount"] = "%s collected from §b%s§r"
+-- L["ChatSpammyNotCollectingSource"] = "Not collecting tithes from §b%s§r"
+--[==[ L["DialogResetConfigText"] = [=[§cWARNING!§r
+Resetting GuildTithe's settings can't be undone.
+
+Are you sure?]=] ]==]
+-- L["DialogResetTitheText"] = "Are you sure you want to reset your current tithe?"
+-- L["DialogSkinRequiresReload"] = "Enabling or disabling this feature requires you to reload your User Interface to see the changes."
+-- L["Loaded"] = "Guild Tithe version §b%s§r loaded. §b/gt help§r shows command help."
+-- L["MiniFrameCurrentTitheText"] = "Current Tithe:"
+-- L["OptionsAutoDeposit"] = "Automatically deposit collected tithe"
+-- L["OptionsDebug"] = "Debug Mode"
+-- L["OptionsElvSkin"] = "Enable ElvUI Skin"
+-- L["OptionsExtra2Text"] = "Extra configuration options"
+-- L["OptionsExtraText"] = "Allow collection from..."
+-- L["OptionsLootText"] = "Looted money"
+-- L["OptionsMailText"] = "Mail"
+-- L["OptionsMerchantText"] = "Merchants"
+-- L["OptionsQuestText"] = "Quest Rewards"
+-- L["OptionsSpammy"] = "Output to chat"
+-- L["OptionsTitle"] = "GuildTithe Options"
+-- L["OptionsTotalTitheText"] = "Grand Total - %s"
+-- L["OptionsTradeText"] = "Trade"
+-- L["OptionsVersionText"] = "%s"
+-- L["TooltipLDBDescriptionCurrent"] = "This is your current tithe."
+-- L["TooltipLDBDescriptionTotal"] = "This is your total tithe."
+
+ return L
+end
\ No newline at end of file
diff --git a/Locale/frFR.lua b/Locale/frFR.lua
new file mode 100644
index 0000000..3a9b22c
--- /dev/null
+++ b/Locale/frFR.lua
@@ -0,0 +1,59 @@
+--[[ frFR.lua -- French Translations -- Traductions françaises]]
+
+-- Make a localization table if it's not there:
+if not GTLocale then
+ GTLocale = {}
+end
+
+
+function GTLocale.Get_frFR_Strings()
+ local L = {}
+ -- L["ChatArgNotFound"] = "§b\"%s\"§r isn't a valid argument for §b\"%s\"§r."
+-- L["ChatAutoDepositDisabled"] = "Automatic deposits are disabled."
+-- L["ChatCommandNotFound"] = "§b\"%s\"§r was not found. §b/gt help§r shows the commands list."
+-- L["ChatDepositTitheAmount"] = "Automatically deposited %s."
+-- L["ChatHelpLine1"] = "=== Version §b%s§r - Help ==="
+-- L["ChatHelpLine10"] = "total -- Show the total amount you've tithed."
+-- L["ChatHelpLine2"] = "Arguments in brackets are optional. Commands separated by slashes are interchangeable."
+-- L["ChatHelpLine3"] = "options/config -- Open the options frame."
+-- L["ChatHelpLine4"] = "reset (tithe) -- reset the current tithe."
+-- L["ChatHelpLine5"] = "reset pos -- Reset the Mini-Frame's position."
+-- L["ChatHelpLine6"] = "reset config -- Reset this character's config."
+-- L["ChatHelpLine7"] = "current/tithe -- Show your current outstanding tithe."
+-- L["ChatHelpLine8"] = "mini -- Toggle the Mini-frame."
+-- L["ChatHelpLine9"] = "mini lock -- Lock or unlock the Mini-frame."
+-- L["ChatMiniFrameLock"] = "Mini-Frame locked."
+-- L["ChatMiniFrameUnlock"] = "Mini-frame unlocked."
+-- L["ChatNotEnoughFunds"] = "You don't have enough money to do that!"
+-- L["ChatNothingToDeposit"] = "There's nothing to deposit!"
+-- L["ChatNoValidDeposits"] = "No vaild windows are open for depositing!"
+-- L["ChatOutstandingTithe"] = "Current Tithe - %s"
+-- L["ChatSpammyCollectedAmount"] = "%s collected from §b%s§r"
+-- L["ChatSpammyNotCollectingSource"] = "Not collecting tithes from §b%s§r"
+--[==[ L["DialogResetConfigText"] = [=[§cWARNING!§r
+Resetting GuildTithe's settings can't be undone.
+
+Are you sure?]=] ]==]
+-- L["DialogResetTitheText"] = "Are you sure you want to reset your current tithe?"
+-- L["DialogSkinRequiresReload"] = "Enabling or disabling this feature requires you to reload your User Interface to see the changes."
+-- L["Loaded"] = "Guild Tithe version §b%s§r loaded. §b/gt help§r shows command help."
+-- L["MiniFrameCurrentTitheText"] = "Current Tithe:"
+-- L["OptionsAutoDeposit"] = "Automatically deposit collected tithe"
+-- L["OptionsDebug"] = "Debug Mode"
+-- L["OptionsElvSkin"] = "Enable ElvUI Skin"
+-- L["OptionsExtra2Text"] = "Extra configuration options"
+-- L["OptionsExtraText"] = "Allow collection from..."
+-- L["OptionsLootText"] = "Looted money"
+-- L["OptionsMailText"] = "Mail"
+-- L["OptionsMerchantText"] = "Merchants"
+-- L["OptionsQuestText"] = "Quest Rewards"
+-- L["OptionsSpammy"] = "Output to chat"
+-- L["OptionsTitle"] = "GuildTithe Options"
+-- L["OptionsTotalTitheText"] = "Grand Total - %s"
+-- L["OptionsTradeText"] = "Trade"
+-- L["OptionsVersionText"] = "%s"
+-- L["TooltipLDBDescriptionCurrent"] = "This is your current tithe."
+-- L["TooltipLDBDescriptionTotal"] = "This is your total tithe."
+
+ return L
+end
\ No newline at end of file
diff --git a/Locale/koKR.lua b/Locale/koKR.lua
new file mode 100644
index 0000000..7a8f05b
--- /dev/null
+++ b/Locale/koKR.lua
@@ -0,0 +1,59 @@
+--[[ koKR.lua -- Korean GuildTithe Translations -- 한국어 번역]]
+
+-- Make a localization table if it's not there:
+if not GTLocale then
+ GTLocale = {}
+end
+
+
+function GTLocale.Get_koKR_Strings()
+ local L = {}
+ -- L["ChatArgNotFound"] = "§b\"%s\"§r isn't a valid argument for §b\"%s\"§r."
+-- L["ChatAutoDepositDisabled"] = "Automatic deposits are disabled."
+-- L["ChatCommandNotFound"] = "§b\"%s\"§r was not found. §b/gt help§r shows the commands list."
+-- L["ChatDepositTitheAmount"] = "Automatically deposited %s."
+-- L["ChatHelpLine1"] = "=== Version §b%s§r - Help ==="
+-- L["ChatHelpLine10"] = "total -- Show the total amount you've tithed."
+-- L["ChatHelpLine2"] = "Arguments in brackets are optional. Commands separated by slashes are interchangeable."
+-- L["ChatHelpLine3"] = "options/config -- Open the options frame."
+-- L["ChatHelpLine4"] = "reset (tithe) -- reset the current tithe."
+-- L["ChatHelpLine5"] = "reset pos -- Reset the Mini-Frame's position."
+-- L["ChatHelpLine6"] = "reset config -- Reset this character's config."
+-- L["ChatHelpLine7"] = "current/tithe -- Show your current outstanding tithe."
+-- L["ChatHelpLine8"] = "mini -- Toggle the Mini-frame."
+-- L["ChatHelpLine9"] = "mini lock -- Lock or unlock the Mini-frame."
+-- L["ChatMiniFrameLock"] = "Mini-Frame locked."
+-- L["ChatMiniFrameUnlock"] = "Mini-frame unlocked."
+-- L["ChatNotEnoughFunds"] = "You don't have enough money to do that!"
+-- L["ChatNothingToDeposit"] = "There's nothing to deposit!"
+-- L["ChatNoValidDeposits"] = "No vaild windows are open for depositing!"
+-- L["ChatOutstandingTithe"] = "Current Tithe - %s"
+-- L["ChatSpammyCollectedAmount"] = "%s collected from §b%s§r"
+-- L["ChatSpammyNotCollectingSource"] = "Not collecting tithes from §b%s§r"
+--[==[ L["DialogResetConfigText"] = [=[§cWARNING!§r
+Resetting GuildTithe's settings can't be undone.
+
+Are you sure?]=] ]==]
+-- L["DialogResetTitheText"] = "Are you sure you want to reset your current tithe?"
+-- L["DialogSkinRequiresReload"] = "Enabling or disabling this feature requires you to reload your User Interface to see the changes."
+-- L["Loaded"] = "Guild Tithe version §b%s§r loaded. §b/gt help§r shows command help."
+-- L["MiniFrameCurrentTitheText"] = "Current Tithe:"
+-- L["OptionsAutoDeposit"] = "Automatically deposit collected tithe"
+-- L["OptionsDebug"] = "Debug Mode"
+-- L["OptionsElvSkin"] = "Enable ElvUI Skin"
+-- L["OptionsExtra2Text"] = "Extra configuration options"
+-- L["OptionsExtraText"] = "Allow collection from..."
+-- L["OptionsLootText"] = "Looted money"
+-- L["OptionsMailText"] = "Mail"
+-- L["OptionsMerchantText"] = "Merchants"
+-- L["OptionsQuestText"] = "Quest Rewards"
+-- L["OptionsSpammy"] = "Output to chat"
+-- L["OptionsTitle"] = "GuildTithe Options"
+-- L["OptionsTotalTitheText"] = "Grand Total - %s"
+-- L["OptionsTradeText"] = "Trade"
+-- L["OptionsVersionText"] = "%s"
+-- L["TooltipLDBDescriptionCurrent"] = "This is your current tithe."
+-- L["TooltipLDBDescriptionTotal"] = "This is your total tithe."
+
+ return L
+end
\ No newline at end of file
diff --git a/Locale/loadLocales.xml b/Locale/loadLocales.xml
new file mode 100644
index 0000000..de9ef82
--- /dev/null
+++ b/Locale/loadLocales.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Locale/ptBR.lua b/Locale/ptBR.lua
new file mode 100644
index 0000000..45a5ec8
--- /dev/null
+++ b/Locale/ptBR.lua
@@ -0,0 +1,59 @@
+--[[ ptBR.lua -- Brazilian Portugese Translations -- Tradução Português do Brasil]]
+
+-- Make a localization table if it's not there:
+if not GTLocale then
+ GTLocale = {}
+end
+
+
+function GTLocale.Get_ptBR_Strings()
+ local L = {}
+ -- L["ChatArgNotFound"] = "§b\"%s\"§r isn't a valid argument for §b\"%s\"§r."
+-- L["ChatAutoDepositDisabled"] = "Automatic deposits are disabled."
+-- L["ChatCommandNotFound"] = "§b\"%s\"§r was not found. §b/gt help§r shows the commands list."
+-- L["ChatDepositTitheAmount"] = "Automatically deposited %s."
+-- L["ChatHelpLine1"] = "=== Version §b%s§r - Help ==="
+-- L["ChatHelpLine10"] = "total -- Show the total amount you've tithed."
+-- L["ChatHelpLine2"] = "Arguments in brackets are optional. Commands separated by slashes are interchangeable."
+-- L["ChatHelpLine3"] = "options/config -- Open the options frame."
+-- L["ChatHelpLine4"] = "reset (tithe) -- reset the current tithe."
+-- L["ChatHelpLine5"] = "reset pos -- Reset the Mini-Frame's position."
+-- L["ChatHelpLine6"] = "reset config -- Reset this character's config."
+-- L["ChatHelpLine7"] = "current/tithe -- Show your current outstanding tithe."
+-- L["ChatHelpLine8"] = "mini -- Toggle the Mini-frame."
+-- L["ChatHelpLine9"] = "mini lock -- Lock or unlock the Mini-frame."
+-- L["ChatMiniFrameLock"] = "Mini-Frame locked."
+-- L["ChatMiniFrameUnlock"] = "Mini-frame unlocked."
+-- L["ChatNotEnoughFunds"] = "You don't have enough money to do that!"
+-- L["ChatNothingToDeposit"] = "There's nothing to deposit!"
+-- L["ChatNoValidDeposits"] = "No vaild windows are open for depositing!"
+-- L["ChatOutstandingTithe"] = "Current Tithe - %s"
+-- L["ChatSpammyCollectedAmount"] = "%s collected from §b%s§r"
+-- L["ChatSpammyNotCollectingSource"] = "Not collecting tithes from §b%s§r"
+--[==[ L["DialogResetConfigText"] = [=[§cWARNING!§r
+Resetting GuildTithe's settings can't be undone.
+
+Are you sure?]=] ]==]
+-- L["DialogResetTitheText"] = "Are you sure you want to reset your current tithe?"
+-- L["DialogSkinRequiresReload"] = "Enabling or disabling this feature requires you to reload your User Interface to see the changes."
+-- L["Loaded"] = "Guild Tithe version §b%s§r loaded. §b/gt help§r shows command help."
+-- L["MiniFrameCurrentTitheText"] = "Current Tithe:"
+-- L["OptionsAutoDeposit"] = "Automatically deposit collected tithe"
+-- L["OptionsDebug"] = "Debug Mode"
+-- L["OptionsElvSkin"] = "Enable ElvUI Skin"
+-- L["OptionsExtra2Text"] = "Extra configuration options"
+-- L["OptionsExtraText"] = "Allow collection from..."
+-- L["OptionsLootText"] = "Looted money"
+-- L["OptionsMailText"] = "Mail"
+-- L["OptionsMerchantText"] = "Merchants"
+-- L["OptionsQuestText"] = "Quest Rewards"
+-- L["OptionsSpammy"] = "Output to chat"
+-- L["OptionsTitle"] = "GuildTithe Options"
+-- L["OptionsTotalTitheText"] = "Grand Total - %s"
+-- L["OptionsTradeText"] = "Trade"
+-- L["OptionsVersionText"] = "%s"
+-- L["TooltipLDBDescriptionCurrent"] = "This is your current tithe."
+-- L["TooltipLDBDescriptionTotal"] = "This is your total tithe."
+
+ return L
+end
\ No newline at end of file
diff --git a/Locale/ruRU.lua b/Locale/ruRU.lua
new file mode 100644
index 0000000..1931ae5
--- /dev/null
+++ b/Locale/ruRU.lua
@@ -0,0 +1,59 @@
+--[[ ruRU.lua -- Russian translations -- переводы на русский язык]]
+
+-- Make a localization table if it's not there:
+if not GTLocale then
+ GTLocale = {}
+end
+
+
+function GTLocale.Get_ruRU_Strings()
+ local L = {}
+ -- L["ChatArgNotFound"] = "§b\"%s\"§r isn't a valid argument for §b\"%s\"§r."
+-- L["ChatAutoDepositDisabled"] = "Automatic deposits are disabled."
+-- L["ChatCommandNotFound"] = "§b\"%s\"§r was not found. §b/gt help§r shows the commands list."
+-- L["ChatDepositTitheAmount"] = "Automatically deposited %s."
+-- L["ChatHelpLine1"] = "=== Version §b%s§r - Help ==="
+-- L["ChatHelpLine10"] = "total -- Show the total amount you've tithed."
+-- L["ChatHelpLine2"] = "Arguments in brackets are optional. Commands separated by slashes are interchangeable."
+-- L["ChatHelpLine3"] = "options/config -- Open the options frame."
+-- L["ChatHelpLine4"] = "reset (tithe) -- reset the current tithe."
+-- L["ChatHelpLine5"] = "reset pos -- Reset the Mini-Frame's position."
+-- L["ChatHelpLine6"] = "reset config -- Reset this character's config."
+-- L["ChatHelpLine7"] = "current/tithe -- Show your current outstanding tithe."
+-- L["ChatHelpLine8"] = "mini -- Toggle the Mini-frame."
+-- L["ChatHelpLine9"] = "mini lock -- Lock or unlock the Mini-frame."
+-- L["ChatMiniFrameLock"] = "Mini-Frame locked."
+-- L["ChatMiniFrameUnlock"] = "Mini-frame unlocked."
+-- L["ChatNotEnoughFunds"] = "You don't have enough money to do that!"
+-- L["ChatNothingToDeposit"] = "There's nothing to deposit!"
+-- L["ChatNoValidDeposits"] = "No vaild windows are open for depositing!"
+-- L["ChatOutstandingTithe"] = "Current Tithe - %s"
+-- L["ChatSpammyCollectedAmount"] = "%s collected from §b%s§r"
+-- L["ChatSpammyNotCollectingSource"] = "Not collecting tithes from §b%s§r"
+--[==[ L["DialogResetConfigText"] = [=[§cWARNING!§r
+Resetting GuildTithe's settings can't be undone.
+
+Are you sure?]=] ]==]
+-- L["DialogResetTitheText"] = "Are you sure you want to reset your current tithe?"
+-- L["DialogSkinRequiresReload"] = "Enabling or disabling this feature requires you to reload your User Interface to see the changes."
+-- L["Loaded"] = "Guild Tithe version §b%s§r loaded. §b/gt help§r shows command help."
+-- L["MiniFrameCurrentTitheText"] = "Current Tithe:"
+-- L["OptionsAutoDeposit"] = "Automatically deposit collected tithe"
+-- L["OptionsDebug"] = "Debug Mode"
+-- L["OptionsElvSkin"] = "Enable ElvUI Skin"
+-- L["OptionsExtra2Text"] = "Extra configuration options"
+-- L["OptionsExtraText"] = "Allow collection from..."
+-- L["OptionsLootText"] = "Looted money"
+-- L["OptionsMailText"] = "Mail"
+-- L["OptionsMerchantText"] = "Merchants"
+-- L["OptionsQuestText"] = "Quest Rewards"
+-- L["OptionsSpammy"] = "Output to chat"
+-- L["OptionsTitle"] = "GuildTithe Options"
+-- L["OptionsTotalTitheText"] = "Grand Total - %s"
+-- L["OptionsTradeText"] = "Trade"
+-- L["OptionsVersionText"] = "%s"
+-- L["TooltipLDBDescriptionCurrent"] = "This is your current tithe."
+-- L["TooltipLDBDescriptionTotal"] = "This is your total tithe."
+
+ return L
+end
\ No newline at end of file
diff --git a/Locale/zhCN.lua b/Locale/zhCN.lua
new file mode 100644
index 0000000..47b2de5
--- /dev/null
+++ b/Locale/zhCN.lua
@@ -0,0 +1,59 @@
+--[[ zhCN.lua -- Simplified Chinese translations -- 简体中文译本]]
+
+-- Make a localization table if it's not there:
+if not GTLocale then
+ GTLocale = {}
+end
+
+
+function GTLocale.Get_zhCN_Strings()
+ local L = {}
+ -- L["ChatArgNotFound"] = "§b\"%s\"§r isn't a valid argument for §b\"%s\"§r."
+-- L["ChatAutoDepositDisabled"] = "Automatic deposits are disabled."
+-- L["ChatCommandNotFound"] = "§b\"%s\"§r was not found. §b/gt help§r shows the commands list."
+-- L["ChatDepositTitheAmount"] = "Automatically deposited %s."
+-- L["ChatHelpLine1"] = "=== Version §b%s§r - Help ==="
+-- L["ChatHelpLine10"] = "total -- Show the total amount you've tithed."
+-- L["ChatHelpLine2"] = "Arguments in brackets are optional. Commands separated by slashes are interchangeable."
+-- L["ChatHelpLine3"] = "options/config -- Open the options frame."
+-- L["ChatHelpLine4"] = "reset (tithe) -- reset the current tithe."
+-- L["ChatHelpLine5"] = "reset pos -- Reset the Mini-Frame's position."
+-- L["ChatHelpLine6"] = "reset config -- Reset this character's config."
+-- L["ChatHelpLine7"] = "current/tithe -- Show your current outstanding tithe."
+-- L["ChatHelpLine8"] = "mini -- Toggle the Mini-frame."
+-- L["ChatHelpLine9"] = "mini lock -- Lock or unlock the Mini-frame."
+-- L["ChatMiniFrameLock"] = "Mini-Frame locked."
+-- L["ChatMiniFrameUnlock"] = "Mini-frame unlocked."
+-- L["ChatNotEnoughFunds"] = "You don't have enough money to do that!"
+-- L["ChatNothingToDeposit"] = "There's nothing to deposit!"
+-- L["ChatNoValidDeposits"] = "No vaild windows are open for depositing!"
+-- L["ChatOutstandingTithe"] = "Current Tithe - %s"
+-- L["ChatSpammyCollectedAmount"] = "%s collected from §b%s§r"
+-- L["ChatSpammyNotCollectingSource"] = "Not collecting tithes from §b%s§r"
+--[==[ L["DialogResetConfigText"] = [=[§cWARNING!§r
+Resetting GuildTithe's settings can't be undone.
+
+Are you sure?]=] ]==]
+-- L["DialogResetTitheText"] = "Are you sure you want to reset your current tithe?"
+-- L["DialogSkinRequiresReload"] = "Enabling or disabling this feature requires you to reload your User Interface to see the changes."
+-- L["Loaded"] = "Guild Tithe version §b%s§r loaded. §b/gt help§r shows command help."
+-- L["MiniFrameCurrentTitheText"] = "Current Tithe:"
+-- L["OptionsAutoDeposit"] = "Automatically deposit collected tithe"
+-- L["OptionsDebug"] = "Debug Mode"
+-- L["OptionsElvSkin"] = "Enable ElvUI Skin"
+-- L["OptionsExtra2Text"] = "Extra configuration options"
+-- L["OptionsExtraText"] = "Allow collection from..."
+-- L["OptionsLootText"] = "Looted money"
+-- L["OptionsMailText"] = "Mail"
+-- L["OptionsMerchantText"] = "Merchants"
+-- L["OptionsQuestText"] = "Quest Rewards"
+-- L["OptionsSpammy"] = "Output to chat"
+-- L["OptionsTitle"] = "GuildTithe Options"
+-- L["OptionsTotalTitheText"] = "Grand Total - %s"
+-- L["OptionsTradeText"] = "Trade"
+-- L["OptionsVersionText"] = "%s"
+-- L["TooltipLDBDescriptionCurrent"] = "This is your current tithe."
+-- L["TooltipLDBDescriptionTotal"] = "This is your total tithe."
+
+ return L
+end
\ No newline at end of file
diff --git a/Locale/zhTW.lua b/Locale/zhTW.lua
new file mode 100644
index 0000000..ba56079
--- /dev/null
+++ b/Locale/zhTW.lua
@@ -0,0 +1,59 @@
+--[[ zhTW.lua -- Traditional Chinese translations -- 中國傳統翻譯]]
+
+-- Make a localization table if it's not there:
+if not GTLocale then
+ GTLocale = {}
+end
+
+
+function GTLocale.Get_zhTW_Strings()
+ local L = {}
+ -- L["ChatArgNotFound"] = "§b\"%s\"§r isn't a valid argument for §b\"%s\"§r."
+-- L["ChatAutoDepositDisabled"] = "Automatic deposits are disabled."
+-- L["ChatCommandNotFound"] = "§b\"%s\"§r was not found. §b/gt help§r shows the commands list."
+-- L["ChatDepositTitheAmount"] = "Automatically deposited %s."
+-- L["ChatHelpLine1"] = "=== Version §b%s§r - Help ==="
+-- L["ChatHelpLine10"] = "total -- Show the total amount you've tithed."
+-- L["ChatHelpLine2"] = "Arguments in brackets are optional. Commands separated by slashes are interchangeable."
+-- L["ChatHelpLine3"] = "options/config -- Open the options frame."
+-- L["ChatHelpLine4"] = "reset (tithe) -- reset the current tithe."
+-- L["ChatHelpLine5"] = "reset pos -- Reset the Mini-Frame's position."
+-- L["ChatHelpLine6"] = "reset config -- Reset this character's config."
+-- L["ChatHelpLine7"] = "current/tithe -- Show your current outstanding tithe."
+-- L["ChatHelpLine8"] = "mini -- Toggle the Mini-frame."
+-- L["ChatHelpLine9"] = "mini lock -- Lock or unlock the Mini-frame."
+-- L["ChatMiniFrameLock"] = "Mini-Frame locked."
+-- L["ChatMiniFrameUnlock"] = "Mini-frame unlocked."
+-- L["ChatNotEnoughFunds"] = "You don't have enough money to do that!"
+-- L["ChatNothingToDeposit"] = "There's nothing to deposit!"
+-- L["ChatNoValidDeposits"] = "No vaild windows are open for depositing!"
+-- L["ChatOutstandingTithe"] = "Current Tithe - %s"
+-- L["ChatSpammyCollectedAmount"] = "%s collected from §b%s§r"
+-- L["ChatSpammyNotCollectingSource"] = "Not collecting tithes from §b%s§r"
+--[==[ L["DialogResetConfigText"] = [=[§cWARNING!§r
+Resetting GuildTithe's settings can't be undone.
+
+Are you sure?]=] ]==]
+-- L["DialogResetTitheText"] = "Are you sure you want to reset your current tithe?"
+-- L["DialogSkinRequiresReload"] = "Enabling or disabling this feature requires you to reload your User Interface to see the changes."
+-- L["Loaded"] = "Guild Tithe version §b%s§r loaded. §b/gt help§r shows command help."
+-- L["MiniFrameCurrentTitheText"] = "Current Tithe:"
+-- L["OptionsAutoDeposit"] = "Automatically deposit collected tithe"
+-- L["OptionsDebug"] = "Debug Mode"
+-- L["OptionsElvSkin"] = "Enable ElvUI Skin"
+-- L["OptionsExtra2Text"] = "Extra configuration options"
+-- L["OptionsExtraText"] = "Allow collection from..."
+-- L["OptionsLootText"] = "Looted money"
+-- L["OptionsMailText"] = "Mail"
+-- L["OptionsMerchantText"] = "Merchants"
+-- L["OptionsQuestText"] = "Quest Rewards"
+-- L["OptionsSpammy"] = "Output to chat"
+-- L["OptionsTitle"] = "GuildTithe Options"
+-- L["OptionsTotalTitheText"] = "Grand Total - %s"
+-- L["OptionsTradeText"] = "Trade"
+-- L["OptionsVersionText"] = "%s"
+-- L["TooltipLDBDescriptionCurrent"] = "This is your current tithe."
+-- L["TooltipLDBDescriptionTotal"] = "This is your total tithe."
+
+ return L
+end
\ No newline at end of file
diff --git a/embeds.xml b/embeds.xml
new file mode 100644
index 0000000..d4378bb
--- /dev/null
+++ b/embeds.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
\ No newline at end of file