- Fixed major issue with the statistics sharing.

- Added a new to disable score messages by using /run Details.deny_score_messages = true;
- minor fix in the framework to stop a warning in the beta of BfA.
This commit is contained in:
Tercio
2018-04-27 13:31:55 -03:00
parent 1823dab929
commit febf9dd34f
4 changed files with 46 additions and 9 deletions
+40 -3
View File
@@ -1009,6 +1009,11 @@ end
--remote call RoS
function _detalhes.storage:GetIDsToGuildSync()
local db = _detalhes.storage:OpenRaidStorage()
if (db) then
return
end
local IDs = {}
--build the encounter ID list
@@ -1038,6 +1043,10 @@ end
function _detalhes.storage:CheckMissingIDsToGuildSync (IDsList)
local db = _detalhes.storage:OpenRaidStorage()
if (db) then
return
end
if (type (IDsList) ~= "table") then
if (_detalhes.debug) then
_detalhes:Msg ("(debug) [RoS-EncounterSync] RoC IDsList isn't a table.")
@@ -1072,6 +1081,10 @@ end
function _detalhes.storage:BuildEncounterDataToGuildSync (IDsList)
local db = _detalhes.storage:OpenRaidStorage()
if (db) then
return
end
if (type (IDsList) ~= "table") then
if (_detalhes.debug) then
_detalhes:Msg ("(debug) [RoS-EncounterSync] IDsList isn't a table.")
@@ -1132,6 +1145,10 @@ end
function _detalhes.storage:AddGuildSyncData (data, source)
local db = _detalhes.storage:OpenRaidStorage()
if (db) then
return
end
local AddedAmount = 0
_detalhes.LastGuildSyncReceived = GetTime()
@@ -1189,6 +1206,11 @@ end
function _detalhes.storage:ListDiffs()
local db = _detalhes.storage:OpenRaidStorage()
if (db) then
return
end
local t = {}
for diff, _ in pairs (db) do
tinsert (t, diff)
@@ -1199,6 +1221,10 @@ end
function _detalhes.storage:ListEncounters (diff)
local db = _detalhes.storage:OpenRaidStorage()
if (db) then
return
end
local t = {}
if (diff) then
local table = db [diff]
@@ -1221,6 +1247,10 @@ end
function _detalhes.storage:GetPlayerData (diff, encounter_id, playername)
local db = _detalhes.storage:OpenRaidStorage()
if (db) then
return
end
local t = {}
assert (type (playername) == "string", "PlayerName must be a string.")
@@ -1576,9 +1606,13 @@ function _detalhes:StoreEncounter (combat)
end
if (myBestDps > d_one) then
print (Loc ["STRING_DETAILS1"] .. format (Loc ["STRING_SCORE_NOTBEST"], _detalhes:ToK2 (d_one), _detalhes:ToK2 (myBestDps), onencounter.date, mybest[2]))
if (not _detalhes.deny_score_messages) then
print (Loc ["STRING_DETAILS1"] .. format (Loc ["STRING_SCORE_NOTBEST"], _detalhes:ToK2 (d_one), _detalhes:ToK2 (myBestDps), onencounter.date, mybest[2]))
end
else
print (Loc ["STRING_DETAILS1"] .. format (Loc ["STRING_SCORE_BEST"], _detalhes:ToK2 (d_one)))
if (not _detalhes.deny_score_messages) then
print (Loc ["STRING_DETAILS1"] .. format (Loc ["STRING_SCORE_BEST"], _detalhes:ToK2 (d_one)))
end
end
end
@@ -1594,7 +1628,10 @@ function _detalhes:StoreEncounter (combat)
local func = {_detalhes.OpenRaidHistoryWindow, _detalhes, raid_name, encounter_id, diff, my_role, guildName} --, 2, UnitName ("player")
--local icon = {[[Interface\AddOns\Details\images\icons]], 16, 16, false, 434/512, 466/512, 243/512, 273/512}
local icon = {[[Interface\PvPRankBadges\PvPRank08]], 16, 16, false, 0, 1, 0, 1}
instance:InstanceAlert (Loc ["STRING_GUILDDAMAGERANK_WINDOWALERT"], icon, _detalhes.update_warning_timeout, func, true)
if (not _detalhes.deny_score_messages) then
instance:InstanceAlert (Loc ["STRING_GUILDDAMAGERANK_WINDOWALERT"], icon, _detalhes.update_warning_timeout, func, true)
end
end
end
else