- switching to new C_AddOns API changes
- cascaded message hooking for Retail v12 engine - messages during encounters are sent unchanged, with a one-time notice - ignore numbered chats that do not exist - /r no longer sends to an empty whisper target if the last told target is unavailable - fixed replacements in instance chats - messages to unknown numbered channels are now discarded - right-click on the minimap button
This commit is contained in:
+4
-2
@@ -20,6 +20,7 @@ local _G = _G
|
||||
|
||||
-- initialize addon
|
||||
local Grichelde = LibStub("AceAddon-3.0"):NewAddon(AddonTable, AddonName, "AceConsole-3.0", "AceEvent-3.0", "AceHook-3.0")
|
||||
local GetAddOnMetadata = (_G.C_AddOns and _G.C_AddOns.GetAddOnMetadata) or _G.GetAddOnMetadata
|
||||
Grichelde.version = GetAddOnMetadata(AddonName, "Version")
|
||||
Grichelde.build = GetAddOnMetadata(AddonName, "X-Build") or "Development"
|
||||
--Grichelde.era = _G.WOW_PROJECT_ID == _G.WOW_PROJECT_CLASSIC
|
||||
@@ -40,7 +41,7 @@ end
|
||||
|
||||
function Grichelde:OnEnable()
|
||||
-- Hook in before message is sent to replace all character occurrences where replacements have been defined in the options
|
||||
self:RawHook("SendChatMessage", true)
|
||||
self:HookSendChatMessage()
|
||||
|
||||
self.options, self.dialog = self:SetupOptions()
|
||||
self.ldb, self.icon = self:MinimapButton()
|
||||
@@ -56,7 +57,8 @@ function Grichelde:OnEnable()
|
||||
end
|
||||
|
||||
function Grichelde:OnDisable()
|
||||
self:Unhook("SendChatMessage")
|
||||
self:UnhookAll()
|
||||
self.originalSend = nil
|
||||
self:CloseOptions()
|
||||
self:HideMinimapButton()
|
||||
self:UnregisterChatCommand("grichelde")
|
||||
|
||||
Reference in New Issue
Block a user