- Fixed several small bugs from 6.2 patch.
- Disabled the special behavior for Tyrant Velhari encounter.
This commit is contained in:
@@ -355,6 +355,8 @@ function historico:resetar()
|
||||
_detalhes:CancelTimer (_detalhes.tabela_vigente.verifica_combate)
|
||||
end
|
||||
|
||||
_detalhes.last_closed_combat = nil
|
||||
|
||||
--> fecha a janela de informações do jogador
|
||||
_detalhes:FechaJanelaInfo()
|
||||
|
||||
|
||||
+104
-6
@@ -51,7 +51,13 @@
|
||||
local in_instance = IsInInstance() --> garrison returns party as instance type.
|
||||
|
||||
if ((InstanceType == "party" or InstanceType == "raid") and in_instance) then
|
||||
return Loc ["STRING_SEGMENT_TRASH"]
|
||||
if (InstanceType == "party") then
|
||||
if (_detalhes:GetBossNames (_detalhes.zone_id)) then
|
||||
return Loc ["STRING_SEGMENT_TRASH"]
|
||||
end
|
||||
else
|
||||
return Loc ["STRING_SEGMENT_TRASH"]
|
||||
end
|
||||
end
|
||||
|
||||
for _, actor in _ipairs (_detalhes.tabela_vigente[class_type_dano]._ActorTable) do
|
||||
@@ -86,6 +92,24 @@
|
||||
|
||||
-- try get the current encounter name during the encounter
|
||||
|
||||
local boss_found_not_registered = function (t, ZoneName, ZoneMapID, DifficultyID)
|
||||
|
||||
local boss_table = {
|
||||
index = 0,
|
||||
name = t[1],
|
||||
encounter = t[1],
|
||||
zone = ZoneName,
|
||||
mapid = ZoneMapID,
|
||||
diff = DifficultyID,
|
||||
diff_string = select (4, GetInstanceInfo()),
|
||||
ej_instance_id = t[5],
|
||||
id = t[2],
|
||||
bossimage = t[4],
|
||||
}
|
||||
|
||||
_detalhes.tabela_vigente.is_boss = boss_table
|
||||
end
|
||||
|
||||
local boss_found = function (index, name, zone, mapid, diff, encounterid)
|
||||
|
||||
local ejid = EJ_GetCurrentInstance()
|
||||
@@ -105,6 +129,24 @@
|
||||
id = encounterid,
|
||||
}
|
||||
|
||||
if (not _detalhes:IsRaidRegistered (mapid) and _detalhes.zone_type == "raid") then
|
||||
local boss_list = _detalhes:GetCurrentDungeonBossListFromEJ()
|
||||
if (boss_list) then
|
||||
local ActorsContainer = _detalhes.tabela_vigente [class_type_dano]._ActorTable
|
||||
if (ActorsContainer) then
|
||||
for index, Actor in _ipairs (ActorsContainer) do
|
||||
if (not Actor.grupo) then
|
||||
if (boss_list [Actor.nome]) then
|
||||
Actor.boss = true
|
||||
boss_table.bossimage = boss_list [Actor.nome][4]
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
_detalhes.tabela_vigente.is_boss = boss_table
|
||||
|
||||
if (_detalhes.in_combat and not _detalhes.leaving_combat) then
|
||||
@@ -223,6 +265,24 @@
|
||||
end
|
||||
end
|
||||
|
||||
local in_instance = IsInInstance() --> garrison returns party as instance type.
|
||||
if ((InstanceType == "party" or InstanceType == "raid") and in_instance) then
|
||||
local boss_list = _detalhes:GetCurrentDungeonBossListFromEJ()
|
||||
if (boss_list) then
|
||||
local ActorsContainer = _detalhes.tabela_vigente [class_type_dano]._ActorTable
|
||||
if (ActorsContainer) then
|
||||
for index, Actor in _ipairs (ActorsContainer) do
|
||||
if (not Actor.grupo) then
|
||||
if (boss_list [Actor.nome]) then
|
||||
Actor.boss = true
|
||||
return boss_found_not_registered (boss_list [Actor.nome], ZoneName, ZoneMapID, DifficultyID)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return false
|
||||
end
|
||||
|
||||
@@ -340,6 +400,12 @@
|
||||
_detalhes:Msg ("(debug) ended a combat.")
|
||||
end
|
||||
|
||||
--> in case of something somehow someway call to close the same combat a second time.
|
||||
if (_detalhes.tabela_vigente == _detalhes.last_closed_combat) then
|
||||
return
|
||||
end
|
||||
_detalhes.last_closed_combat = _detalhes.tabela_vigente
|
||||
|
||||
--if (_detalhes.statistics) then
|
||||
-- for k, v in pairs (_detalhes.statistics) do
|
||||
-- print (k, v)
|
||||
@@ -381,7 +447,7 @@
|
||||
|
||||
if (_detalhes.tabela_vigente.bossFunction) then
|
||||
_detalhes:CancelTimer (_detalhes.tabela_vigente.bossFunction)
|
||||
_detalhes.bossFunction = nil
|
||||
_detalhes.tabela_vigente.bossFunction = nil
|
||||
end
|
||||
|
||||
--> finaliza a checagem se esta ou não no combate -- finish combat check
|
||||
@@ -409,6 +475,31 @@
|
||||
local _, InstanceType = _GetInstanceInfo()
|
||||
_detalhes.tabela_vigente.instance_type = InstanceType
|
||||
|
||||
if (not _detalhes.tabela_vigente.is_boss and from_encounter_end and type (from_encounter_end) == "table") then
|
||||
local encounterID, encounterName, difficultyID, raidSize, endStatus = unpack (from_encounter_end)
|
||||
|
||||
if (encounterID) then
|
||||
local ZoneName, InstanceType, DifficultyID, DifficultyName, _, _, _, ZoneMapID = GetInstanceInfo()
|
||||
local ejid = EJ_GetCurrentInstance()
|
||||
if (ejid == 0) then
|
||||
ejid = _detalhes:GetInstanceEJID()
|
||||
end
|
||||
local _, boss_index = _detalhes:GetBossEncounterDetailsFromEncounterId (ZoneMapID, encounterID)
|
||||
|
||||
_detalhes.tabela_vigente.is_boss = {
|
||||
index = boss_index or 0,
|
||||
name = encounterName,
|
||||
encounter = encounterName,
|
||||
zone = ZoneName,
|
||||
mapid = ZoneMapID,
|
||||
diff = DifficultyID,
|
||||
diff_string = DifficultyName,
|
||||
ej_instance_id = ejid or 0,
|
||||
id = encounterID,
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
if (not _detalhes.tabela_vigente.is_boss) then
|
||||
|
||||
if (_detalhes.tabela_vigente.is_pvp or _detalhes.tabela_vigente.is_arena) then
|
||||
@@ -417,7 +508,13 @@
|
||||
|
||||
local in_instance = IsInInstance() --> garrison returns party as instance type.
|
||||
if ((InstanceType == "party" or InstanceType == "raid") and in_instance) then
|
||||
_detalhes.tabela_vigente.is_trash = true
|
||||
if (InstanceType == "party") then
|
||||
if (_detalhes:GetBossNames (_detalhes.zone_id)) then
|
||||
_detalhes.tabela_vigente.is_trash = true
|
||||
end
|
||||
else
|
||||
_detalhes.tabela_vigente.is_trash = true
|
||||
end
|
||||
end
|
||||
|
||||
if (not _detalhes.tabela_vigente.enemy) then
|
||||
@@ -438,9 +535,10 @@
|
||||
--> verifica memoria
|
||||
_detalhes:FlagActorsOnCommonFight() --fight_component
|
||||
_detalhes:CheckMemoryAfterCombat()
|
||||
|
||||
--print ("isn't boss")
|
||||
else
|
||||
|
||||
--print ("is boss")
|
||||
if (not InCombatLockdown() and not UnitAffectingCombat ("player")) then
|
||||
_detalhes:FlagActorsOnBossFight()
|
||||
else
|
||||
@@ -448,8 +546,7 @@
|
||||
end
|
||||
|
||||
local boss_id = _detalhes.encounter_table.id
|
||||
|
||||
|
||||
|
||||
if (bossKilled) then
|
||||
_detalhes.tabela_vigente.is_boss.killed = true
|
||||
|
||||
@@ -629,6 +726,7 @@
|
||||
else
|
||||
_detalhes:SendEvent ("COMBAT_PLAYER_LEAVE", nil, _detalhes.tabela_vigente)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
function _detalhes:GetPlayersInArena()
|
||||
|
||||
+6
-3
@@ -3068,6 +3068,7 @@
|
||||
end
|
||||
|
||||
local encounterID, encounterName, difficultyID, raidSize = _select (1, ...)
|
||||
--print ("START", encounterID, encounterName, difficultyID, raidSize)
|
||||
|
||||
if (_in_combat and not _detalhes.tabela_vigente.is_boss) then
|
||||
_detalhes:SairDoCombate()
|
||||
@@ -3124,6 +3125,8 @@
|
||||
_detalhes.encounter_table.index = boss_index
|
||||
end
|
||||
|
||||
--print ("Combat Start 2")
|
||||
|
||||
end
|
||||
|
||||
function _detalhes.parser_functions:ENCOUNTER_END (...)
|
||||
@@ -3133,7 +3136,7 @@
|
||||
end
|
||||
|
||||
local encounterID, encounterName, difficultyID, raidSize, endStatus = _select (1, ...)
|
||||
|
||||
|
||||
--_detalhes:Msg ("encounter against|cFFFFC000", encounterName, "|rended.")
|
||||
|
||||
if (not _detalhes.encounter_table.start) then
|
||||
@@ -3155,10 +3158,10 @@
|
||||
if (_in_combat) then
|
||||
if (endStatus == 1) then
|
||||
_detalhes.encounter_table.kill = true
|
||||
_detalhes:SairDoCombate (true, true) --killed
|
||||
_detalhes:SairDoCombate (true, {encounterID, encounterName, difficultyID, raidSize, endStatus}) --killed
|
||||
else
|
||||
_detalhes.encounter_table.kill = false
|
||||
_detalhes:SairDoCombate (false, true) --wipe
|
||||
_detalhes:SairDoCombate (false, {encounterID, encounterName, difficultyID, raidSize, endStatus}) --wipe
|
||||
end
|
||||
else
|
||||
if ((_detalhes.tabela_vigente:GetEndTime() or 0) + 2 >= _detalhes.encounter_table ["end"]) then
|
||||
|
||||
+44
-1
@@ -246,6 +246,47 @@ do
|
||||
return 0
|
||||
end
|
||||
|
||||
function _detalhes:GetCurrentDungeonBossListFromEJ()
|
||||
local EJ_CInstance = EJ_GetCurrentInstance()
|
||||
if (EJ_CInstance and EJ_CInstance ~= 0) then
|
||||
if (_detalhes.encounter_dungeons [EJ_CInstance]) then
|
||||
return _detalhes.encounter_dungeons [EJ_CInstance]
|
||||
end
|
||||
|
||||
EJ_SelectInstance (EJ_CInstance)
|
||||
|
||||
local name, description, bgImage, buttonImage, loreImage, dungeonAreaMapID, link = EJ_GetInstanceInfo (EJ_CInstance)
|
||||
|
||||
local boss_list = {
|
||||
[EJ_CInstance] = {name, description, bgImage, buttonImage, loreImage, dungeonAreaMapID, link}
|
||||
}
|
||||
|
||||
for i = 1, 20 do
|
||||
local encounterName, description, encounterID, rootSectionID, link = EJ_GetEncounterInfoByIndex (i, EJ_CInstance)
|
||||
if (encounterName) then
|
||||
for o = 1, 6 do
|
||||
local id, creatureName, creatureDescription, displayInfo, iconImage = EJ_GetCreatureInfo (o, encounterID)
|
||||
if (id) then
|
||||
boss_list [creatureName] = {encounterName, encounterID, creatureName, iconImage, EJ_CInstance}
|
||||
else
|
||||
break
|
||||
end
|
||||
end
|
||||
else
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
_detalhes.encounter_dungeons [EJ_CInstance] = boss_list
|
||||
|
||||
return boss_list
|
||||
end
|
||||
end
|
||||
|
||||
function _detalhes:IsRaidRegistered (mapid)
|
||||
return _detalhes.EncounterInformation [mapid] and true
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> core
|
||||
|
||||
@@ -253,4 +294,6 @@ do
|
||||
_detalhes.EncounterInformation [InstanceTable.id] = InstanceTable
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--functionas
|
||||
+24
-17
@@ -5451,7 +5451,7 @@ local segments_common_tex, segments_common_color = {0.5078125, 0.1171875, 0.0175
|
||||
local unknown_boss_tex, unknown_boss_color = {0.14453125, 0.9296875, 0.2625, 0.6546875}, {1, 1, 1, 0.5}
|
||||
|
||||
local party_line_color = {170/255, 167/255, 255/255, 1}
|
||||
local party_wallpaper_tex, party_wallpaper_color = {0.09, 0.698125, 0, 0.833984375}, {1, 1, 1, 0.5}
|
||||
local party_wallpaper_tex, party_wallpaper_color, raid_wallpaper_tex = {0.09, 0.698125, 0, 0.833984375}, {1, 1, 1, 0.5}, {33/512, 361/512, 45/512, 295/512}
|
||||
|
||||
local segments_wallpaper_color = {1, 1, 1, 0.5}
|
||||
local segment_color_lime = {0, 1, 0, 1}
|
||||
@@ -5627,7 +5627,7 @@ local build_segment_list = function (self, elapsed)
|
||||
end
|
||||
end
|
||||
|
||||
local portrait = _detalhes:GetBossPortrait (thisCombat.is_boss.mapid, thisCombat.is_boss.index)
|
||||
local portrait = _detalhes:GetBossPortrait (thisCombat.is_boss.mapid, thisCombat.is_boss.index) or thisCombat.is_boss.bossimage
|
||||
if (portrait) then
|
||||
CoolTip:AddIcon (portrait, 2, "top", 128, 64)
|
||||
end
|
||||
@@ -5636,17 +5636,20 @@ local build_segment_list = function (self, elapsed)
|
||||
local background = _detalhes:GetRaidIcon (thisCombat.is_boss.mapid)
|
||||
if (background) then
|
||||
CoolTip:SetWallpaper (2, background, nil, segments_wallpaper_color)
|
||||
elseif (thisCombat.instance_type == "party") then
|
||||
local ej_id = thisCombat.is_boss.ej_instance_id
|
||||
if (ej_id) then
|
||||
local name, description, bgImage, buttonImage, loreImage, dungeonAreaMapID, link = EJ_GetInstanceInfo (ej_id)
|
||||
if (bgImage) then
|
||||
CoolTip:SetWallpaper (2, bgImage, party_wallpaper_tex, party_wallpaper_color)
|
||||
end
|
||||
end
|
||||
else
|
||||
|
||||
CoolTip:SetWallpaper (2, [[Interface\BlackMarket\HotItemBanner]], unknown_boss_tex, unknown_boss_color, true)
|
||||
local ej_id = thisCombat.is_boss.ej_instance_id
|
||||
if (ej_id and ej_id ~= 0) then
|
||||
local name, description, bgImage, buttonImage, loreImage, dungeonAreaMapID, link = EJ_GetInstanceInfo (ej_id)
|
||||
if (name) then
|
||||
if (thisCombat.instance_type == "party") then
|
||||
CoolTip:SetWallpaper (2, bgImage, party_wallpaper_tex, party_wallpaper_color)
|
||||
else
|
||||
CoolTip:SetWallpaper (2, loreImage, raid_wallpaper_tex, party_wallpaper_color)
|
||||
end
|
||||
end
|
||||
else
|
||||
CoolTip:SetWallpaper (2, [[Interface\BlackMarket\HotItemBanner]], unknown_boss_tex, unknown_boss_color, true)
|
||||
end
|
||||
end
|
||||
|
||||
elseif (thisCombat.is_pvp) then
|
||||
@@ -5730,7 +5733,7 @@ local build_segment_list = function (self, elapsed)
|
||||
local file, coords
|
||||
|
||||
if (_detalhes.tabela_vigente.is_boss and _detalhes.tabela_vigente.is_boss.name) then
|
||||
local portrait = _detalhes:GetBossPortrait (_detalhes.tabela_vigente.is_boss.mapid, _detalhes.tabela_vigente.is_boss.index)
|
||||
local portrait = _detalhes:GetBossPortrait (_detalhes.tabela_vigente.is_boss.mapid, _detalhes.tabela_vigente.is_boss.index) or _detalhes.tabela_vigente.is_boss.bossimage
|
||||
if (portrait) then
|
||||
CoolTip:AddIcon (portrait, 2, "top", 128, 64)
|
||||
end
|
||||
@@ -5738,12 +5741,16 @@ local build_segment_list = function (self, elapsed)
|
||||
local background = _detalhes:GetRaidIcon (_detalhes.tabela_vigente.is_boss.mapid)
|
||||
if (background) then
|
||||
CoolTip:SetWallpaper (2, background, nil, segments_wallpaper_color)
|
||||
elseif (_detalhes.tabela_vigente.instance_type == "party") then
|
||||
else
|
||||
local ej_id = _detalhes.tabela_vigente.is_boss.ej_instance_id
|
||||
if (ej_id) then
|
||||
if (ej_id and ej_id ~= 0) then
|
||||
local name, description, bgImage, buttonImage, loreImage, dungeonAreaMapID, link = EJ_GetInstanceInfo (ej_id)
|
||||
if (bgImage) then
|
||||
CoolTip:SetWallpaper (2, bgImage, party_wallpaper_tex, party_wallpaper_color)
|
||||
if (name) then
|
||||
if (_detalhes.tabela_vigente.instance_type == "party") then
|
||||
CoolTip:SetWallpaper (2, bgImage, party_wallpaper_tex, party_wallpaper_color)
|
||||
else
|
||||
CoolTip:SetWallpaper (2, loreImage, raid_wallpaper_tex, party_wallpaper_color)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -380,10 +380,10 @@ listener:SetScript ("OnEvent", function (self, event, ...)
|
||||
if (encounterID == 1784) then--"Tyrant Velhari"
|
||||
if (event == "ENCOUNTER_START") then
|
||||
--> replacing the healing done func
|
||||
Details.parser:SetParserFunction ("heal", parser_heal)
|
||||
--Details.parser:SetParserFunction ("heal", parser_heal)
|
||||
else
|
||||
--> restoring the func
|
||||
Details.parser:SetParserFunction ("heal", nil)
|
||||
--Details.parser:SetParserFunction ("heal", nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
+12
@@ -547,7 +547,19 @@ function _G._detalhes:Start()
|
||||
_detalhes.chat_embed:CheckChatEmbed (true)
|
||||
|
||||
_detalhes.AddOnStartTime = GetTime()
|
||||
|
||||
--[[
|
||||
local a = CreateFrame ("frame")
|
||||
a:RegisterEvent ("PLAYER_REGEN_ENABLED")
|
||||
a:RegisterEvent ("PLAYER_REGEN_DISABLED")
|
||||
a:RegisterEvent ("ENCOUNTER_START")
|
||||
a:RegisterEvent ("ENCOUNTER_END")
|
||||
|
||||
a:SetScript ("OnEvent", function (self, event, ...)
|
||||
print (event)
|
||||
end)
|
||||
--]]
|
||||
|
||||
--[[
|
||||
function _detalhes:TestResize()
|
||||
_detalhes:OpenNewsWindow ("TESTE, |TInterface\\AddOns\\Details\\images\\key_shift:20:40:0:0:64:64:0:64:0:40|t")
|
||||
|
||||
Reference in New Issue
Block a user