- attempt to fix the argus encounter double segments.

This commit is contained in:
Tercio
2017-12-06 20:37:04 -02:00
parent 817d847eb1
commit 32d03526da
5 changed files with 42 additions and 12 deletions
+2 -2
View File
@@ -3,7 +3,7 @@
_ = nil
_detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0", "NickTag-1.0")
_detalhes.build_counter = 4912
_detalhes.build_counter = 4913
_detalhes.userversion = "v7.3.0." .. _detalhes.build_counter
_detalhes.realversion = 128 --core version
_detalhes.version = _detalhes.userversion .. " (core " .. _detalhes.realversion .. ")"
@@ -51,7 +51,7 @@ do
--> quais raides devem ser guardadas no histórico
_detalhes.InstancesToStoreData = {
[1712] = true, --Antorus, the Burning Throne
[1676] = true, --Tomb of Sargeras
--[1676] = true, --Tomb of Sargeras
--[1648] = true, --Trial of Valor
--[1530] = true, --Nighthold
--[1520] = true, --Emerald Nightmare
+9 -1
View File
@@ -788,8 +788,16 @@
end
_detalhes.pre_pot_used = nil
_table_wipe (_detalhes.encounter_table)
--> do not wipe the encounter table if is in the argus encounter ~REMOVE on 8.0
if (_detalhes.encounter_table and _detalhes.encounter_table.id ~= 2092) then
_table_wipe (_detalhes.encounter_table)
else
if (_detalhes.debug) then
_detalhes:Msg ("(debug) in argus encounter, cannot wipe the encounter table.")
end
end
_detalhes:InstanceCall (_detalhes.CheckPsUpdate)
if (invalid_combat) then
+15 -9
View File
@@ -1400,7 +1400,7 @@ function _detalhes.OpenStorage()
end
function _detalhes:StoreEncounter (combat)
combat = combat or _detalhes.tabela_vigente
if (not combat) then
@@ -1409,7 +1409,7 @@ function _detalhes:StoreEncounter (combat)
end
return
end
local name, type, difficulty, difficultyName, maxPlayers, playerDifficulty, isDynamicInstance, mapID, instanceGroupSize = GetInstanceInfo()
if (not store_instances [mapID]) then
@@ -1433,7 +1433,7 @@ function _detalhes:StoreEncounter (combat)
--> check for heroic and mythic
if (storageDebug or (diff == 15 or diff == 16)) then --test on raid finder ' or diff == 17' -- normal mode: diff == 14 or
--> check the guild name
local match = 0
local guildName = select (1, GetGuildInfo ("player"))
@@ -1455,7 +1455,7 @@ function _detalhes:StoreEncounter (combat)
end
else
if (_detalhes.debug) then
print ("|cFFFFFF00Details! Storage|r: can't save the encounter, need at least 75% of players be from your guild.")
print ("|cFFFFFF00Details! Storage|r: player isn't in a guild.")
end
return
end
@@ -1477,9 +1477,15 @@ function _detalhes:StoreEncounter (combat)
if (not db and _detalhes.CreateStorageDB) then
db = _detalhes:CreateStorageDB()
if (not db) then
if (_detalhes.debug) then
print ("|cFFFFFF00Details! Storage|r: can't save the encounter, couldn't load DataStorage, may be the addon is disabled.")
end
return
end
elseif (not db) then
if (_detalhes.debug) then
print ("|cFFFFFF00Details! Storage|r: can't save the encounter, couldn't load DataStorage, may be the addon is disabled.")
end
return
end
@@ -1546,16 +1552,16 @@ function _detalhes:StoreEncounter (combat)
end
end
--> add the encounter data
tinsert (encounter_database, this_combat_data)
if (_detalhes.debug) then
print ("|cFFFFFF00Details! Storage|r: combat data added to encounter database.")
end
--print ("|cFFFFFF00Details! Storage|r: encounter saved!")
local myrole = UnitGroupRolesAssigned ("player")
local mybest, onencounter = _detalhes.storage:GetBestFromPlayer (diff, encounter_id, myrole, _detalhes.playername, true) --> get dps or hps
local myBestDps = mybest [1] / onencounter.elapsed
--print (myrole, mybest and mybest[1], mybest and mybest[2], mybest and mybest[3], onencounter and onencounter.date)
if (mybest) then
local d_one = 0
if (myrole == "DAMAGER" or myrole == "TANK") then
+8
View File
@@ -4009,6 +4009,14 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
end
end
--> wipe encounter data if changing map while the encounter table is poiting to argus encounter ~REMOVE on 8.0
if (_detalhes.encounter_table and _detalhes.encounter_table.id == 2092) then
_table_wipe (_detalhes.encounter_table)
if (_detalhes.debug) then
_detalhes:Msg ("(debug) map changed with encounter table pointing to argus encounter, wiping the encounter table.")
end
end
_detalhes.time_type = _detalhes.time_type_original
_detalhes:CheckChatOnZoneChange (zoneType)
+8
View File
@@ -804,6 +804,14 @@ end
end
end
--> don't leave the combat if is in the argus encounter ~REMOVE on 8.0
if (_detalhes.encounter_table and _detalhes.encounter_table.id == 2092) then
if (_detalhes.debug) then
_detalhes:Msg ("(debug) in argus encounter, cannot leave the combat.")
end
return true
end
--mythic dungeon test
if (_detalhes.MythicPlus.Started and _detalhes.mythic_plus.always_in_combat) then
return true