From da5481c143589bcca98a7e0d17ba39b3a07c2a74 Mon Sep 17 00:00:00 2001 From: Tercio Jose Date: Wed, 4 Jan 2023 20:12:55 -0300 Subject: [PATCH] Release Candidate 1 --- .gitignore | 1 + Libs/DF/fw.lua | 2 +- Libs/LibOpenRaid/LibOpenRaid.lua | 38 ++++++++++++++++++- boot.lua | 25 ++++++++++++ classes/class_utility.lua | 6 ++- classes/container_actors.lua | 2 +- frames/window_playerbreakdown.lua | 4 +- functions/boss.lua | 2 +- .../Details_RaidCheck/Details_RaidCheck.lua | 6 ++- 9 files changed, 77 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index eda2ac691..5d07d5ed2 100644 --- a/.gitignore +++ b/.gitignore @@ -34,3 +34,4 @@ functions/pack2.lua wowapi.lua plugins/Details_TinyThreat/Details_TinyThreat_original.lua *.png +Descriptions.lua diff --git a/Libs/DF/fw.lua b/Libs/DF/fw.lua index c4af98a9d..e1a14ffed 100644 --- a/Libs/DF/fw.lua +++ b/Libs/DF/fw.lua @@ -1,6 +1,6 @@ -local dversion = 409 +local dversion = 410 local major, minor = "DetailsFramework-1.0", dversion local DF, oldminor = LibStub:NewLibrary(major, minor) diff --git a/Libs/LibOpenRaid/LibOpenRaid.lua b/Libs/LibOpenRaid/LibOpenRaid.lua index 280df3527..ce62361b3 100644 --- a/Libs/LibOpenRaid/LibOpenRaid.lua +++ b/Libs/LibOpenRaid/LibOpenRaid.lua @@ -47,7 +47,7 @@ if (WOW_PROJECT_ID ~= WOW_PROJECT_MAINLINE and not isExpansion_Dragonflight()) t end local major = "LibOpenRaid-1.0" -local CONST_LIB_VERSION = 90 +local CONST_LIB_VERSION = 91 if (not LIB_OPEN_RAID_MAX_VERSION) then LIB_OPEN_RAID_MAX_VERSION = CONST_LIB_VERSION @@ -712,6 +712,7 @@ end ["playerPetChange"] = {}, ["mythicDungeonEnd"] = {}, ["unitAuraRemoved"] = {}, + ["cleanUpData"] = {}, } openRaidLib.internalCallback.RegisterCallback = function(event, func) @@ -773,6 +774,13 @@ end --using random time, players won't trigger all at the same time local randomTime = 0.3 + math.random(0, 0.7) openRaidLib.Schedules.NewUniqueTimer(randomTime, openRaidLib.mainControl.SendFullData, "mainControl", "sendFullData_Schedule") + + local groupSize = GetNumGroupMembers() + if (groupSize < openRaidLib.currentGroupSize) then + --a member left the group and the group size is smaller, trigger an event to modules clean up data + openRaidLib.Schedules.NewUniqueTimer(2, openRaidLib.mainControl.CleanUpData, "mainControl", "sendCleanUpData_Schedule") + openRaidLib.currentGroupSize = groupSize + end end openRaidLib.UpdateUnitIDCache() @@ -791,6 +799,9 @@ end ["PLAYER_ENTERING_WORLD"] = function(...) --has the selected character just loaded? if (not openRaidLib.bHasEnteredWorld) then + --save the amount of members in the group + openRaidLib.currentGroupSize = GetNumGroupMembers() + --register events openRaidLib.OnEnterWorldRegisterEvents() @@ -1060,6 +1071,10 @@ end openRaidLib.publicCallback.TriggerCallback("UnitAlive", "player") end + function openRaidLib.mainControl.CleanUpData() + openRaidLib.internalCallback.TriggerEvent("cleanUpData") + end + openRaidLib.internalCallback.RegisterCallback("onEnterWorld", openRaidLib.mainControl.onEnterWorld) openRaidLib.internalCallback.RegisterCallback("onEnterWorld", openRaidLib.mainControl.scheduleUpdatePlayerData) openRaidLib.internalCallback.RegisterCallback("onEnterGroup", openRaidLib.mainControl.OnEnterGroup) @@ -2110,6 +2125,26 @@ end end end + function openRaidLib.CooldownManager.OnCleanUpCall() + --the group has less players, need to check which players isn't in the group anymore and remove them from the cooldown database + --get the cooldown database table with all players + local cooldownDatabase = openRaidLib.CooldownManager.UnitData + local bAnyUnitGotRemoved = false + --foreach player in the database + for unitName in pairs(cooldownDatabase) do + --check if the player is in the group + if (not UnitInRaid(unitName) and not UnitInParty(unitName)) then + --remove the player from the database + openRaidLib.CooldownManager.UnitData[unitName] = nil + bAnyUnitGotRemoved = true + end + end + + if (bAnyUnitGotRemoved) then + + end + end + openRaidLib.internalCallback.RegisterCallback("onLeaveGroup", openRaidLib.CooldownManager.OnPlayerLeaveGroup) openRaidLib.internalCallback.RegisterCallback("playerCast", openRaidLib.CooldownManager.OnPlayerCast) openRaidLib.internalCallback.RegisterCallback("onPlayerRess", openRaidLib.CooldownManager.OnPlayerRess) @@ -2119,6 +2154,7 @@ end openRaidLib.internalCallback.RegisterCallback("mythicDungeonStart", openRaidLib.CooldownManager.OnMythicPlusStart) openRaidLib.internalCallback.RegisterCallback("playerPetChange", openRaidLib.CooldownManager.OnPlayerPetChanged) openRaidLib.internalCallback.RegisterCallback("unitAuraRemoved", openRaidLib.CooldownManager.OnAuraRemoved) + openRaidLib.internalCallback.RegisterCallback("cleanUpData", openRaidLib.CooldownManager.OnCleanUpCall) --send a list through comm with cooldowns added or removed function openRaidLib.CooldownManager.CheckCooldownChanges() diff --git a/boot.lua b/boot.lua index b9116365b..008216ed6 100644 --- a/boot.lua +++ b/boot.lua @@ -87,6 +87,31 @@ do local Loc = _G.LibStub("AceLocale-3.0"):GetLocale( "Details" ) local news = { + {"v10.0.2.10333.147", "Jan 04th, 2023"}, + + "Enemy Cast (non-interrupted) now is shown in the death log.", + "Damage Done by Blessing of Winter and Summer now counts torward the paladin.", + "Tooltips for Mythic Dungeon segments in the segments menu, now brings more information about the combat.", + "List of Potions updated (Jooooo)", + "Priest Spirit of Redemption now shows in the Death Log breakdown.", + "/keystone doesn't show the player realm anymore", + "When importing a profile, the confirmation box (asking a name for the new profile) got a check box to opt-out of importing Code.", + "Major fixes for Guild Sync and Statistics window: /details stats", + "Raid Check (plugin): Added M+ Score and fixed the flask usage.", + "Streamer (plugin): Fixed the plugin window hidding after login.", + "Fixed Evoker and several other cooldowns which wasn't showing in the cooldown usage display.", + "Fixed a small freeze that was happening when hovering over the segments menu.", + "Fixed some slash commands not working for deDE localization.", + "Fixed Rogue Akaari's Soul not getting detected properly during combat (Flamanis).", + "Fixed the sorting columns on /keystone panel which key stone level wasn't sorting correctly (Benjamin H.).", + "Fix for Fire Elemental on Wrath (Flamanis).", + "Fixed Evoker bug where empowered abilities wasn't showing in overall data (Flamanis).", + "Fixed an error when Details! attempted to use Ghost Frame in Wrath, but Ghost frame doesn't exists on that expansion (Flamanis).", + "Fixed spec detection for some specs on retail (Flamanis).", + "Fixed ToC for Compare2, how it also works on Wrath (Flamanis).", + "Fixed an issue with buff and debuff uptime sometimes not closing properly after the combat.", + + {"v10.0.2.10333.147", "Nov 18th, 2022"}, "Added two checkboxes for Merge Pet and Player spell on the Breakdown window.", "Added uptime for Hunter's Pet Frenzy Buff, it now show in the 'Auras' tab in the Breakdown Window.", diff --git a/classes/class_utility.lua b/classes/class_utility.lua index 104ce4f9c..c4e1b4ab4 100644 --- a/classes/class_utility.lua +++ b/classes/class_utility.lua @@ -131,7 +131,11 @@ function _detalhes:ContainerSortMisc(container, amount, keyName2) end end ---[[exported]] function _detalhes:GetSpellCastAmount(combat, actorName, spellId) +---attempt to get the amount of casts of a spell +---@param combat table the combat object +---@param actorName string name of the actor +---@param spellId number spell id +function Details:GetSpellCastAmount(combat, actorName, spellId) --[[exported]] local actorUtilityObject = combat:GetActor(4, actorName) if (actorUtilityObject) then local castAmountTable = actorUtilityObject.spell_cast diff --git a/classes/container_actors.lua b/classes/container_actors.lua index a0ffee3d1..64c55486b 100644 --- a/classes/container_actors.lua +++ b/classes/container_actors.lua @@ -113,7 +113,7 @@ function Details222.Pets.AkaarisSoulOwner(petGUID) local args = tooltipData.args local playerGUID - --iteragfe among args and find into the value field == guid and it must have guidVal + --iterate among args and find into the value field == guid and it must have guidVal for i = 1, #args do local arg = args[i] if (arg.field == "guid") then diff --git a/frames/window_playerbreakdown.lua b/frames/window_playerbreakdown.lua index cb39d1a3d..0f9ad80ff 100644 --- a/frames/window_playerbreakdown.lua +++ b/frames/window_playerbreakdown.lua @@ -3026,8 +3026,8 @@ function gump:CriaJanelaInfo() for spellID, spellObject in pairs(miscActor.buff_uptime_spells._ActorTable) do local spellName, _, spellIcon = GetSpellInfo(spellID) if (not spellObject.uptime) then - print(_GetSpellInfo(spellID)) - dumpt(spellObject) + --print(_GetSpellInfo(spellID)) + --dumpt(spellObject) end tinsert(newAuraTable, {spellIcon, spellName, spellObject.uptime, spellObject.appliedamt, spellObject.refreshamt, spellObject.uptime/combatTime*100, spellID = spellID}) end diff --git a/functions/boss.lua b/functions/boss.lua index edad9c97e..38f83f73e 100644 --- a/functions/boss.lua +++ b/functions/boss.lua @@ -777,7 +777,7 @@ do end) C_Timer.After(1, function() if (EncounterJournalSuggestTab) then - EncounterJournalSuggestTab:Click() + --EncounterJournalSuggestTab:Click() end end) diff --git a/plugins/Details_RaidCheck/Details_RaidCheck.lua b/plugins/Details_RaidCheck/Details_RaidCheck.lua index da7aa5aa0..df8eaee7b 100644 --- a/plugins/Details_RaidCheck/Details_RaidCheck.lua +++ b/plugins/Details_RaidCheck/Details_RaidCheck.lua @@ -241,7 +241,7 @@ local CreatePluginFrames = function() end --create line for the scroll - local scrollCreateLine = function(self, index) + local scrollCreateLine = function(self, index) --~create local line = CreateFrame("button", "$parentLine" .. index, self, "BackdropTemplate") line:SetPoint("topleft", self, "topleft", 1, -((index-1) * (scrollLineHeight + 1)) - 1) line:SetSize(scrollWidth - 2, scrollLineHeight) @@ -441,9 +441,11 @@ local CreatePluginFrames = function() elseif (playerTable.Eating) then line.FoodIndicator.texture = eatingFoodIcon.texture line.FoodIndicator.texcoord = eatingFoodIcon.coords + line.FoodTierIndicator.text = "" else line.FoodIndicator.texture = "" + line.FoodTierIndicator.text = "" end local flaskInfo = playerTable.Flask @@ -602,7 +604,7 @@ local CreatePluginFrames = function() end end) - local updateRaidCheckFrame = function(self, deltaTime) + local updateRaidCheckFrame = function(self, deltaTime) --~update raidCheckFrame.NextUpdate = raidCheckFrame.NextUpdate - deltaTime if (raidCheckFrame.NextUpdate > 0) then return