From 27f69675caec0c1ad11d38c15425e7f8aa556122 Mon Sep 17 00:00:00 2001 From: Tercio Jose Date: Wed, 23 Feb 2022 14:38:38 -0300 Subject: [PATCH] Added Cosmic Healing Potion to script 'Health Potion & Stone'. --- Details.toc | 4 +- Libs/LibOpenRaid/LibOpenRaid.lua | 19 +++++ boot.lua | 42 +++-------- classes/class_custom.lua | 69 ++++++++++--------- .../Details_DataStorage.toc | 2 +- .../Details_EncounterDetails.toc | 2 +- .../Details_RaidCheck/Details_RaidCheck.toc | 2 +- plugins/Details_Streamer/Details_Streamer.toc | 2 +- .../Details_TinyThreat/Details_TinyThreat.toc | 2 +- plugins/Details_Vanguard/Details_Vanguard.toc | 2 +- 10 files changed, 76 insertions(+), 70 deletions(-) diff --git a/Details.toc b/Details.toc index 7cab9b969..f9e91e424 100644 --- a/Details.toc +++ b/Details.toc @@ -1,5 +1,5 @@ -## Interface: 90105 -## Interface-Mainline: 90105 +## Interface: 90200 +## Interface-Mainline: 90200 ## Interface-BCC: 20502 ## Title: Details! Damage Meter ## Notes: Essential tool to impress that chick in your raid. diff --git a/Libs/LibOpenRaid/LibOpenRaid.lua b/Libs/LibOpenRaid/LibOpenRaid.lua index 49ee10daa..3254073e1 100644 --- a/Libs/LibOpenRaid/LibOpenRaid.lua +++ b/Libs/LibOpenRaid/LibOpenRaid.lua @@ -1,4 +1,22 @@ +--Notes: +--[=[ +player name usage: +For the same realm: the player name only, example: "Tercio" +For different realm: is used the 'none' ambiguation with no realm normalizarion: "Tercio-RealmName" + +Non normalizated player-realom names is used by the game on comm receive event as the 'sender' parameter +It also is the result from GetUnitName(unitId, true) or Ambiguate(playerName, 'none') + +to be implemented: +- pvp talents +- raid lockouts normal-heroic-mythic +- make GUID to be used when passing the player name +- make "player" unit information always be available even not in a group +--]=] + + + local major = "LibOpenRaid-1.0" local CONST_LIB_VERSION = 22 LIB_OPEN_RAID_CAN_LOAD = false @@ -203,6 +221,7 @@ LIB_OPEN_RAID_CAN_LOAD = false openRaidLib.commHandler = {} function openRaidLib.commHandler.OnReceiveComm(self, event, prefix, text, channel, sender, target, zoneChannelID, localID, name, instanceID) + --check if the data belong to us if (prefix == CONST_COMM_PREFIX) then --check if the lib can receive comms diff --git a/boot.lua b/boot.lua index 0b0883860..e4ab12427 100644 --- a/boot.lua +++ b/boot.lua @@ -6,8 +6,8 @@ local version, build, date, tocversion = GetBuildInfo() - _detalhes.build_counter = 9693 - _detalhes.alpha_build_counter = 9693 --if this is higher than the regular counter, use it instead + _detalhes.build_counter = 9694 + _detalhes.alpha_build_counter = 9694 --if this is higher than the regular counter, use it instead _detalhes.bcc_counter = 31 _detalhes.dont_open_news = true _detalhes.game_version = version @@ -33,29 +33,8 @@ do local Loc = _G.LibStub("AceLocale-3.0"):GetLocale( "Details" ) local news = { - - --[=[ - Added an option to change your own bar color. - Added 'Ignore this Npc' into the Npc list under the spell list section. - Bookmark window now uses the same scale than the options panel. - Class Color window now uses the same scale than the options panel. - If not casted on the player itself Power Infusion now shows in the buff list of the target. - Allowed nicknames on custom displays (by Flamanis). - Aligned Text Columns enabled is now default for new installs. - Fodder to the flames DH ability won't count damage done by the player on the add summoned. - Spell customization now get date from Lib-OpenRaid. - Fixed the load time for the Npc Ids panel on the spell list section. - Fixed all issues with the options panel scale. - Fixed tooltips overlap when the window is positioned at the top of the screen (fix by Flamanis). - Fixed auto hide windows which wasn't saving its group when unhiding (fix by Flamanis). - Fixed some XML Headers which was giving errors on loading (fix by github user h0tw1r3). - Fixed '/details me' on TBC, which wasn't working correctly (fix by github user Baugstein). - Fixed a typo on Vanguard plugin (fix by github user cruzerthebruzer). - Fixed font 'NuevaStd' where something the font didn't work at all. - Fixed an issue where for some characters the options panel won't open showing an error in the chat instead. - New API: combat:GetPlayerDeaths(deadPlayerName). - New API: Details:ShowDeathTooltip(combatObject, deathTable) for Cooltip tooltips. - ]=] + {"v9.2.0.9255.146", "February 22th, 2022"}, + "Added Cosmic Healing Potion to script 'Health Potion & Stone'.", {"v9.1.5.9213.146", "February 15th, 2022"}, "Added an option to change your own bar color.", @@ -565,7 +544,7 @@ do --> name to plugin object _detalhes.ToolBar.NameTable = {} _detalhes.ToolBar.Menu = {} - + --> statusbar ------------------------------------------------------------------- --> plugins container _detalhes.StatusBar = {} @@ -577,25 +556,26 @@ do _detalhes.StatusBar.NameTable = {} --> constants - --[[global]] DETAILS_HEALTH_POTION_ID = 307192 + --[[global]] DETAILS_HEALTH_POTION_ID = 307192 -- spiritual healing potion + --[[global]] DETAILS_HEALTH_POTION2_ID = 359867 --cosmic healing potion --[[global]] DETAILS_REJU_POTION_ID = 307194 --[[global]] DETAILS_MANA_POTION_ID = 307193 --[[global]] DETAILS_FOCUS_POTION_ID = 307161 --[[global]] DETAILS_HEALTHSTONE_ID = 6262 - + --[[global]] DETAILS_INT_POTION_ID = 307162 --[[global]] DETAILS_AGI_POTION_ID = 307159 --[[global]] DETAILS_STR_POTION_ID = 307164 --[[global]] DETAILS_STAMINA_POTION_ID = 307163 - --[[global]] DETAILS_HEALTH_POTION_LIST = { [DETAILS_HEALTH_POTION_ID] = true, --Healing Potion [DETAILS_HEALTHSTONE_ID] = true, --Warlock's Healthstone [DETAILS_REJU_POTION_ID] = true, --Rejuvenation Potion [DETAILS_MANA_POTION_ID] = true, --Mana Potion - [323436] = true --Phial of Serenity (from Kyrians) + [323436] = true, --Phial of Serenity (from Kyrians) + [DETAILS_HEALTH_POTION2_ID] = true, } - + --[[global]] DETAILS_MODE_GROUP = 2 --[[global]] DETAILS_MODE_ALL = 3 diff --git a/classes/class_custom.lua b/classes/class_custom.lua index 9bb12f95d..50f60961a 100644 --- a/classes/class_custom.lua +++ b/classes/class_custom.lua @@ -1312,7 +1312,7 @@ PotionUsed.__index = _detalhes.atributo_custom self.custom [#self.custom+1] = PotionUsed end - + ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ -- /run _detalhes:AddDefaultCustomDisplays() @@ -1356,39 +1356,46 @@ return total, top, amount ]], tooltip = [[ - --get the parameters passed - local actor, combat, instance = ... - - --get the cooltip object (we dont use the convencional GameTooltip here) - local GameCooltip = GameCooltip - local R, G, B, A = 0, 0, 0, 0.75 - - local hs = actor:GetSpell (6262) - if (hs) then - GameCooltip:AddLine (select (1, GetSpellInfo(6262)), _detalhes:ToK(hs.total)) - GameCooltip:AddIcon (select (3, GetSpellInfo (6262)), 1, 1, _detalhes.tooltip.line_height, _detalhes.tooltip.line_height) - GameCooltip:AddStatusBar (100, 1, R, G, B, A) - end - - local pot = actor:GetSpell (DETAILS_HEALTH_POTION_ID) - if (pot) then - GameCooltip:AddLine (select (1, GetSpellInfo(DETAILS_HEALTH_POTION_ID)), _detalhes:ToK(pot.total)) - GameCooltip:AddIcon (select (3, GetSpellInfo (DETAILS_HEALTH_POTION_ID)), 1, 1, _detalhes.tooltip.line_height, _detalhes.tooltip.line_height) - GameCooltip:AddStatusBar (100, 1, R, G, B, A) - end - - local pot = actor:GetSpell (DETAILS_REJU_POTION_ID) - if (pot) then - GameCooltip:AddLine (select (1, GetSpellInfo(DETAILS_REJU_POTION_ID)), _detalhes:ToK(pot.total)) - GameCooltip:AddIcon (select (3, GetSpellInfo (DETAILS_REJU_POTION_ID)), 1, 1, _detalhes.tooltip.line_height, _detalhes.tooltip.line_height) - GameCooltip:AddStatusBar (100, 1, R, G, B, A) - end - - --Cooltip code + --get the parameters passed + local actor, combat, instance = ... + + --get the cooltip object (we dont use the convencional GameTooltip here) + local GameCooltip = GameCooltip + local R, G, B, A = 0, 0, 0, 0.75 + + local hs = actor:GetSpell (6262) + if (hs) then + GameCooltip:AddLine (select (1, GetSpellInfo(6262)), _detalhes:ToK(hs.total)) + GameCooltip:AddIcon (select (3, GetSpellInfo (6262)), 1, 1, _detalhes.tooltip.line_height, _detalhes.tooltip.line_height) + GameCooltip:AddStatusBar (100, 1, R, G, B, A) + end + + local pot = actor:GetSpell (DETAILS_HEALTH_POTION_ID) + if (pot) then + GameCooltip:AddLine (select (1, GetSpellInfo(DETAILS_HEALTH_POTION_ID)), _detalhes:ToK(pot.total)) + GameCooltip:AddIcon (select (3, GetSpellInfo (DETAILS_HEALTH_POTION_ID)), 1, 1, _detalhes.tooltip.line_height, _detalhes.tooltip.line_height) + GameCooltip:AddStatusBar (100, 1, R, G, B, A) + end + + local pot = actor:GetSpell (DETAILS_HEALTH_POTION2_ID) + if (pot) then + GameCooltip:AddLine (select (1, GetSpellInfo(DETAILS_HEALTH_POTION2_ID)), _detalhes:ToK(pot.total)) + GameCooltip:AddIcon (select (3, GetSpellInfo (DETAILS_HEALTH_POTION2_ID)), 1, 1, _detalhes.tooltip.line_height, _detalhes.tooltip.line_height) + GameCooltip:AddStatusBar (100, 1, R, G, B, A) + end + + local pot = actor:GetSpell (DETAILS_REJU_POTION_ID) + if (pot) then + GameCooltip:AddLine (select (1, GetSpellInfo(DETAILS_REJU_POTION_ID)), _detalhes:ToK(pot.total)) + GameCooltip:AddIcon (select (3, GetSpellInfo (DETAILS_REJU_POTION_ID)), 1, 1, _detalhes.tooltip.line_height, _detalhes.tooltip.line_height) + GameCooltip:AddStatusBar (100, 1, R, G, B, A) + end + + --Cooltip code ]], percent_script = false, total_script = false, - script_version = 15, + script_version = 16, } -- /run _detalhes:AddDefaultCustomDisplays() local have = false diff --git a/plugins/Details_DataStorage/Details_DataStorage.toc b/plugins/Details_DataStorage/Details_DataStorage.toc index 4dcb2ff16..d348495d1 100644 --- a/plugins/Details_DataStorage/Details_DataStorage.toc +++ b/plugins/Details_DataStorage/Details_DataStorage.toc @@ -1,4 +1,4 @@ -## Interface: 90105 +## Interface: 90200 ## Title: Details!: Storage ## Notes: Stores information for Details! Damage Meter ## DefaultState: Enabled diff --git a/plugins/Details_EncounterDetails/Details_EncounterDetails.toc b/plugins/Details_EncounterDetails/Details_EncounterDetails.toc index 82c6cb77d..f9437e725 100644 --- a/plugins/Details_EncounterDetails/Details_EncounterDetails.toc +++ b/plugins/Details_EncounterDetails/Details_EncounterDetails.toc @@ -1,4 +1,4 @@ -## Interface: 90105 +## Interface: 90200 ## Title: Details!: Encounter Breakdown (plugin) ## Notes: Show detailed information about a boss encounter. Also provide damage per phase, graphic charts, easy weakauras creation. ## RequiredDeps: Details diff --git a/plugins/Details_RaidCheck/Details_RaidCheck.toc b/plugins/Details_RaidCheck/Details_RaidCheck.toc index 87361ebcd..0cf7123a9 100644 --- a/plugins/Details_RaidCheck/Details_RaidCheck.toc +++ b/plugins/Details_RaidCheck/Details_RaidCheck.toc @@ -1,4 +1,4 @@ -## Interface: 90105 +## Interface: 90200 ## Title: Details!: Raid Check (plugin) ## Notes: Show talents and item level for all members in your group, also shows food and flask state. ## RequiredDeps: Details diff --git a/plugins/Details_Streamer/Details_Streamer.toc b/plugins/Details_Streamer/Details_Streamer.toc index 5324c588f..b05c09906 100644 --- a/plugins/Details_Streamer/Details_Streamer.toc +++ b/plugins/Details_Streamer/Details_Streamer.toc @@ -1,4 +1,4 @@ -## Interface: 90105 +## Interface: 90200 ## Title: Details!: Streamer (plugin) ## Notes: Show which spells you are casting, viewers can see what are you doing and follow your steps. ## RequiredDeps: Details diff --git a/plugins/Details_TinyThreat/Details_TinyThreat.toc b/plugins/Details_TinyThreat/Details_TinyThreat.toc index 377f2eee1..3c26f5027 100644 --- a/plugins/Details_TinyThreat/Details_TinyThreat.toc +++ b/plugins/Details_TinyThreat/Details_TinyThreat.toc @@ -1,4 +1,4 @@ -## Interface: 90105 +## Interface: 90200 ## Title: Details!: Tiny Threat (plugin) ## Notes: Threat meter plugin, show threat for group members in the window. Select it from the Plugin menu in the Orange Cogwheel. ## RequiredDeps: Details diff --git a/plugins/Details_Vanguard/Details_Vanguard.toc b/plugins/Details_Vanguard/Details_Vanguard.toc index cfaa1492e..cc970cb76 100644 --- a/plugins/Details_Vanguard/Details_Vanguard.toc +++ b/plugins/Details_Vanguard/Details_Vanguard.toc @@ -1,4 +1,4 @@ -## Interface: 90105 +## Interface: 90200 ## Title: Details!: Vanguard (plugin) ## Notes: Show the health and debuffs for tanks in your group. ## SavedVariablesPerCharacter: _detalhes_databaseVanguard