Fix unregister events, allow modules to be ignored on classic
This commit is contained in:
parent
0d504c5821
commit
cfdd833196
|
@ -118,7 +118,7 @@ end
|
|||
function modul:Disable()
|
||||
self['status'] = false
|
||||
for event, func in pairs(events) do
|
||||
child:UnregisterEvent(event)
|
||||
self['frame']:UnregisterEvent(event)
|
||||
end
|
||||
end
|
||||
local init = {
|
||||
|
|
|
@ -125,7 +125,6 @@ end
|
|||
local function GameTooltip_SetHyperlink(tooltip, link)
|
||||
SetCurrencyByID(tooltip, tonumber(link:match("currency:(%d+)")))
|
||||
end
|
||||
|
||||
function events:CURRENCY_DISPLAY_UPDATE(event)
|
||||
local playerID = child.getPID()
|
||||
if(playerID) then
|
||||
|
@ -201,6 +200,7 @@ function modul:Disable()
|
|||
end
|
||||
end
|
||||
end
|
||||
child:IgnoreClassic(modulname)
|
||||
local init = {
|
||||
Setup = function(self)
|
||||
db = child['db']
|
||||
|
|
|
@ -206,6 +206,7 @@ function modul:Disable()
|
|||
end
|
||||
end
|
||||
end
|
||||
child:IgnoreClassic(modulname)
|
||||
local init = {
|
||||
Setup = function(self)
|
||||
db = child['db']
|
||||
|
|
|
@ -22,10 +22,16 @@ SEND_MAIL_COD_CHANGED
|
|||
SEND_MAIL_MONEY_CHANGED
|
||||
UPDATE_PENDING_MAIL
|
||||
]]
|
||||
function events:MAIL_SEND_INFO_UPDATE()
|
||||
function events:MAIL_SEND_SUCCESS()
|
||||
print("mail_send_success")
|
||||
end
|
||||
function events:MAIL_SUCCESS(event, itemID)
|
||||
print(event, itemID)
|
||||
end
|
||||
function events:MAIL_SEND_INFO_UPDATE() -- item changed
|
||||
print("update")
|
||||
end
|
||||
function events:SEND_MAIL_COD_CHANGED()
|
||||
function events:SEND_MAIL_COD_CHANGED() -- price added
|
||||
print("cod changed")
|
||||
end
|
||||
function events:MAIL_LOCK_SEND_ITEMS(event, attachSlot, itemLink)
|
||||
|
@ -66,7 +72,7 @@ end
|
|||
function modul:Disable()
|
||||
self['status'] = false
|
||||
for event, func in pairs(events) do
|
||||
child:UnregisterEvent(event)
|
||||
self['frame']:UnregisterEvent(event)
|
||||
end
|
||||
end
|
||||
local init = {
|
||||
|
|
|
@ -120,9 +120,10 @@ end
|
|||
function modul:Disable()
|
||||
self['status'] = false
|
||||
for event, func in pairs(events) do
|
||||
child:UnregisterEvent(event)
|
||||
self['frame']:UnregisterEvent(event)
|
||||
end
|
||||
end
|
||||
child:IgnoreClassic(modulname)
|
||||
local init = {
|
||||
Setup = function(self)
|
||||
db = child['db']
|
||||
|
|
|
@ -4,11 +4,7 @@ local child = addon[childName]
|
|||
child['moduls'] = {}
|
||||
local moduls = child['moduls']
|
||||
local db
|
||||
local skipClassic = {
|
||||
['void'] = true,
|
||||
['guildbank'] = true,
|
||||
['currency'] = true
|
||||
}
|
||||
local skipClassic = {}
|
||||
function child:GetModul(modName)
|
||||
for k,modul in pairs(moduls) do
|
||||
if(modul.name==modName) then
|
||||
|
|
Loading…
Reference in New Issue