diff --git a/boot.lua b/boot.lua index 192dc157..f6f0a161 100644 --- a/boot.lua +++ b/boot.lua @@ -4,7 +4,7 @@ _ = nil _detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0", "NickTag-1.0") _detalhes.build_counter = 1150 --it's 1150 for release - _detalhes.userversion = "v3.15.7" + _detalhes.userversion = "v3.15.8" _detalhes.realversion = 70 --core version _detalhes.version = _detalhes.userversion .. " (core " .. _detalhes.realversion .. ")" Details = _detalhes @@ -21,13 +21,14 @@ do local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" ) --[[ -|cFFFFFF00v3.15.5a (|cFFFFCC00Jun 11, 2015|r|cFFFFFF00)|r:\n\n -|cFFFFFF00-|r Fixed an issue where sometimes tooltips wasn't being shown.\n\n +|cFFFFFF00v3.15.8 (|cFFFFCC00Jun 29, 2015|r|cFFFFFF00)|r:\n\n +|cFFFFFF00-|r Fixed several small bugs from 6.2 patch.\n\n +|cFFFFFF00-|r Disabled the special behavior for Tyrant Velhari encounter.\n\n --]] -- - Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v3.15.7 (|cFFFFCC00Jun 23, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added support for Hellfire Citadel raid.\n\n|cFFFFFF00-|r Added support for custom CLEU parser functions.\n\n|cFFFFFF00-|r Tyrant Velhari encounter now has a custom CLEU parser function for healing where the heal absorbed by Aura of Contempt will count towards overheal and not healing done.\n\n|cFFFFFF00-|r Added support for embed on Chat Tabs.\n\n|cFFFFFF00-|r |cFFAAFFAAPS: We've made an addon for Shadow-Lord Iskar encounter called 'Iskar Assist' check it out|r.\n\n|cFFFFFF00v3.15.5a (|cFFFFCC00Jun 12, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed an issue where sometimes tooltips wasn't being shown.\n\n|cFFFFFF00-|r Fixed a problem with overall data where it was using, even on dungoens, the raid-only 30 delay rule.\n\n|cFFFFFF00-|r Fixed an issue with spec detection (now it may detect even faster).\n\n|cFFFFFF00v3.15.5 (|cFFFFCC00Jun 09, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed a problem with auto hide feature not hiding plugins hosted by the window.\n\n|cFFFFFF00-|r Fixed an issue with stretch feature when the anchor button was anchored at the bottom side of the window.\n\n|cFFFFFF00-|r Small interface tweaks on tooltips, bookmark and player detail window.\n\n|cFFFFFF00-|r Custom display 'My Spells' now also show amount of casts and uptime.\n\n|cFFFFFF00-|r Added an extra tooltip for the class icon at the player's bar.\n\n|cFFFFFF00-|r Activity time now has only 3 seconds inactivity tolerance on battlegrounds and arenas.\n\n|cFFFFFF00-|r Effective time will automatically be used when inside a battleground and using sync from the score board.\n\n|cFFFFFF00-|r Added 'hide all' option on the minimap menu.\n\n|cFFFFFF00-|r Added support for battlegrounds.\n\n|cFFFFFF00-|r Added option for disable showing battleground enemies when the window is in group mode.\n\n|cFFFFFF00-|r Added option to disable the sync from battleground score board.\n\n|cFFFFFF00-|r Enemies from a battleground match segment won't be erased when the player logout.\n\n|cFFFFFF00v3.14.4 (|cFFFFCC00May 27, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r TimeLine (plugin): now also shows marks symbolizing the player death.\n\n|cFFFFFF00-|r Added raid history panel. Open it through bookmark or /details history.\n\n|cFFFFFF00-|r Added support for skins for Player Detail Window.\n\n|cFFFFFF00-|r Added report history on report button.\n\n|cFFFFFF00-|r Added key bindings settings for report what is shown on window #1 or #2.\n\n|cFFFFFF00v3.14.0b (|cFFFFCC00May 13, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Several texture changes for a smaller download size.\n\n|cFFFFFF00v3.13.4a (|cFFFFCC00May 06, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Created 'Details! Forge' but is still under development: /details forge.\n\n|cFFFFFF00-|r Several improvements on combatlog reader and custom displays.\n\n|cFFFFFF00-|r Improvements on enemies damage taken tooltip.\n\n|cFFFFFF00v3.13.1 (|cFFFFCC00April 27, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added casted amount for healing and damage spells. The result is shown on Player Detail Window and Comparison Panel.\n\n|cFFFFFF00-|r Added uptime amount for healing spells on Player Detail Window.\n\n|cFFFFFF00-|r Added an option to disable lock/resize/ungroup buttons. It's under miscellaneous bracket on Options Panel.\n\n|cFFFFFF00-|r Wallpaper for menus on title bar got a customization option under tooltips bracket on Options Panel.\n\n|cFFFFFF00-|r Updated spell list for Crowd Control and class detection.\n\n|cFFFFFF00-|r Improved Weakaura creation tool under Encounter Details Plugin.\n\n|cFFFFFF00v3.12.10 (|cFFFFCC00April 18, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added the spell uptime on damage player detail window.\n\n|cFFFFFF00-|r Added Rune Tap as cooldown.\n\n|cFFFFFF00-|r Report lines for deaths is now inverted. No need to scroll up the chat to see the cause of death anymore.\n\n|cFFFFFF00-|r Fixed some annoyances with auto current feature where it was changing the segments even when the user were using the window.\n\n|cFFFFFF00v3.12.7 (|cFFFFCC00April 09, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added slash command /details profile .\n\n|cFFFFFF00v3.12.6 (|cFFFFCC00May 06, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Encounter Details (plugin): added a report button on Emotes tab.\n\n|cFFFFFF00-|r Encounter Details (plugin): improved Weakauras creation.\n\n|cFFFFFF00-|r Encounter Details (plugin): fixed the report text for interrupts and dispells.\n\n|cFFFFFF00-|r Crowd control by Pets now is merged with its owner.\n\n|cFFFFFF00-|r Truncated left text on bars now shows the entire text when hover over the bar.\n\n|cFFFFFF00-|r Added an extra option on minimap menu to disable the minimap icon.\n\n|cFFFFFF00-|r Fixed a problem when disabling the minimap icon through options panel.\n\n|cFFFFFF00-|r Fixed an issue with item level tracker feature.\n\n|cFFFFFF00v3.12.2 (|cFFFFCC00Mar 30, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Raid Check (plugin): added item level.\n\n|cFFFFFF00-|r Advanced Death Logs (plugin): bug fixes, it's important to update it.\n\n|cFFFFFF00-|r Time Line (plugin): bug fixes.\n\n|cFFFFFF00-|r Added option to disabled th eitem level tracker.\n\n|cFFFFFF00-|r Added item level on Raid Check plugin panel.\n\n|cFFFFFF00-|r Added Spirit Link Totem damage and healing on death log.\n\n|cFFFFFF00-|r Added the total of life exchanged by the Spirit Link Totem on player detail window.\n\n|cFFFFFF00-|r Added more spells for crowd control.\n\n|cFFFFFF00-|r Added scroll on bookmark panel.\n\n|cFFFFFF00-|r Fixed issue with Dps/Hps data broker which wasn't respecting the type of time (effective/activity) selected.\n\n|cFFFFFF00-|r Fixed few bugs when using the key bind to toggle windows.\n\n|cFFFFFF00v3.11.5 (|cFFFFCC00Mar 18, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed an issue with overall data where max/min amount for spells was being calculated wrong.\n\n|cFFFFFF00-|r Fixed a problem while reporting enemy damage taken.\n\n|cFFFFFF00-|r Fixed an issue with damage taken by spell where some spells wasn't shown.\n\n|cFFFFFF00-|r Few improvements on tooltips.\n\n|cFFFFFF00-|r Fixed a accuracy problem with shaman's spirit link toten where its life exchange was considered healing done.\n\n|cFFFFFF00-|r Boss segments now need to have at least 30 seconds to be added on the overall data.\n\n|cFFFFFF00-|r When the segment limit is reach, segments with less combat time will be erased instead of the olders.\n\n|cFFFFFF00-|r Added item level tracker.\n\n|cFFFFFF00-|r Fixed window positioning when changing from Solo mode to Group mode.\n\n|cFFFFFF00-|r Added an option for change the amount of lines on death log.\n\n|cFFFFFF00-|r Added custom display for CC done." + Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v3.15.8 (|cFFFFCC00Jun 29, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed several small bugs from 6.2 patch.\n\n|cFFFFFF00-|r Disabled the special behavior for Tyrant Velhari encounter.\n\n|cFFFFFF00v3.15.7 (|cFFFFCC00Jun 23, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added support for Hellfire Citadel raid.\n\n|cFFFFFF00-|r Added support for custom CLEU parser functions.\n\n|cFFFFFF00-|r Tyrant Velhari encounter now has a custom CLEU parser function for healing where the heal absorbed by Aura of Contempt will count towards overheal and not healing done.\n\n|cFFFFFF00-|r Added support for embed on Chat Tabs.\n\n|cFFFFFF00-|r |cFFAAFFAAPS: We've made an addon for Shadow-Lord Iskar encounter called 'Iskar Assist' check it out|r.\n\n|cFFFFFF00v3.15.5a (|cFFFFCC00Jun 12, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed an issue where sometimes tooltips wasn't being shown.\n\n|cFFFFFF00-|r Fixed a problem with overall data where it was using, even on dungoens, the raid-only 30 delay rule.\n\n|cFFFFFF00-|r Fixed an issue with spec detection (now it may detect even faster).\n\n|cFFFFFF00v3.15.5 (|cFFFFCC00Jun 09, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed a problem with auto hide feature not hiding plugins hosted by the window.\n\n|cFFFFFF00-|r Fixed an issue with stretch feature when the anchor button was anchored at the bottom side of the window.\n\n|cFFFFFF00-|r Small interface tweaks on tooltips, bookmark and player detail window.\n\n|cFFFFFF00-|r Custom display 'My Spells' now also show amount of casts and uptime.\n\n|cFFFFFF00-|r Added an extra tooltip for the class icon at the player's bar.\n\n|cFFFFFF00-|r Activity time now has only 3 seconds inactivity tolerance on battlegrounds and arenas.\n\n|cFFFFFF00-|r Effective time will automatically be used when inside a battleground and using sync from the score board.\n\n|cFFFFFF00-|r Added 'hide all' option on the minimap menu.\n\n|cFFFFFF00-|r Added support for battlegrounds.\n\n|cFFFFFF00-|r Added option for disable showing battleground enemies when the window is in group mode.\n\n|cFFFFFF00-|r Added option to disable the sync from battleground score board.\n\n|cFFFFFF00-|r Enemies from a battleground match segment won't be erased when the player logout.\n\n|cFFFFFF00v3.14.4 (|cFFFFCC00May 27, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r TimeLine (plugin): now also shows marks symbolizing the player death.\n\n|cFFFFFF00-|r Added raid history panel. Open it through bookmark or /details history.\n\n|cFFFFFF00-|r Added support for skins for Player Detail Window.\n\n|cFFFFFF00-|r Added report history on report button.\n\n|cFFFFFF00-|r Added key bindings settings for report what is shown on window #1 or #2.\n\n|cFFFFFF00v3.14.0b (|cFFFFCC00May 13, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Several texture changes for a smaller download size.\n\n|cFFFFFF00v3.13.4a (|cFFFFCC00May 06, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Created 'Details! Forge' but is still under development: /details forge.\n\n|cFFFFFF00-|r Several improvements on combatlog reader and custom displays.\n\n|cFFFFFF00-|r Improvements on enemies damage taken tooltip.\n\n|cFFFFFF00v3.13.1 (|cFFFFCC00April 27, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added casted amount for healing and damage spells. The result is shown on Player Detail Window and Comparison Panel.\n\n|cFFFFFF00-|r Added uptime amount for healing spells on Player Detail Window.\n\n|cFFFFFF00-|r Added an option to disable lock/resize/ungroup buttons. It's under miscellaneous bracket on Options Panel.\n\n|cFFFFFF00-|r Wallpaper for menus on title bar got a customization option under tooltips bracket on Options Panel.\n\n|cFFFFFF00-|r Updated spell list for Crowd Control and class detection.\n\n|cFFFFFF00-|r Improved Weakaura creation tool under Encounter Details Plugin.\n\n|cFFFFFF00v3.12.10 (|cFFFFCC00April 18, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added the spell uptime on damage player detail window.\n\n|cFFFFFF00-|r Added Rune Tap as cooldown.\n\n|cFFFFFF00-|r Report lines for deaths is now inverted. No need to scroll up the chat to see the cause of death anymore.\n\n|cFFFFFF00-|r Fixed some annoyances with auto current feature where it was changing the segments even when the user were using the window.\n\n|cFFFFFF00v3.12.7 (|cFFFFCC00April 09, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added slash command /details profile .\n\n|cFFFFFF00v3.12.6 (|cFFFFCC00May 06, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Encounter Details (plugin): added a report button on Emotes tab.\n\n|cFFFFFF00-|r Encounter Details (plugin): improved Weakauras creation.\n\n|cFFFFFF00-|r Encounter Details (plugin): fixed the report text for interrupts and dispells.\n\n|cFFFFFF00-|r Crowd control by Pets now is merged with its owner.\n\n|cFFFFFF00-|r Truncated left text on bars now shows the entire text when hover over the bar.\n\n|cFFFFFF00-|r Added an extra option on minimap menu to disable the minimap icon.\n\n|cFFFFFF00-|r Fixed a problem when disabling the minimap icon through options panel.\n\n|cFFFFFF00-|r Fixed an issue with item level tracker feature.\n\n|cFFFFFF00v3.12.2 (|cFFFFCC00Mar 30, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Raid Check (plugin): added item level.\n\n|cFFFFFF00-|r Advanced Death Logs (plugin): bug fixes, it's important to update it.\n\n|cFFFFFF00-|r Time Line (plugin): bug fixes.\n\n|cFFFFFF00-|r Added option to disabled th eitem level tracker.\n\n|cFFFFFF00-|r Added item level on Raid Check plugin panel.\n\n|cFFFFFF00-|r Added Spirit Link Totem damage and healing on death log.\n\n|cFFFFFF00-|r Added the total of life exchanged by the Spirit Link Totem on player detail window.\n\n|cFFFFFF00-|r Added more spells for crowd control.\n\n|cFFFFFF00-|r Added scroll on bookmark panel.\n\n|cFFFFFF00-|r Fixed issue with Dps/Hps data broker which wasn't respecting the type of time (effective/activity) selected.\n\n|cFFFFFF00-|r Fixed few bugs when using the key bind to toggle windows.\n\n|cFFFFFF00v3.11.5 (|cFFFFCC00Mar 18, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed an issue with overall data where max/min amount for spells was being calculated wrong.\n\n|cFFFFFF00-|r Fixed a problem while reporting enemy damage taken.\n\n|cFFFFFF00-|r Fixed an issue with damage taken by spell where some spells wasn't shown.\n\n|cFFFFFF00-|r Few improvements on tooltips.\n\n|cFFFFFF00-|r Fixed a accuracy problem with shaman's spirit link toten where its life exchange was considered healing done.\n\n|cFFFFFF00-|r Boss segments now need to have at least 30 seconds to be added on the overall data.\n\n|cFFFFFF00-|r When the segment limit is reach, segments with less combat time will be erased instead of the olders.\n\n|cFFFFFF00-|r Added item level tracker.\n\n|cFFFFFF00-|r Fixed window positioning when changing from Solo mode to Group mode.\n\n|cFFFFFF00-|r Added an option for change the amount of lines on death log.\n\n|cFFFFFF00-|r Added custom display for CC done." Loc ["STRING_DETAILS1"] = "|cffffaeaeDetails!:|r " @@ -92,6 +93,7 @@ do _detalhes.encounter_end_table = {} _detalhes.encounter_table = {} _detalhes.encounter_counter = {} + _detalhes.encounter_dungeons = {} --> informações sobre a arena atual _detalhes.arena_table = {} _detalhes.arena_info = { diff --git a/classes/container_historico.lua b/classes/container_historico.lua index 8023e9ea..8f5b884b 100644 --- a/classes/container_historico.lua +++ b/classes/container_historico.lua @@ -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() diff --git a/core/control.lua b/core/control.lua index ccfb84ce..eab2cbe6 100644 --- a/core/control.lua +++ b/core/control.lua @@ -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() diff --git a/core/parser.lua b/core/parser.lua index fa26f081..a6105056 100644 --- a/core/parser.lua +++ b/core/parser.lua @@ -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 diff --git a/functions/boss.lua b/functions/boss.lua index c77d1448..1bf6f219 100644 --- a/functions/boss.lua +++ b/functions/boss.lua @@ -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 \ No newline at end of file +end + +--functionas \ No newline at end of file diff --git a/gumps/janela_principal.lua b/gumps/janela_principal.lua index 35e8d310..8af8bb71 100644 --- a/gumps/janela_principal.lua +++ b/gumps/janela_principal.lua @@ -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 diff --git a/plugins/Details_RaidInfo-HellfireCitadel/Details_RaidInfo-HellfireCitadel.lua b/plugins/Details_RaidInfo-HellfireCitadel/Details_RaidInfo-HellfireCitadel.lua index ad94efbd..430a1055 100644 --- a/plugins/Details_RaidInfo-HellfireCitadel/Details_RaidInfo-HellfireCitadel.lua +++ b/plugins/Details_RaidInfo-HellfireCitadel/Details_RaidInfo-HellfireCitadel.lua @@ -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 diff --git a/startup.lua b/startup.lua index bfa28d47..dcd9850e 100644 --- a/startup.lua +++ b/startup.lua @@ -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")