Загрузить файлы в «/»
This commit is contained in:
+1
-1
@@ -2,7 +2,7 @@
|
||||
## Title: Ade Alts
|
||||
## Notes: Alt manager: cooldowns, inventory, bank, gear, professions and missing recipes of all your characters. /ade
|
||||
## Author: Ade
|
||||
## Version: 1.2.0
|
||||
## Version: 1.2.1
|
||||
## SavedVariables: AdeAltsDB, ProfCDTrackerDB
|
||||
## OptionalDeps: pfUI, SuperWoW, nampower
|
||||
core.lua
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
# Changelog
|
||||
|
||||
## 1.2.1
|
||||
- `/ade del` now also ignores the character afterwards (it was re-added by the next chat broadcast). New `/ade unignore <name>` and `/ade chat` (switch guild / party / raid sync off).
|
||||
|
||||
## 1.2.0
|
||||
- Professions view reworked: **Known / Missing** recipes per profession, required skill level in front of every
|
||||
recipe (coloured by how close it is to the current skill), sort by **Level** or **Name**.
|
||||
|
||||
@@ -7,7 +7,7 @@ local AA = AdeAlts
|
||||
-- Command: /pcd Minimap button: auto-docked by pfUI's addon button panel.
|
||||
|
||||
AA.ADDON = "AdeAlts"
|
||||
AA.VERSION = "1.2.0"
|
||||
AA.VERSION = "1.2.1"
|
||||
AA.PREFIX = "PCDT"
|
||||
AA.DAY = 86400
|
||||
AA.RDATA = {} -- recipe database, filled by the data_*.lua files
|
||||
|
||||
+20
-3
@@ -163,7 +163,7 @@ ev:SetScript("OnEvent", function()
|
||||
AA.bagDirty = true
|
||||
|
||||
elseif event == "CHAT_MSG_ADDON" then
|
||||
if arg1 == AA.PREFIX and AA.db and arg4 ~= UnitName("player") then
|
||||
if arg1 == AA.PREFIX and AA.db and not AA.db.noChat and arg4 ~= UnitName("player") then
|
||||
if arg2 == "R" then
|
||||
if AA.me and GetTime() - AA.lastReply > 5 then
|
||||
AA.lastReply = GetTime()
|
||||
@@ -266,16 +266,33 @@ SlashCmdList["PROFCD"] = function(msg)
|
||||
elseif cmd == "del" and arg ~= "" then
|
||||
local a = string.lower(arg)
|
||||
local n = 0
|
||||
AA.db.ignored = AA.db.ignored or {}
|
||||
for k, c in pairs(AA.db.chars) do
|
||||
if k ~= AA.myKey and (string.lower(c.name) == a or string.lower(k) == a) then
|
||||
AA.db.chars[k] = nil
|
||||
AA.db.ignored[k] = true -- do not accept this character again from chat / shared file
|
||||
n = n + 1
|
||||
end
|
||||
end
|
||||
AA.Print("removed " .. n .. " character(s).")
|
||||
AA.Print("removed " .. n .. " character(s) and ignoring them from now on (/ade unignore <name> undoes it).")
|
||||
AA.fileDirty = true
|
||||
AA.Refresh()
|
||||
if AA.RefreshManager then AA.RefreshManager() end
|
||||
elseif cmd == "unignore" and arg ~= "" then
|
||||
local a = string.lower(arg)
|
||||
local n = 0
|
||||
for k in pairs(AA.db.ignored or {}) do
|
||||
if string.lower(k) == a or string.lower(string.gsub(k, "%-.*$", "")) == a then
|
||||
AA.db.ignored[k] = nil
|
||||
n = n + 1
|
||||
end
|
||||
end
|
||||
AA.Print("no longer ignoring " .. n .. " character(s).")
|
||||
elseif cmd == "chat" then
|
||||
AA.db.noChat = not AA.db.noChat
|
||||
AA.Print("guild / party / raid sync " .. (AA.db.noChat and "|cffff6060OFF|r (nothing is sent or accepted from chat)" or "|cff40ff40ON|r") .. ".")
|
||||
else
|
||||
AA.Print("/ade - alts window | cd (cooldowns) | find <item> | list | sync | scan | status | debug | bags | export | import | minimap | alert | reset | del <name>")
|
||||
AA.Print("/ade - alts window | cd (cooldowns) | find <item> | list | sync | scan | status | debug | bags | chat | unignore <name> | export | import | minimap | alert | reset | del <name>")
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@ local function Encode(c)
|
||||
end
|
||||
|
||||
function AA.Send(msg)
|
||||
if AA.db and AA.db.noChat then return end
|
||||
if IsInGuild and IsInGuild() then SendAddonMessage(AA.PREFIX, msg, "GUILD") end
|
||||
if GetNumRaidMembers() > 0 then
|
||||
SendAddonMessage(AA.PREFIX, msg, "RAID")
|
||||
@@ -40,6 +41,7 @@ function AA.ReceiveRecord(text)
|
||||
if not name or name == "" then return false end
|
||||
upd = tonumber(upd) or 0
|
||||
local k = name .. "-" .. realm
|
||||
if AA.db.ignored and AA.db.ignored[k] then return false end
|
||||
local c = AA.db.chars[k]
|
||||
if c and (c.updated or 0) > upd then return false end -- we already have newer data
|
||||
if not c then
|
||||
@@ -83,6 +85,7 @@ local function ReceiveAlt(text)
|
||||
string.find(text, "^A%^([^%^]*)%^([^%^]*)%^([^%^]*)%^(%d*)%^(%d*)%^(%d*)%^(%d*)%^(%d*)%^([^%^]*)%^(.*)$")
|
||||
if not name or name == "" then return false end
|
||||
local k = name .. "-" .. realm
|
||||
if AA.db.ignored and AA.db.ignored[k] then return false end
|
||||
local c = AA.db.chars[k]
|
||||
if not c then
|
||||
c = { name = name, realm = realm, class = class, cds = {}, remote = true }
|
||||
@@ -132,6 +135,7 @@ local function ReceiveProf(text)
|
||||
if not name or name == "" or pname == "" then return false end
|
||||
if AA.BadProf(pname, tonumber(m)) then return false end
|
||||
local k = name .. "-" .. realm
|
||||
if AA.db.ignored and AA.db.ignored[k] then return false end
|
||||
local c = AA.db.chars[k]
|
||||
if not c then
|
||||
c = { name = name, realm = realm, cds = {}, remote = true }
|
||||
@@ -174,6 +178,7 @@ local function ReceiveEquip(text)
|
||||
local _, _, name, realm, ts, body = string.find(text, "^E%^([^%^]*)%^([^%^]*)%^(%d*)%^(.*)$")
|
||||
if not name or name == "" then return false end
|
||||
local k = name .. "-" .. realm
|
||||
if AA.db.ignored and AA.db.ignored[k] then return false end
|
||||
local c = AA.db.chars[k]
|
||||
if not c then
|
||||
c = { name = name, realm = realm, cds = {}, remote = true }
|
||||
@@ -201,6 +206,7 @@ local function ReceiveBags(text)
|
||||
string.find(text, "^B%^([^%^]*)%^([^%^]*)%^(%d*)%^(%d*)%^([^%^]*)%^(.*)$")
|
||||
if not name or name == "" then return false end
|
||||
local k = name .. "-" .. realm
|
||||
if AA.db.ignored and AA.db.ignored[k] then return false end
|
||||
local c = AA.db.chars[k]
|
||||
if not c then
|
||||
c = { name = name, realm = realm, cds = {}, remote = true }
|
||||
|
||||
Reference in New Issue
Block a user