Commit 6a787bf9 authored by Simpy's avatar Simpy 🐹

fix SendAddonMessage error

parent 4204fbb3
...@@ -12,7 +12,7 @@ local IsInGroup, IsInRaid = IsInGroup, IsInRaid ...@@ -12,7 +12,7 @@ local IsInGroup, IsInRaid = IsInGroup, IsInRaid
local GetAddOnMetadata = GetAddOnMetadata local GetAddOnMetadata = GetAddOnMetadata
local IsAddOnLoaded = IsAddOnLoaded local IsAddOnLoaded = IsAddOnLoaded
local C_ChatInfo_RegisterAddonMessagePrefix = C_ChatInfo.RegisterAddonMessagePrefix local C_ChatInfo_RegisterAddonMessagePrefix = C_ChatInfo.RegisterAddonMessagePrefix
local SendAddonMessage = SendAddonMessage local C_ChatInfo_SendAddonMessage = C_ChatInfo.SendAddonMessage
local GetNumGroupMembers = GetNumGroupMembers local GetNumGroupMembers = GetNumGroupMembers
local LE_PARTY_CATEGORY_HOME = LE_PARTY_CATEGORY_HOME local LE_PARTY_CATEGORY_HOME = LE_PARTY_CATEGORY_HOME
local LE_PARTY_CATEGORY_INSTANCE = LE_PARTY_CATEGORY_INSTANCE local LE_PARTY_CATEGORY_INSTANCE = LE_PARTY_CATEGORY_INSTANCE
...@@ -224,12 +224,12 @@ function lib:SendPluginVersionCheck(message) ...@@ -224,12 +224,12 @@ function lib:SendPluginVersionCheck(message)
splitMessage = strmatch(strsub(message, 1, maxChar), '.+;') splitMessage = strmatch(strsub(message, 1, maxChar), '.+;')
if splitMessage then -- incase the string is over 250 but doesnt contain `;` if splitMessage then -- incase the string is over 250 but doesnt contain `;`
message = gsub(message, "^"..gsub(splitMessage, '([%(%)%.%%%+%-%*%?%[%^%$])','%%%1'), "") message = gsub(message, "^"..gsub(splitMessage, '([%(%)%.%%%+%-%*%?%[%^%$])','%%%1'), "")
ElvUI[1]:Delay(delay, SendAddonMessage, lib.prefix, splitMessage, ChatType) ElvUI[1]:Delay(delay, C_ChatInfo_SendAddonMessage, lib.prefix, splitMessage, ChatType)
delay = delay + 1 delay = delay + 1
end end
end end
else else
SendAddonMessage(lib.prefix, message, ChatType) C_ChatInfo_SendAddonMessage(lib.prefix, message, ChatType)
end end
end end
......
...@@ -26,7 +26,7 @@ local InCombatLockdown = InCombatLockdown ...@@ -26,7 +26,7 @@ local InCombatLockdown = InCombatLockdown
local IsAddOnLoaded = IsAddOnLoaded local IsAddOnLoaded = IsAddOnLoaded
local IsInInstance, IsInGroup, IsInRaid = IsInInstance, IsInGroup, IsInRaid local IsInInstance, IsInGroup, IsInRaid = IsInInstance, IsInGroup, IsInRaid
local RequestBattlefieldScoreData = RequestBattlefieldScoreData local RequestBattlefieldScoreData = RequestBattlefieldScoreData
local SendAddonMessage = SendAddonMessage local C_ChatInfo_SendAddonMessage = C_ChatInfo.SendAddonMessage
local UnitGroupRolesAssigned = UnitGroupRolesAssigned local UnitGroupRolesAssigned = UnitGroupRolesAssigned
local UnitHasVehicleUI = UnitHasVehicleUI local UnitHasVehicleUI = UnitHasVehicleUI
local GetNumGroupMembers = GetNumGroupMembers local GetNumGroupMembers = GetNumGroupMembers
...@@ -907,9 +907,9 @@ end ...@@ -907,9 +907,9 @@ end
function E:SendMessage() function E:SendMessage()
if IsInRaid() then if IsInRaid() then
SendAddonMessage("ELVUI_VERSIONCHK", E.version, (not IsInRaid(LE_PARTY_CATEGORY_HOME) and IsInRaid(LE_PARTY_CATEGORY_INSTANCE)) and "INSTANCE_CHAT" or "RAID") C_ChatInfo_SendAddonMessage("ELVUI_VERSIONCHK", E.version, (not IsInRaid(LE_PARTY_CATEGORY_HOME) and IsInRaid(LE_PARTY_CATEGORY_INSTANCE)) and "INSTANCE_CHAT" or "RAID")
elseif IsInGroup() then elseif IsInGroup() then
SendAddonMessage("ELVUI_VERSIONCHK", E.version, (not IsInGroup(LE_PARTY_CATEGORY_HOME) and IsInGroup(LE_PARTY_CATEGORY_INSTANCE)) and "INSTANCE_CHAT" or "PARTY") C_ChatInfo_SendAddonMessage("ELVUI_VERSIONCHK", E.version, (not IsInGroup(LE_PARTY_CATEGORY_HOME) and IsInGroup(LE_PARTY_CATEGORY_INSTANCE)) and "INSTANCE_CHAT" or "PARTY")
end end
if E.SendMSGTimer then if E.SendMSGTimer then
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment