Global convert indentation to tabs

This commit is contained in:
Logan Payton
2018-05-18 00:28:38 -04:00
parent 1294e1d2c7
commit bc9b5f509e
8 changed files with 141 additions and 141 deletions
+47 -47
View File
@@ -16,7 +16,7 @@ local byte = string.byte
local LibBase64 = LibStub:NewLibrary("LibBase64-1.0", 1) local LibBase64 = LibStub:NewLibrary("LibBase64-1.0", 1)
if not LibBase64 then if not LibBase64 then
return return
end end
local _chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" local _chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
@@ -25,12 +25,12 @@ local byteToNum = {}
local numToChar = {} local numToChar = {}
for i = 1, strlen(_chars) do for i = 1, strlen(_chars) do
charTable[i] = sub(_chars, i, i) charTable[i] = sub(_chars, i, i)
end end
for i = 1, getn(charTable) do for i = 1, getn(charTable) do
numToChar[i - 1] = sub(_chars, i, i) numToChar[i - 1] = sub(_chars, i, i)
byteToNum[byte(_chars, i)] = i - 1 byteToNum[byte(_chars, i)] = i - 1
end end
_chars = nil _chars = nil
@@ -45,10 +45,10 @@ local plus_byte = byte("+")
local slash_byte = byte("/") local slash_byte = byte("/")
local equals_byte = byte("=") local equals_byte = byte("=")
local whitespace = { local whitespace = {
[byte(" ")] = true, [byte(" ")] = true,
[byte("\t")] = true, [byte("\t")] = true,
[byte("\n")] = true, [byte("\n")] = true,
[byte("\r")] = true, [byte("\r")] = true,
} }
local t = {} local t = {}
@@ -60,27 +60,27 @@ local t = {}
-- @usage LibBase64.Encode("Hello, how are you doing today?") == "SGVsbG8sIGhvdyBhcmUgeW91IGRvaW5nIHRvZGF5Pw==" -- @usage LibBase64.Encode("Hello, how are you doing today?") == "SGVsbG8sIGhvdyBhcmUgeW91IGRvaW5nIHRvZGF5Pw=="
-- @return a Base64-encoded string -- @return a Base64-encoded string
function LibBase64:Encode(text, maxLineLength, lineEnding) function LibBase64:Encode(text, maxLineLength, lineEnding)
if type(text) ~= "string" then if type(text) ~= "string" then
error(format("Bad argument #1 to `Encode'. Expected %q, got %q", "string", type(text)), 2) error(format("Bad argument #1 to `Encode'. Expected %q, got %q", "string", type(text)), 2)
end end
if maxLineLength == nil then if maxLineLength == nil then
-- do nothing -- do nothing
elseif type(maxLineLength) ~= "number" then elseif type(maxLineLength) ~= "number" then
error(format("Bad argument #2 to `Encode'. Expected %q or %q, got %q", "number", "nil", type(maxLineLength)), 2) error(format("Bad argument #2 to `Encode'. Expected %q or %q, got %q", "number", "nil", type(maxLineLength)), 2)
elseif modf(maxLineLength, 4) ~= 0 then elseif modf(maxLineLength, 4) ~= 0 then
error(format("Bad argument #2 to `Encode'. Expected a multiple of 4, got %s", maxLineLength), 2) error(format("Bad argument #2 to `Encode'. Expected a multiple of 4, got %s", maxLineLength), 2)
elseif maxLineLength <= 0 then elseif maxLineLength <= 0 then
error(format("Bad argument #2 to `Encode'. Expected a number > 0, got %s", maxLineLength), 2) error(format("Bad argument #2 to `Encode'. Expected a number > 0, got %s", maxLineLength), 2)
end end
if lineEnding == nil then if lineEnding == nil then
lineEnding = "\r\n" lineEnding = "\r\n"
elseif type(lineEnding) ~= "string" then elseif type(lineEnding) ~= "string" then
error(format("Bad argument #3 to `Encode'. Expected %q, got %q", "string", type(lineEnding)), 2) error(format("Bad argument #3 to `Encode'. Expected %q, got %q", "string", type(lineEnding)), 2)
end end
local currentLength = 0 local currentLength = 0
for i = 1, getn(text), 3 do for i = 1, getn(text), 3 do
local a, b, c = byte(text, i, i+2) local a, b, c = byte(text, i, i+2)
@@ -116,7 +116,7 @@ function LibBase64:Encode(text, maxLineLength, lineEnding)
currentLength = currentLength + 4 currentLength = currentLength + 4
if maxLineLength and modf(currentLength, maxLineLength) == 0 then if maxLineLength and modf(currentLength, maxLineLength) == 0 then
t[getn(t)+1] = lineEnding t[getn(t)+1] = lineEnding
end end
end end
@@ -136,29 +136,29 @@ local t2 = {}
-- @usage LibBase64.Encode("SGVsbG8sIGhvdyBhcmUgeW91IGRvaW5nIHRvZGF5Pw==") == "Hello, how are you doing today?" -- @usage LibBase64.Encode("SGVsbG8sIGhvdyBhcmUgeW91IGRvaW5nIHRvZGF5Pw==") == "Hello, how are you doing today?"
-- @return a bytestring -- @return a bytestring
function LibBase64:Decode(text) function LibBase64:Decode(text)
if type(text) ~= "string" then if type(text) ~= "string" then
error(format("Bad argument #1 to `Decode'. Expected %q, got %q", "string", type(text)), 2) error(format("Bad argument #1 to `Decode'. Expected %q, got %q", "string", type(text)), 2)
end end
for i = 1, getn(text) do for i = 1, getn(text) do
local byte = byte(text, i) local byte = byte(text, i)
if whitespace[byte] or byte == equals_byte then if whitespace[byte] or byte == equals_byte then
-- do nothing -- do nothing
else else
local num = byteToNum[byte] local num = byteToNum[byte]
if not num then if not num then
for i = 1, getn(t2) do for i = 1, getn(t2) do
t2[k] = nil t2[k] = nil
end end
error(format("Bad argument #1 to `Decode'. Received an invalid char: %q", sub(text, i, i)), 2) error(format("Bad argument #1 to `Decode'. Received an invalid char: %q", sub(text, i, i)), 2)
end end
t2[getn(t2)+1] = num t2[getn(t2)+1] = num
end end
end end
for i = 1, getn(t2), 4 do for i = 1, getn(t2), 4 do
local a, b, c, d = t2[i], t2[i+1], t2[i+2], t2[i+3] local a, b, c, d = t2[i], t2[i+1], t2[i+2], t2[i+3]
local nilNum = 0 local nilNum = 0
if not c then if not c then
+5 -5
View File
@@ -137,7 +137,7 @@ function LibCompress:TableToString(t)
if t == nil then return nil end if t == nil then return nil end
if type(t)=="string" then return t end if type(t)=="string" then return t end
local cache={} local cache={}
local function sub_mod(t) local function sub_mod(t)
if (type(t)=="table") then if (type(t)=="table") then
for pos,val in pairs(t) do for pos,val in pairs(t) do
if (type(val)=="table") then if (type(val)=="table") then
@@ -153,8 +153,8 @@ function LibCompress:TableToString(t)
else else
table_insert(cache, tostring(t)) table_insert(cache, tostring(t))
end end
end end
sub_mod(t) sub_mod(t)
return table_concat(cache, ",") -- ? maybe use a different delimiter return table_concat(cache, ",") -- ? maybe use a different delimiter
end end
@@ -784,10 +784,10 @@ function LibCompress:Compress(data)
n = compression_methods[method](self, data) n = compression_methods[method](self, data)
nTable = {} nTable = {}
for i = 1, strlen(n) do for i = 1, strlen(n) do
nTable[i] = string.sub(n, i, i) nTable[i] = string.sub(n, i, i)
end end
for i = 1, strlen(result) do for i = 1, strlen(result) do
rTable[i] = string.sub(result, i, i) rTable[i] = string.sub(result, i, i)
end end
if getn(nTable) < getn(rTable) then if getn(nTable) < getn(rTable) then
result = nTable result = nTable
@@ -39,7 +39,7 @@ end
function Lib:MatchAll(search) function Lib:MatchAll(search)
for phrase in gmatch(self:Clean(search), '[^&]+') do for phrase in gmatch(self:Clean(search), '[^&]+') do
if not self:MatchAny(phrase) then if not self:MatchAny(phrase) then
return return
end end
end end
@@ -49,7 +49,7 @@ end
function Lib:MatchAny(search) function Lib:MatchAny(search)
for phrase in gmatch(search, '[^|]+') do for phrase in gmatch(search, '[^|]+') do
if self:Match(phrase) then if self:Match(phrase) then
return true return true
end end
end end
end end
@@ -161,10 +161,10 @@ local escapes = {
} }
local function CleanString(str) local function CleanString(str)
for k, v in pairs(escapes) do for k, v in pairs(escapes) do
str = string.gsub(str, k, v) str = string.gsub(str, k, v)
end end
return str return str
end end
Lib.Filters.tipPhrases = { Lib.Filters.tipPhrases = {
@@ -203,9 +203,9 @@ Lib.Filters.tipPhrases = {
cache = setmetatable({}, {__index = function(t, k) local v = {} t[k] = v return v end}), cache = setmetatable({}, {__index = function(t, k) local v = {} t[k] = v return v end}),
keywords = { keywords = {
[lower(ITEM_SOULBOUND)] = ITEM_BIND_ON_PICKUP, [lower(ITEM_SOULBOUND)] = ITEM_BIND_ON_PICKUP,
["bound"] = ITEM_BIND_ON_PICKUP, ["bound"] = ITEM_BIND_ON_PICKUP,
["bop"] = ITEM_BIND_ON_PICKUP, ["bop"] = ITEM_BIND_ON_PICKUP,
["boe"] = ITEM_BIND_ON_EQUIP, ["boe"] = ITEM_BIND_ON_EQUIP,
["bou"] = ITEM_BIND_ON_USE ["bou"] = ITEM_BIND_ON_USE
} }
@@ -232,8 +232,8 @@ function L_UIDropDownMenu_CreateFrames(level, index)
newList:SetWidth(180) newList:SetWidth(180)
newList:SetHeight(10) newList:SetHeight(10)
--Allow closing with escape --Allow closing with escape
tinsert(UIMenus, "L_DropDownList"..L_UIDROPDOWNMENU_MAXLEVELS) tinsert(UIMenus, "L_DropDownList"..L_UIDROPDOWNMENU_MAXLEVELS)
for i=L_UIDROPDOWNMENU_MINBUTTONS+1, L_UIDROPDOWNMENU_MAXBUTTONS do for i=L_UIDROPDOWNMENU_MINBUTTONS+1, L_UIDROPDOWNMENU_MAXBUTTONS do
local newButton = CreateFrame("Button", "L_DropDownList"..L_UIDROPDOWNMENU_MAXLEVELS.."Button"..i, newList, "L_UIDropDownMenuButtonTemplate"); local newButton = CreateFrame("Button", "L_DropDownList"..L_UIDROPDOWNMENU_MAXLEVELS.."Button"..i, newList, "L_UIDropDownMenuButtonTemplate");
+64 -64
View File
@@ -139,9 +139,9 @@ local queue_quiet = {
lib['WHOLIB_FLAG_ALWAYS_CALLBACK'] = 1 lib['WHOLIB_FLAG_ALWAYS_CALLBACK'] = 1
function lib:Reset() function lib:Reset()
self.Queue = {[1]={}, [2]={}, [3]={}} self.Queue = {[1]={}, [2]={}, [3]={}}
self.Cache = {} self.Cache = {}
self.CacheQueue = {} self.CacheQueue = {}
end end
function lib.Who(defhandler, query, opts) function lib.Who(defhandler, query, opts)
@@ -169,10 +169,10 @@ function lib.UserInfo(defhandler, name, opts)
local self, args, usage = lib, {}, 'UserInfo(name, [opts])' local self, args, usage = lib, {}, 'UserInfo(name, [opts])'
local now = time() local now = time()
name = self:CheckArgument(usage, 'name', 'string', name) name = self:CheckArgument(usage, 'name', 'string', name)
if strlen(name) == 0 then return end if strlen(name) == 0 then return end
if string.find(name, "%-") then --[[dbg("ignoring xrealm: "..name)]] return end if string.find(name, "%-") then --[[dbg("ignoring xrealm: "..name)]] return end
args.name = self:CapitalizeInitial(name) args.name = self:CapitalizeInitial(name)
opts = self:CheckArgument(usage, 'opts', 'table', opts, {}) opts = self:CheckArgument(usage, 'opts', 'table', opts, {})
@@ -218,27 +218,27 @@ function lib.UserInfo(defhandler, name, opts)
return nil return nil
end end
if (GetLocale() == "ruRU") then -- in ruRU with n- not show information about player in WIM addon if (GetLocale() == "ruRU") then -- in ruRU with n- not show information about player in WIM addon
if args.name and strlen(args.name) > 0 then if args.name and strlen(args.name) > 0 then
local query = 'и-"' .. args.name .. '"' local query = 'и-"' .. args.name .. '"'
cachedName.inqueue = true cachedName.inqueue = true
if(args.callback ~= nil)then if(args.callback ~= nil)then
tinsert(cachedName.callback, args) tinsert(cachedName.callback, args)
end end
self.CacheQueue[query] = args.name self.CacheQueue[query] = args.name
dbg('Info(' .. args.name ..') added to queue') dbg('Info(' .. args.name ..') added to queue')
self:AskWho( { query = query, queue = args.queue, flags = 0, info = args.name } ) self:AskWho( { query = query, queue = args.queue, flags = 0, info = args.name } )
end end
else else
if args.name and strlen(args.name) > 0 then if args.name and strlen(args.name) > 0 then
local query = 'n-"' .. args.name .. '"' local query = 'n-"' .. args.name .. '"'
cachedName.inqueue = true cachedName.inqueue = true
if(args.callback ~= nil)then if(args.callback ~= nil)then
tinsert(cachedName.callback, args) tinsert(cachedName.callback, args)
end end
self.CacheQueue[query] = args.name self.CacheQueue[query] = args.name
dbg('Info(' .. args.name ..') added to queue') dbg('Info(' .. args.name ..') added to queue')
self:AskWho( { query = query, queue = args.queue, flags = 0, info = args.name } ) self:AskWho( { query = query, queue = args.queue, flags = 0, info = args.name } )
end end
end end
return nil return nil
end end
@@ -256,11 +256,11 @@ function lib.CachedUserInfo(_, name)
end end
function lib.GetWhoLibDebug(_, mode) function lib.GetWhoLibDebug(_, mode)
return lib.Debug return lib.Debug
end end
function lib.SetWhoLibDebug(_, mode) function lib.SetWhoLibDebug(_, mode)
lib.Debug = mode lib.Debug = mode
dbg = mode and dbgfunc or NOP dbg = mode and dbgfunc or NOP
end end
@@ -298,12 +298,12 @@ end
--- ---
function lib:AllQueuesEmpty() function lib:AllQueuesEmpty()
local queueCount = getn(self.Queue[1]) + getn(self.Queue[2]) + getn(self.Queue[3]) + getn(self.CacheQueue) local queueCount = getn(self.Queue[1]) + getn(self.Queue[2]) + getn(self.Queue[3]) + getn(self.CacheQueue)
-- Be sure that we have cleared the in-progress status -- Be sure that we have cleared the in-progress status
if self.WhoInProgress then if self.WhoInProgress then
queueCount = queueCount + 1 queueCount = queueCount + 1
end end
return queueCount == 0 return queueCount == 0
end end
@@ -344,19 +344,19 @@ local INSTANT_QUERY_MIN_INTERVAL = 60 -- only once every 1 min
function lib:UpdateWeights() function lib:UpdateWeights()
local weightsum, sum, count = 0, 0, 0 local weightsum, sum, count = 0, 0, 0
for k,v in pairs(queue_weights) do for k,v in pairs(queue_weights) do
sum = sum + v sum = sum + v
weightsum = weightsum + v * getn(self.Queue[k]) weightsum = weightsum + v * getn(self.Queue[k])
end end
if weightsum == 0 then if weightsum == 0 then
for k,v in pairs(queue_weights) do queue_bounds[k] = v end for k,v in pairs(queue_weights) do queue_bounds[k] = v end
return return
end end
local adjust = sum / weightsum local adjust = sum / weightsum
for k,v in pairs(queue_bounds) do for k,v in pairs(queue_bounds) do
queue_bounds[k] = queue_weights[k] * adjust * getn(self.Queue[k]) queue_bounds[k] = queue_weights[k] * adjust * getn(self.Queue[k])
end end
end end
@@ -376,17 +376,17 @@ function lib:GetNextFromScheduler()
local n,i = math.random(),0 local n,i = math.random(),0
repeat repeat
i=i+1 i=i+1
n = n - queue_bounds[i] n = n - queue_bounds[i]
until i >= getn(self.Queue) or n <= 0 until i >= getn(self.Queue) or n <= 0
dbg(string.format("Q=%d, bound=%d", i, queue_bounds[i])) dbg(string.format("Q=%d, bound=%d", i, queue_bounds[i]))
if getn(self.Queue[i]) > 0 then if getn(self.Queue[i]) > 0 then
dbg(string.format("Q=%d, bound=%d", i, queue_bounds[i])) dbg(string.format("Q=%d, bound=%d", i, queue_bounds[i]))
return i, self.Queue[i] return i, self.Queue[i]
else else
dbg("Queues empty, waiting") dbg("Queues empty, waiting")
end end
end end
@@ -424,10 +424,10 @@ function lib:AskWhoNext()
self.WhoInProgress = false self.WhoInProgress = false
local v,k,args = nil local v,k,args = nil
local kludge = 10 local kludge = 10
repeat repeat
k, v = self:GetNextFromScheduler() k, v = self:GetNextFromScheduler()
if not k then break end if not k then break end
if WhoFrame:IsShown() and k > self.WHOLIB_QUEUE_QUIET then if WhoFrame:IsShown() and k > self.WHOLIB_QUEUE_QUIET then
break break
end end
@@ -435,7 +435,7 @@ function lib:AskWhoNext()
args = tremove(v, 1) args = tremove(v, 1)
break break
end end
kludge = kludge - 1 kludge = kludge - 1
until kludge <= 0 until kludge <= 0
if args then if args then
@@ -453,9 +453,9 @@ function lib:AskWhoNext()
self.Quiet = false self.Quiet = false
if args.whotoui then if args.whotoui then
-- self.hooked.SetWhoToUI(args.whotoui) -- self.hooked.SetWhoToUI(args.whotoui)
else else
-- self.hooked.SetWhoToUI(args.gui and true or false) -- self.hooked.SetWhoToUI(args.gui and true or false)
end end
else else
-- self.hooked.SetWhoToUI(true) -- self.hooked.SetWhoToUI(true)
@@ -469,11 +469,11 @@ function lib:AskWhoNext()
self.WhoInProgress = false self.WhoInProgress = false
end end
-- Keep processing the who queue if there is more work -- Keep processing the who queue if there is more work
if not self:AllQueuesEmpty() then if not self:AllQueuesEmpty() then
self:AskWhoNextIn5sec() self:AskWhoNextIn5sec()
else else
dbg("*** Done processing requests ***") dbg("*** Done processing requests ***")
end end
end end
@@ -486,10 +486,10 @@ function lib:AskWho(args)
end end
function lib:ReturnWho() function lib:ReturnWho()
if not self.Args then if not self.Args then
self.Quiet = nil self.Quiet = nil
return return
end end
if(self.Args.queue == self.WHOLIB_QUEUE_QUIET or self.Args.queue == self.WHOLIB_QUEUE_SCANNING)then if(self.Args.queue == self.WHOLIB_QUEUE_QUIET or self.Args.queue == self.WHOLIB_QUEUE_SCANNING)then
self.Quiet = nil self.Quiet = nil
@@ -723,7 +723,7 @@ end
local MULTIBYTE_FIRST_CHAR = "^([\192-\255]?%a?[\128-\191]*)" local MULTIBYTE_FIRST_CHAR = "^([\192-\255]?%a?[\128-\191]*)"
function lib:CapitalizeInitial(name) function lib:CapitalizeInitial(name)
return string.gsub(name, MULTIBYTE_FIRST_CHAR, string.upper, 1) return string.gsub(name, MULTIBYTE_FIRST_CHAR, string.upper, 1)
end end
--- ---
@@ -736,7 +736,7 @@ lib.PossibleEvents = {
} }
function lib:TriggerEvent(...) function lib:TriggerEvent(...)
callbacks:Fire(event, unpack(arg)) callbacks:Fire(event, unpack(arg))
end end
--- ---
@@ -761,7 +761,7 @@ SlashCmdList['WHOLIB_DEBUG'] = function()
-- /wholibdebug: toggle debug on/off -- /wholibdebug: toggle debug on/off
local self = lib local self = lib
self:SetWhoLibDebug(not self.Debug) self:SetWhoLibDebug(not self.Debug)
end end
SLASH_WHOLIB_DEBUG1 = '/wholibdebug' SLASH_WHOLIB_DEBUG1 = '/wholibdebug'
@@ -889,12 +889,12 @@ end
FriendsFrame:UnregisterEvent("WHO_LIST_UPDATE") FriendsFrame:UnregisterEvent("WHO_LIST_UPDATE")
function lib:WHO_LIST_UPDATE() function lib:WHO_LIST_UPDATE()
if not lib.Quiet then if not lib.Quiet then
WhoList_Update() WhoList_Update()
FriendsFrame_Update() FriendsFrame_Update()
end end
lib:ProcessWhoResults() lib:ProcessWhoResults()
end end
function lib:ProcessWhoResults() function lib:ProcessWhoResults()
+9 -9
View File
@@ -28,7 +28,7 @@ local bind = CreateFrame("Frame", "ElvUI_KeyBinder", E.UIParent)
function AB:ActivateBindMode() function AB:ActivateBindMode()
bind.active = true bind.active = true
E:StaticPopupSpecial_Show(ElvUIBindPopupWindow) E:StaticPopupSpecial_Show(ElvUIBindPopupWindow)
AB:RegisterEvent("PLAYER_REGEN_DISABLED", "DeactivateBindMode", false) AB:RegisterEvent("PLAYER_REGEN_DISABLED", "DeactivateBindMode", false)
end end
@@ -265,7 +265,7 @@ function AB:LoadKeyBinder()
for b, _ in pairs(self["handledButtons"]) do for b, _ in pairs(self["handledButtons"]) do
self:RegisterButton(b, true) self:RegisterButton(b, true)
end end
if not IsAddOnLoaded("Blizzard_MacroUI") then if not IsAddOnLoaded("Blizzard_MacroUI") then
self:SecureHook("LoadAddOn", "RegisterMacro") self:SecureHook("LoadAddOn", "RegisterMacro")
@@ -282,11 +282,11 @@ function AB:LoadKeyBinder()
f:SetFrameLevel(99) f:SetFrameLevel(99)
f:SetClampedToScreen(true) f:SetClampedToScreen(true)
E:Size(f, 360, 130) E:Size(f, 360, 130)
E:SetTemplate(f, "Transparent") E:SetTemplate(f, "Transparent")
f:Hide() f:Hide()
local header = CreateFrame("Button", nil, f) local header = CreateFrame("Button", nil, f)
E:SetTemplate(header, "Default", true) E:SetTemplate(header, "Default", true)
E:Size(header, 100, 25) E:Size(header, 100, 25)
E:Point(header, "CENTER", f, "TOP") E:Point(header, "CENTER", f, "TOP")
header:SetFrameLevel(header:GetFrameLevel() + 2) header:SetFrameLevel(header:GetFrameLevel() + 2)
@@ -295,8 +295,8 @@ function AB:LoadKeyBinder()
header:SetScript("OnMouseDown", function() f:StartMoving() end) header:SetScript("OnMouseDown", function() f:StartMoving() end)
header:SetScript("OnMouseUp", function() f:StopMovingOrSizing() end) header:SetScript("OnMouseUp", function() f:StopMovingOrSizing() end)
local title = header:CreateFontString("OVERLAY") local title = header:CreateFontString("OVERLAY")
E:FontTemplate(title) E:FontTemplate(title)
E:Point(title, "CENTER", header, "CENTER") E:Point(title, "CENTER", header, "CENTER")
title:SetText("Key Binds") title:SetText("Key Binds")
@@ -311,8 +311,8 @@ function AB:LoadKeyBinder()
local perCharCheck = CreateFrame("CheckButton", f:GetName().."CheckButton", f, "OptionsCheckButtonTemplate") local perCharCheck = CreateFrame("CheckButton", f:GetName().."CheckButton", f, "OptionsCheckButtonTemplate")
_G[perCharCheck:GetName() .. "Text"]:SetText(CHARACTER_SPECIFIC_KEYBINDINGS) _G[perCharCheck:GetName() .. "Text"]:SetText(CHARACTER_SPECIFIC_KEYBINDINGS)
perCharCheck:SetScript("OnShow", function() perCharCheck:SetScript("OnShow", function()
perCharCheck:SetChecked(GetCurrentBindingSet() == 2) perCharCheck:SetChecked(GetCurrentBindingSet() == 2)
end) end)
perCharCheck:SetScript("OnClick", function() perCharCheck:SetScript("OnClick", function()
+5 -5
View File
@@ -185,11 +185,11 @@ function AFK:OnEvent(event, ...)
if not E.db.general.afk then return end if not E.db.general.afk then return end
if UnitAffectingCombat("player") or CinematicFrame:IsShown() then return end if UnitAffectingCombat("player") or CinematicFrame:IsShown() then return end
-- if UnitCastingInfo("player") ~= nil then -- if UnitCastingInfo("player") ~= nil then
-- --Don't activate afk if player is crafting stuff, check back in 30 seconds -- --Don't activate afk if player is crafting stuff, check back in 30 seconds
-- self:ScheduleTimer("OnEvent", 30) -- self:ScheduleTimer("OnEvent", 30)
-- return -- return
-- end -- end
if arg1 == format(MARKED_AFK_MESSAGE, DEFAULT_AFK_MESSAGE) then if arg1 == format(MARKED_AFK_MESSAGE, DEFAULT_AFK_MESSAGE) then
self:SetAFK(true) self:SetAFK(true)