diff --git a/Modules/ManageEntries.lua b/Modules/ManageEntries.lua index 9463d05e..61b28108 100644 --- a/Modules/ManageEntries.lua +++ b/Modules/ManageEntries.lua @@ -305,7 +305,7 @@ end function ChangeTeamName(index, _name) MonDKP:GetTable(MonDKP_DB, false)["teams"][tostring(index)].name = _name; - MonDKP.Sync:SendData("MonDKPTeams", MonDKP:GetTable(MonDKP_DB, false)["teams"], "GUILD") + MonDKP.Sync:SendData("MonDKPTeams", {Teams = MonDKP:GetTable(MonDKP_DB, false)["teams"]} , nil) end local function AddNewTeamToGuild() @@ -336,7 +336,7 @@ local function AddNewTeamToGuild() MonDKP:GetTable(MonDKP_Standby, false)[tostring(_index)] = {} MonDKP:GetTable(MonDKP_Archive, false)[tostring(_index)] = {} - MonDKP.Sync:SendData("MonDKPTeams", MonDKP:GetTable(MonDKP_DB, false)["teams"], "GUILD") + MonDKP.Sync:SendData("MonDKPTeams", {Teams = MonDKP:GetTable(MonDKP_DB, false)["teams"]} , nil) end ------- diff --git a/Modules/comm.lua b/Modules/comm.lua index 7796ffeb..ae8475e4 100644 --- a/Modules/comm.lua +++ b/Modules/comm.lua @@ -128,9 +128,14 @@ function MonDKP.Sync:OnCommReceived(prefix, message, distribution, sender) return end elseif prefix == "MonDKPTeams" then - MonDKP:GetTable(MonDKP_DB, false)["teams"] = message; + decoded = LibDeflate:DecompressDeflate(LibDeflate:DecodeForWoWAddonChannel(message)) + local success, deserialized = LibAceSerializer:Deserialize(decoded); + if success then + MonDKP:GetTable(MonDKP_DB, false)["teams"] = deserialized.Teams + end + return; elseif prefix == "MonDKPCurTeam" then - core.DB.defaults.CurrentTeam = message; + MonDKP:SetCurrentTeam(message) -- this also refreshes all the tables/views/graphs return elseif prefix == "MonDKPTalents" then local search = MonDKP:Table_Search(MonDKP:GetTable(MonDKP_DKPTable, true), sender, "player")