From 89a5511fb93f577998725d672b992f2c257c1918 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Fri, 14 Jan 2022 03:06:02 +0100 Subject: [PATCH 01/51] perception cd tracking improved (rogue out of stealth) --- EventListener.lua | 9 +++++++++ Modules/Racial.lua | 8 ++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/EventListener.lua b/EventListener.lua index 23cd832..4d97d35 100644 --- a/EventListener.lua +++ b/EventListener.lua @@ -86,6 +86,9 @@ function Gladdy:SpotEnemy(unit, auraScan) end end end + if Gladdy.cooldownBuffs.racials[spellName] then + Gladdy:SendMessage("RACIAL_USED", unit, expirationTime, spellName) + end if Gladdy.specBuffs[spellName] then -- Check for auras that detect a spec local unitPet = string_gsub(unit, "%d$", "pet%1") if UnitIsUnit(unit, unitCaster) or UnitIsUnit(unitPet, unitCaster) then @@ -216,6 +219,9 @@ Gladdy.exceptionNames = { -- TODO MOVE ME TO CLASSBUFFS LIB Gladdy.cooldownBuffs = { [GetSpellInfo(6346)] = { cd = 180, spellId = 6346 }, -- Fear Ward + racials = { + [GetSpellInfo(20600)] = { cd = 180, spellId = 20600 }, -- Perception + } } function EventListener:UNIT_AURA(unit) @@ -243,6 +249,9 @@ function EventListener:UNIT_AURA(unit) end end end + if Gladdy.cooldownBuffs.racials[spellName] then + Gladdy:SendMessage("RACIAL_USED", unit, spellName, expirationTime, spellName) + end if not button.spec and Gladdy.specBuffs[spellName] then local unitPet = string_gsub(unit, "%d$", "pet%1") if unitCaster and (UnitIsUnit(unit, unitCaster) or UnitIsUnit(unitPet, unitCaster)) then diff --git a/Modules/Racial.lua b/Modules/Racial.lua index 7838b9b..ec5e237 100644 --- a/Modules/Racial.lua +++ b/Modules/Racial.lua @@ -165,13 +165,17 @@ function Racial:JOINED_ARENA() end) end -function Racial:RACIAL_USED(unit) +function Racial:RACIAL_USED(unit, expirationTime, spellName) local racial = self.frames[unit] local button = Gladdy.buttons[unit] if (not racial or not button or not button.race) then return end - Racial:Used(unit, GetTime(), Gladdy:Racials()[button.race].duration) + if expirationTime and Gladdy:Racials()[button.race].spellName ~= spellName then + return + end + local startTime = (expirationTime and expirationTime - Gladdy:Racials()[button.race].duration) or GetTime() + Racial:Used(unit, startTime, Gladdy:Racials()[button.race].duration) end function Racial:Used(unit, startTime, duration) From ddccf7a62eb5bf4dda28792241c172af8044e8bf Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Fri, 14 Jan 2022 03:14:02 +0100 Subject: [PATCH 02/51] frFR localization by Macumba --- Lang.lua | 353 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 353 insertions(+) diff --git a/Lang.lua b/Lang.lua index 740b673..3ae287d 100644 --- a/Lang.lua +++ b/Lang.lua @@ -1413,6 +1413,359 @@ elseif GetLocale() == "zhCN" then L["Background Color of the frame"] = "框架的背景顏色" L["Gladdy"] = "Gladdy框架" --Line 210, 709, 727 +elseif GetLocale() == "frFR" then + -- Announcements.lua + L["Announcements"] = "ANNONCE" + L["RESURRECTING: %s (%s)"] = "EN TRAIN DE RESSUSCITER: %s (%s)" + L["SPEC DETECTED: %s - %s (%s)"] = "SPEC DETECTÉ: %s - %s (%s)" + L["LOW HEALTH: %s (%s)"] = "VIE BASSE: %s (%s)" + L["TRINKET USED: %s (%s)"] = "TRINKET UTILISÉ: %s (%s)" + L["TRINKET READY: %s (%s)"] = "TRINKET PRÊT: %s (%s)" + L["DRINKING: %s (%s)"] = "EN TRAIN DE BOIRE: %s (%s)" + L["Self"] = "Soi" + L["Party"] = "Groupe" + L["Raid Warning"] = "Avertissement de raid" + L["Blizzard's Floating Combat Text"] = "Texte de combat flottant de Blizzard" + L["Trinket used"] = "Trinket utilisé" + L["Announce when an enemy's trinket is used"] = "Annonce quand un trinket ennemie est utilisé" + L["Trinket ready"] = "Trinket prêt" + L["Announce when an enemy's trinket is ready again"] = "Annonce quand un trinket ennemie est prêt de nouveau" + L["Drinking"] = "En train de boire" + L["Announces when enemies sit down to drink"] = "Annonce quand les ennemies s'assoient pour boire" + L["Resurrection"] = "Resurrection" + L["Announces when an enemy tries to resurrect a teammate"] = "Annonce quand un ennemie essaie de ressusciter un membre de son groupe" + L["New enemies"] = "Nouveaux ennemis" + L["Announces when new enemies are discovered"] = "Annonce quand les ennemies sont découverts" + L["Spec Detection"] = "Détection des SPEC" + L["Announces when the spec of an enemy was detected"] = "Annonce quand une spec d'un ennemie est détecté" + L["Low health"] = "Vie Basse" + L["Announces when an enemy drops below a certain health threshold"] = "Annonce quand un ennemie tombe en dessous d'un certain seuil de points de vie" + L["Low health threshold"] = "Seuil de points de vie bas" + L["Choose how low an enemy must be before low health is announced"] = "Choisissez à quel point un ennemi doit être bas avant d'annoncer une santé faible" + L["Destination"] = "Destination" + L["Choose how your announcements are displayed"] = "Choisissez comment vos annonces sont affichées" + + -- ArenaCountDown.lua + L["Arena Countdown"] = "Compte à rebours de l'arène" + L["Turn on/off"] = "Activer / désactiver" + L["Turns countdown before the start of an arena match on/off."] = "Active / désactive le compte à rebours avant le début d'un match d'arène" + L["Size"] = "Taille" + + -- Auras.lua + L["Auras"] = "Auras" + L["Frame"] = "Cadre" + L["Cooldown"] = "Temps de recharge" + L["No Cooldown Circle"] = "Pas de Balayage du temps de recharge" + L["Cooldown circle alpha"] = "Alpha du Balayage du temps de recharge" + L["Font"] = "Police de caractère" + L["Font of the cooldown"] = "Police du temps de recharge" + L["Font scale"] = "Échelle de police" + L["Scale of the text"] = "Échelle du texte" + L["Font color"] = "Couleur de la police" + L["Color of the text"] = "Couleur du texte" + L["Border"] = "Bordure" + L["Border style"] = "Style de bordure" + L["Buff color"] = "Couleur des buff" + L["Debuff color"] = "Couleur des Debuff" + L["Check All"] = "Vérifie tout" + L["Uncheck All"] = "Décocher tout" + L["Enabled"] = "Activé" + L["Priority"] = "Priorité" + + -- BuffsDebuffs.lua + L["Buffs and Debuffs"] = "Buffs et Debuffs" + L["Enable"] = "Activé" + L["Enabled Buffs and Debuffs module"] = "Module de buffs et debuffs activés" + L["Show CC"] = "Montrer les CC" + L["Shows all debuffs, which are displayed on the ClassIcon as well"] = "Montrer tout les debuffs, qui sont affichés sur l'icone de classe aussi" + L["Buffs"] = "Buffs" + L["Size & Padding"] = "Taille et remplissage" + L["Icon Size"] = "Taille de l'icône" + L["Size of the DR Icons"] = "Taille des icones de DR" + L["Icon Width Factor"] = "Facteur de largeur d'icône" + L["Stretches the icon"] = "Étire l'icône" + L["Icon Padding"] = "Remplissage d'icônes" + L["Space between Icons"] = "Espace entre les icônes" + L["Position"] = "Position" + L["Aura Position"] = "Position de l'aura" + L["Position of the aura icons"] = "Position de l'icône de l'aura" + L["Top"] = "Haut" + L["Bottom"] = "Bas" + L["Left"] = "Gauche" + L["Right"] = "Droite" + L["Grow Direction"] = "Direction de croissance" + L["Grow Direction of the aura icons"] = "Direction de croissance de l'icônr de l'aura" + L["Horizontal offset"] = "Décalage horizontal" + L["Vertical offset"] = "Décalage verticale" + L["Alpha"] = "Alpha" + L["Debuffs"] = "Debuffs" + L["Dynamic Timer Color"] = "Couleur de la minuterie dynamique" + L["Show dynamic color on cooldown numbers"] = "Afficher la couleur dynamique sur les numéros de recharge" + L["Color of the cooldown timer and stacks"] = "Couleur du temps de recharge et des piles" + L["Spell School Colors"] = "Couleurs de l'école de sorts" + L["Spell School Colors Enabled"] = "Couleurs de l'école de sorts" + L["Show border colors by spell school"] = "Afficher les couleurs des bordures par école de sorts" + L["Curse"] = "Malédiction" + L["Color of the border"] = "Couleur de la bordure" + L["Magic"] = "Magique" + L["Poison"] = "Poison" + L["Physical"] = "Physique" + L["Immune"] = "Immunisé" + L["Disease"] = "Maladie" + L["Aura"] = "Aura" + L["Form"] = "Forme" + + -- Castbar.lua + L["Cast Bar"] = "Barre d'incantation" + L["Bar"] = "Barre" + L["Bar Size"] = "Taille de la barre" + L["Bar height"] = "Hauteur de la barre" + L["Height of the bar"] = "Hauteur de la barre" + L["Bar width"] = "Largeur de la barre" + L["Width of the bars"] = "Largeur de la barre" + L["Texture"] = "Texture" + L["Bar texture"] = "Texture de la barre" + L["Texture of the bar"] = "Texture de la barre" + L["Bar color"] = "Couleur de la barre" + L["Color of the cast bar"] = "Couleur de la barre d'incantation" + L["Background color"] = "Couleur de l'Arrière plan" + L["Color of the cast bar background"] = "Couleur de l'Arrière plan de la barre d'incantation" + L["Border size"] = "taille de la bordure" + L["Status Bar border"] = "Bordure de la barre de statut" + L["Status Bar border color"] = "Couleur de la bordure de la barre de statut" + L["Icon"] = "Icone" + L["Icon size"] = "Taille de l'icone" + L["Icon border"] = "Bordure de l'icone" + L["Icon border color"] = "Couleur de la bordure de l'icone" + L["Spark"] = "Etincelle" + L["Spark enabled"] = "Etincelle activé" + L["Spark color"] = "Couleur de l'étincelle" + L["Color of the cast bar spark"] = "Couleur de l'étincelle de la barre d'incantation" + L["Font of the castbar"] = "Police de la barre d'incantation" + L["Font size"] = "Taille de la police" + L["Size of the text"] = "Taille du texte" + L["Format"] = "Format" + L["Timer Format"] = "Format du timer" + L["Remaining"] = "Restant" + L["Total"] = "Total" + L["Both"] = "Les deux" + L["Castbar position"] = "Position de la barre d'incantation" + L["Icon position"] = "Position de l'icone" + L["Offsets"] = "Décalage" + + -- Classicon.lua + L["Class Icon"] = "Icone de la classe" + L["Balance"] = "Equilibre" + L["Feral"] = "Combat farouche" + L["Restoration"] = "Restauration" + L["Beast Mastery"] = "Maîtrise des bêtes" + L["Marksmanship"] = "Précision" + L["Survival"] = "Survie" + L["Arcane"] = "Arcane" + L["Fire"] = "Feu" + L["Frost"] = "Givre" + L["Holy"] = "Sacré" + L["Retribution"] = "Vindicte" + L["Protection"] = "Protection" + L["Discipline"] = "Discipline" + L["Shadow"] = "Ombre" + L["Assassination"] = "Assassinat" + L["Combat"] = "Combat" + L["Subtlety"] = "Finesse" + L["Elemental"] = "Elementaire" + L["Enhancement"] = "Amélioration" + L["Affliction"] = "Affliction" + L["Demonology"] = "Démonologie" + L["Destruction"] = "Destruction" + L["Arms"] = "Armes" + L["Fury"] = "Fureur" + L["Show Spec Icon"] = "Afficher l'icone des spécialisations" + L["Shows Spec Icon once spec is detected"] = "Afficher l'icone des spécialisations une fois que les spé sont détectés" + L["Icon width factor"] = "Facteur de largeur d'icône" + L["This changes positions with trinket"] = "Cela change de position avec le trinket" + L["Border color"] = "Couleur de la bordure" + + --CombatIndicator.lua + L["Combat Indicator"] = "Indicateur de combat" + L["Enable Combat Indicator icon"] = "Activer l'icone de l'indicateur de combat" + L["Anchor"] = "Ancre" + L["This changes the anchor of the ci icon"] = "Cela change l'ancre de l'icône de l'indicateur de combat" + L["This changes position relative to its anchor of the ci icon"] = "Cela change la position par rapport à son ancre de l'icône de l'indicateur de combat" + + -- Cooldowns.lua + L["Cooldowns"] = "Temps de recharge (CD)" + L["COOLDOWN USED: %s (%s) used %s - %s sec. cooldown"] = "CD utilisé : %s (%s) utilisé %s - %s sec. cd" + L["Enabled cooldown module"] = "Module du temps de recharge activé" + L["Cooldown size"] = "Taille du temps de recharge" + L["Size of each cd icon"] = "Taille de chaque icone de CD" + L["Max Icons per row"] = "Nombre maximal d'icônes par ligne" + L["Scale of the font"] = "Échelle de la police" + L["Anchor of the cooldown icons"] = "Ancre de l'icone du temps de recharge" + L["Grow Direction of the cooldown icons"] = "Direction de croissance des icônes de temps de recharge" + L["Offset"] = "Décalage" + + -- Diminishings.lua + L["Diminishings"] = "Rendements décroissants (DR)" + L["Enabled DR module"] = "Activer le module DR" + L["DR Cooldown position"] = "Position du temps de recharge des DR" + L["Position of the cooldown icons"] = "Position des icones de temps de recharge" + L["DR Border Colors"] = "Couleur de la bordure des DR" + L["Dr Border Colors Enabled"] = "Couleur de la bordure des DR activé" + L["Colors borders of DRs in respective DR-color below"] = "Couleurs des bordures des DR dans la couleur DR respective ci-dessous" + L["Half"] = "Demi" + L["Quarter"] = "Quart" + L["Categories"] = "Catégories" + L["Force Icon"] = "Forcer les icones" + L["Icon of the DR"] = "Icones des DR" + + -- ExportImport.lua + L["Export Import"] = "Exporter Importer" + L["Profile Export Import"] = "Profile de l'Exporter Importer" + + -- Healthbar.lua + L["Health Bar"] = "Barre de vie" + L["DEAD"] = "MORT" + L["LEAVE"] = "QUITTER" + L["General"] = "Général" + L["Color of the status bar background"] = "Couleur de l'arrière-plan de la barre d'état" + L["Font of the bar"] = "Police de la barre" + L["Name font size"] = "Taille de la police du nom" + L["Size of the name text"] = "Taille du texte du nom" + L["Health font size"] = "Taille de la police de la santé" + L["Size of the health text"] = "Taille du texte de la santé" + L["Size of the border"] = "Taille de la bordure" + L["Health Bar Text"] = "Texte de la barre de santé" + L["Show name text"] = "Afficher le texte du nom" + L["Show the units name"] = "Afficher le nom des unités" + L["Show ArenaX"] = "Afficher ArenaX" + L["Show Arena1-5 as name instead"] = "Afficher Arena1-5 comme nom à la place" + L["Show the actual health"] = "Afficher la santé réelle" + L["Show the actual health on the health bar"] = "Afficher la santé réelle sur la barre de santé" + L["Show max health"] = "Afficher la santé maximale" + L["Show max health on the health bar"] = "Afficher la santé maximale sur la barre de santé" + L["Show health percentage"] = "Afficher le pourcentage de santé" + L["Show health percentage on the health bar"] = "Afficher le pourcentage de santé sur la barre de santé" + + -- Highlight.lua + L["Highlight"] = "Surbrillance" + L["Show Inside"] = "Afficher dedans" + L["Show Highlight border inside of frame"] = "Afficher la bordure de surbrillance à l'intérieur du cadre" + L["Colors"] = "Couleurs" + L["Target border color"] = "Couleur de la bordure cible" + L["Color of the selected targets border"] = "Couleur de la bordure des cibles sélectionnées" + L["Focus border color"] = "Couleur de la bordure du Focus" + L["Color of the focus border"] = "Couleur de la bordure du Focus" + L["Highlight target"] = "Mettre la cible en surbrillance" + L["Toggle if the selected target should be highlighted"] = "Basculer si la cible sélectionnée doit être mise en surbrillance" + L["Show border around target"] = "Afficher la bordure autour de la cible" + L["Toggle if a border should be shown around the selected target"] = "Basculer si une bordure doit être affichée autour de la cible sélectionnée" + L["Show border around focus"] = "Afficher la bordure autour du focus" + L["Toggle of a border should be shown around the current focus"] = "La bascule d'une bordure doit être affichée autour du focus actuel" + + -- Pets.lua + L["Pets"] = "Familier" + L["Enables Pets module"] = "Activer le module familier (pet)" + L["Width of the bar"] = "Largeur de la barre" + L["Health color"] = "Couleur de la santé" + L["Color of the status bar"] = "Couleur de la barre d'état" + L["Portrait"] = "Portrait" + L["Health Values"] = "Valeurs de santé" + + -- Powerbar.lua + L["Power Bar"] = "Barre de puissance" + L["Power Bar Text"] = "Texte de la barre de puissance" + L["Power Texts"] = "Textes de puissance" + L["Show race"] = "Afficher la race" + L["Show spec"] = "Afficher la spé" + L["Show the actual power"] = "Afficher la puissance actuelle" + L["Show the actual power on the power bar"] = "Afficher la puissance actuelle sur la barre de puissance" + L["Show max power"] = "Afficher la puissance maximale" + L["Show max power on the power bar"] = "Afficher la puissance maximale sur la barre de puissance" + L["Show power percentage"] = "Afficher le pourcentage de puissance" + L["Show power percentage on the power bar"] = "Afficher le pourcentage de puissance sur la barre de puissance" + + -- Racial.lua + L["Racial"] = "Raciale" + L["Enable racial icon"] = "Activer l'icone du raciale" + L["This changes the anchor of the racial icon"] = "Cela change l'ancre de l'icône du raciale" + L["This changes position relative to its anchor of the racial icon"] = "Cela change de position par rapport à son ancre de l'icône du raciale" + + -- TotemPlates.lua + L["Totem Plates"] = "Totem Plates" + L["Customize Totems"] = "Personnaliser les totems" + L["Custom totem name"] = "Personnaliser le nom des totems" + L["Totem General"] = "Totem Général" + L["Turns totem icons instead of nameplates on or off. (Requires reload)"] = "Active ou désactive les icônes totem au lieu des nameplates. (Nécessite un rechargement)" + L["Show friendly"] = "Montrer les amis" + L["Show enemy"] = "Montrer les ennemies" + L["Totem size"] = "Taille du totem" + L["Size of totem icons"] = "Taille de l'icone du totem" + L["Font of the custom totem name"] = "Police du nom du totem personnalisé" + L["Apply alpha when no target"] = "Appliquer l'alpha en l'absence de cible" + L["Always applies alpha, even when you don't have a target. Else it is 1."] = "Applique toujours l'alpha, même lorsque vous n'avez pas de cible. Sinon c'est 1." + L["Apply alpha when targeted"] = "Appliquer l'alpha lorsque ciblé" + L["Always applies alpha, even when you target the totem. Else it is 1."] = "Applique toujours l'alpha, même lorsque vous ciblez le totem. Sinon c'est 1." + L["All totem border alphas (configurable per totem)"] = "Tous les alphas de bordure de totem (configurables par totem)" + L["Totem icon border style"] = "Style de bordure d'icône totem" + L["All totem border color"] = "Toutes les couleurs de bordure de totem" + + -- Trinket.lua + L["Trinket"] = "Trinket (Bijoux PvP)" + L["Enable trinket icon"] = "Activer l'icone du trinket" + L["This changes positions of the trinket"] = "Cela change les positions du trinket" + + -- XiconProfiles.lua + L["Profile"] = "Profile" + + -- Frame.lua + L["Gladdy - drag to move"] = "Gladdy - faites glisser pour déplacer" + + -- Gladdy.lua + L["Welcome to Gladdy!"] = "Bienvenue chez Gladdy !" + L["First run has been detected, displaying test frame."] = "La première exécution a été détectée, affichant la trame de test." + L["Valid slash commands are:"] = "Les commandes de slash valides sont :" + L["If this is not your first run please lock or move the frame to prevent this from happening."] = "S'il ne s'agit pas de votre première utilisation, veuillez verrouiller ou déplacer le cadre pour éviter que cela ne se produise." + + -- Options.lua + L["settings"] = "paramètres" + L["Reset module"] = "Réinitialiser le module" + L["Reset module to defaults"] = "Réinitialiser le module" + L["No settings"] = "Pas de paramètres" + L["Module has no settings"] = "Le module n'a pas de paramètres" + L["General settings"] = "Paramètres général" + L["Lock frame"] = "Verouiller le cadre" + L["Toggle if frame can be moved"] = "Cliquez si le cadre peut être bougé" + L["Grow frame upwards"] = "Agrandir le cadre vers le haut" + L["If enabled the frame will grow upwards instead of downwards"] = "Si activé, le cadre grandira vers le haut au lieu de vers le bas" + L["Down"] = "Vers la bas" + L["Up"] = "Vers le haut" + L["Frame General"] = "Cadre général" + L["Frame scale"] = "Taille du cadre" + L["Scale of the frame"] = "Taille du cadre" + L["Frame padding"] = "Remplissage du cadre" + L["Padding of the frame"] = "Remplissage du cadre" + L["Frame width"] = "Largeur du cadre" + L["Margin"] = "Marge" + L["Margin between each button"] = "Marge entre chaque bouton" + L["Cooldown General"] = "Temps de recharge Général" + L["Font General"] = "Police Général" + L["General Font"] = "Police Général" + L["Font color text"] = "Texte de la couleur de la police" + L["Font color timer"] = "Texte de la couleur de la police" + L["Color of the timers"] = "Couleur des minuteurs" + L["Icons General"] = "Icônes Général" + L["Icon border style"] = "Style de bordure d'icône" + L["This changes the border style of all icons"] = "Cela change le style de bordure de toutes les icônes" + L["This changes the border color of all icons"] = "Cela change la couleur de bordure de toutes les icônes" + L["Statusbar General"] = "Barre d'état Général" + L["Statusbar texture"] = "Texture de la Barre d'état" + L["This changes the texture of all statusbar frames"] = "Cela change la texture de tous les cadres de la barre d'état" + L["Statusbar border style"] = "Style de bordure de la barre d'état" + L["This changes the border style of all statusbar frames"] = "Cela modifie le style de bordure de tous les cadres de la barre d'état" + L["Statusbar border offset divider (smaller is higher offset)"] = "Diviseur de décalage de bordure de barre d'état (le plus petit est le décalage le plus élevé)" + L["Offset of border to statusbar (in case statusbar shows beyond the border)"] = "Décalage de la bordure par rapport à la barre d'état (au cas où la barre d'état s'afficherait au-delà de la bordure)" + L["Statusbar border color"] = "Couleur de la bordure de la barre d'état" + L["This changes the border color of all statusbar frames"] = "Cela change la couleur de la bordure de tous les cadres de la barre d'état" end From 35e119160a69d610428961177c8be07b2e7e174e Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Fri, 14 Jan 2022 05:51:39 +0100 Subject: [PATCH 03/51] no more restoration warlocks --- Modules/Cooldowns.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Modules/Cooldowns.lua b/Modules/Cooldowns.lua index 8c695af..4dea4e9 100644 --- a/Modules/Cooldowns.lua +++ b/Modules/Cooldowns.lua @@ -345,6 +345,12 @@ function Cooldowns:DetectSpec(unit, spec) end if button.class == "PALADIN" and notIn(spec, {L["Holy"], L["Retribution"], L["Protection"]}) or button.class == "SHAMAN" and notIn(spec, {L["Restoration"], L["Enhancement"], L["Elemental"]}) + or button.class == "ROGUE" and notIn(spec, {L["Subtlety"], L["Assassination"], L["Combat"]}) + or button.class == "WARLOCK" and notIn(spec, {L["Demonology"], L["Destruction"], L["Affliction"]}) + or button.class == "PRIEST" and notIn(spec, {L["Shadow"], L["Discipline"], L["Holy"]}) + or button.class == "MAGE" and notIn(spec, {L["Frost"], L["Fire"], L["Arcane"]}) + or button.class == "DRUID" and notIn(spec, {L["Restoration"], L["Feral"], L["Balance"]}) + or button.class == "HUNTER" and notIn(spec, {L["Beast Mastery"], L["Marksmanship"], L["Survival"]}) or button.class == "WARRIOR" and notIn(spec, {L["Arms"], L["Protection"], L["Fury"]}) then return end From 4583cbdf24ba69f267a4b26cb04d65116e0d2833 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Fri, 14 Jan 2022 05:51:56 +0100 Subject: [PATCH 04/51] add Flat Statusbar texture --- Gladdy.lua | 1 + Images/UI-StatusBar.blp | Bin 0 -> 1564 bytes 2 files changed, 1 insertion(+) create mode 100644 Images/UI-StatusBar.blp diff --git a/Gladdy.lua b/Gladdy.lua index 24dc74a..32fb1e3 100644 --- a/Gladdy.lua +++ b/Gladdy.lua @@ -268,6 +268,7 @@ function Gladdy:OnInitialize() self.LSM:Register("statusbar", "Smooth", "Interface\\AddOns\\Gladdy\\Images\\Smooth") self.LSM:Register("statusbar", "Minimalist", "Interface\\AddOns\\Gladdy\\Images\\Minimalist") self.LSM:Register("statusbar", "LiteStep", "Interface\\AddOns\\Gladdy\\Images\\LiteStep.tga") + self.LSM:Register("statusbar", "Flat", "Interface\\AddOns\\Gladdy\\Images\\UI-StatusBar") self.LSM:Register("border", "Gladdy Tooltip round", "Interface\\AddOns\\Gladdy\\Images\\UI-Tooltip-Border_round_selfmade") self.LSM:Register("border", "Gladdy Tooltip squared", "Interface\\AddOns\\Gladdy\\Images\\UI-Tooltip-Border_square_selfmade") self.LSM:Register("font", "DorisPP", "Interface\\AddOns\\Gladdy\\Images\\DorisPP.TTF") diff --git a/Images/UI-StatusBar.blp b/Images/UI-StatusBar.blp new file mode 100644 index 0000000000000000000000000000000000000000..0e8013c217fb76c5e08156932d91c0a0d6a32927 GIT binary patch literal 1564 zcmZ?r2{2-0U|?WkU|@6r(i}iMg$0ON85phr@fRRwVPjz60b&s#CJF!zbO0(;0Ac|k z2AK)NK;|eI4S~@R7!3iOArSvxeBXZ{7^TSz2a%=!|F2s0|36+D7`|Y6H2N2m{|`t5 E0G#DDBme*a literal 0 HcmV?d00001 From 4885e11b106e4c3fb55ab4fdc7fc0d3031b82b33 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Fri, 14 Jan 2022 06:20:06 +0100 Subject: [PATCH 05/51] fix avenging wrath resets Divine Shield to 60s when Divine Shield CD > 60 --- Modules/Cooldowns.lua | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Modules/Cooldowns.lua b/Modules/Cooldowns.lua index 4dea4e9..9c8b190 100644 --- a/Modules/Cooldowns.lua +++ b/Modules/Cooldowns.lua @@ -534,7 +534,17 @@ function Cooldowns:CooldownUsed(unit, unitClass, spellId, expirationTimeInSecond for spellID,_ in pairs(cooldown.sharedCD) do if (spellID ~= "cd") then - self:CooldownStart(button, spellID, sharedCD) + local skip = false + for i = 1, button.lastCooldownSpell do + local icon = button.spellCooldownFrame["icon" .. i] + if (icon.spellId == spellID and icon.active and icon.timeLeft > sharedCD) then + skip = true + break + end + end + if not skip then + self:CooldownStart(button, spellID, sharedCD) + end end end end From 016327c6599602fe33651d2ee12235b529c76069 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Fri, 14 Jan 2022 06:35:49 +0100 Subject: [PATCH 06/51] add Conflagrate cd --- Constants.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/Constants.lua b/Constants.lua index 8bbd4c7..87f9878 100644 --- a/Constants.lua +++ b/Constants.lua @@ -922,6 +922,7 @@ local cooldownList = { [27277] = 8, -- Devour Magic [30414] = { cd = 20, spec = L["Destruction"], }, -- Shadowfury [17877] = { cd = 15, spec = L["Destruction"], }, -- Shadowburn + [30912] = { cd = 10, spec = L["Destruction"], }, -- Conflagrate [18708] = { cd = 900, spec = L["Demonology"], }, -- Feldom }, From 2d58d3fb7738bec9020532fa4e1e0d12ecf8af9f Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Fri, 14 Jan 2022 06:50:39 +0100 Subject: [PATCH 07/51] add Tree of Life druid spec detection --- Constants.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Constants.lua b/Constants.lua index 87f9878..0a5704e 100644 --- a/Constants.lua +++ b/Constants.lua @@ -20,6 +20,7 @@ local specBuffs = { [GetSpellInfo(24858)] = L["Restoration"], -- Moonkin Form; Dreamstate spec in TBC equals Restoration [GetSpellInfo(17007)] = L["Feral"], -- Leader of the Pack [GetSpellInfo(16188)] = L["Restoration"], -- Nature's Swiftness + [GetSpellInfo(33891)] = L["Restoration"], -- Tree of Life -- HUNTER [GetSpellInfo(34692)] = L["Beast Mastery"], -- The Beast Within @@ -97,6 +98,7 @@ local specSpells = { [GetSpellInfo(33987)] = L["Feral"], -- Mangle (Bear) [GetSpellInfo(18562)] = L["Restoration"], -- Swiftmend [GetSpellInfo(16188)] = L["Restoration"], -- Nature's Swiftness + [GetSpellInfo(33891)] = L["Restoration"], -- Tree of Life -- HUNTER [GetSpellInfo(19577)] = L["Beast Mastery"], -- Intimidation From 19eba81faa2814b72fef20db0dd8e58dc4922621 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Tue, 25 Jan 2022 19:58:51 +0100 Subject: [PATCH 08/51] shadowsight fix enabled/disabled --- Modules/ShadowsightTimer.lua | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Modules/ShadowsightTimer.lua b/Modules/ShadowsightTimer.lua index 09d9631..8843cc2 100644 --- a/Modules/ShadowsightTimer.lua +++ b/Modules/ShadowsightTimer.lua @@ -148,13 +148,15 @@ end --------------------------- function ShadowsightTimer:JOINED_ARENA() - self:RegisterEvent("CHAT_MSG_BG_SYSTEM_NEUTRAL") - self:SetScript("OnEvent", ShadowsightTimer.OnEvent) - for i=1,2 do - self["timerFrame" .. i].font:SetText("1:30") - self["timerFrame" .. i].font:SetTextColor(1, 0.8, 0) + if Gladdy.db.shadowsightTimerEnabled then + self:RegisterEvent("CHAT_MSG_BG_SYSTEM_NEUTRAL") + self:SetScript("OnEvent", ShadowsightTimer.OnEvent) + for i=1,2 do + self["timerFrame" .. i].font:SetText("1:30") + self["timerFrame" .. i].font:SetTextColor(1, 0.8, 0) + end + self.anchor:Show() end - self.anchor:Show() end function ShadowsightTimer:AURA_GAIN(unit, auraType, spellID) From 9266274c1646adaa0a28bc3312429555516d3bb6 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Tue, 25 Jan 2022 20:01:42 +0100 Subject: [PATCH 09/51] legacy to newlayout fix when frame has width = 0 or height = 0 --- Frame.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Frame.lua b/Frame.lua index 4baab81..84f5453 100644 --- a/Frame.lua +++ b/Frame.lua @@ -368,6 +368,10 @@ function Gladdy:SetPosition(frame, unit, xOffsetDB, yOffsetDB, newLayout, module if (not newLayout) then --Gladdy:Debug("INFO", name, "old X/Y:", frame:GetCenter()) local xOffset, yOffset = frame:GetLeft(), frame:GetTop() + if not xOffset or not yOffset then + xOffset = frame:GetCenter() - frame:GetWidth()/2 + yOffset = select(2, frame:GetCenter()) + frame:GetHeight()/2 + end local x,y = button.healthBar:GetLeft(), button.healthBar:GetTop() local newXOffset = math_abs(x - xOffset) * (x > xOffset and -1 or 1) local newYOffset = math_abs(y - yOffset) * (y > yOffset and -1 or 1) From 37902e37e793026c2e578bbaefe68caf20165026 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Tue, 25 Jan 2022 20:03:17 +0100 Subject: [PATCH 10/51] hide countdown frame when not used --- Modules/ArenaCountDown.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Modules/ArenaCountDown.lua b/Modules/ArenaCountDown.lua index dda004f..6218064 100644 --- a/Modules/ArenaCountDown.lua +++ b/Modules/ArenaCountDown.lua @@ -26,7 +26,7 @@ function ACDFrame:Initialize() ACDNumFrame:SetHeight(512) ACDNumFrame:SetWidth(512) ACDNumFrame:SetPoint("CENTER", 0, 256) - ACDNumFrame:Show() + ACDNumFrame:Hide() self.ACDNumFrame = ACDNumFrame local ACDNumTens = ACDNumFrame:CreateTexture("ACDNumTens", "HIGH") @@ -88,6 +88,7 @@ function ACDFrame.OnUpdate(self, elapse) self.countdown = self.countdown - elapse; else self.hidden = true; + self.ACDNumFrame:Hide() self.ACDNumTens:Hide(); self.ACDNumOnes:Hide(); self.ACDNumOne:Hide(); From 27eeade50744adca5306dc2ed8b1aa4b578c8ee4 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Tue, 25 Jan 2022 20:40:42 +0100 Subject: [PATCH 11/51] better class icons --- Images/Classes/INV_Hammer_01.blp | Bin 23016 -> 6660 bytes Images/Classes/INV_Sword_27.blp | Bin 23016 -> 6660 bytes Images/Classes/INV_ThrowingKnife_04.blp | Bin 6660 -> 6660 bytes Images/Classes/Spell_Nature_Drowsy.blp | Bin 6660 -> 6660 bytes 4 files changed, 0 insertions(+), 0 deletions(-) diff --git a/Images/Classes/INV_Hammer_01.blp b/Images/Classes/INV_Hammer_01.blp index 3f73ae7b4c5efe88442c1247acbbb340c184652b..0eb729fe65f4142ea0d44696003319a197c9f978 100644 GIT binary patch literal 6660 zcmai(4Oo-a9>C8SI?-$)WwKE{iRKd$uR}tH!#;#ZMX*Gsm$_ky zhOy!r^8DEO9_8;AR&nI7hJ`F71?2k^cz(;npXA%5v_ zoFM1MfooXkxqE+3<)0|Zez=PH_&v-8&)EYzU>Ee_J3RjV&4Hf=_+?mO!6Tl0x4qNE ztMIOf%%9;o+|~Rjd&XJ~&VB9!72oppoiLdCfN#8AaT9o!-SEU2T6|-XkJ=x8-9F^e zUnLwH#0k%Jdi1unjW%+r)HYn;$8TDf=Q%&PKK)kw?9u0Rxi*trTs^lH-r(Z{yT-Mb zc{{BVEgv5yjf*?rQvf-8sHL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qrAv@xL|Kf%8v_J!4{&D&^E%@AtWwhg6cr(WwZ lVLbIN8$f~W{jXUQB7U6z$mAafPaXfGEi>uIK_&fu{9iFDiaP)R diff --git a/Images/Classes/INV_ThrowingKnife_04.blp b/Images/Classes/INV_ThrowingKnife_04.blp index 51ba1239d4e3ff7a406c445442890342d97b40cf..39678daf07ac3d9c74d84406052be4130aebc140 100644 GIT binary patch literal 6660 zcmb7J4^&h29{({Q?|=!I92M!fA$w1hiDXmpoMZ#*m46b!%Lr*Or=|#ss6ARDQy~8! zT0Um^vJPsfO=k6SW}1QEpVu+Lo=q$bCZI!6hsPGAzt32eI#`#3+z` zufB0Ki+yK>%^J?~10E>P35!^|(an#hT;cdxS#I3n^#BYWJYgiu5B>+a;{ZBa2X-)S z|9QmzJD&R@fA4BL!}-r+)_GPR=mEVTm)OMH_f!XVobZQRVD4x>UgN?uoCs$M(>yVJ zhqsEWGGA*I81MI1ecQn0H_W9S(cfSD%V8WIevkKaSlPW-`-%PT&mF(=@+-XqeOcng zW?t@{AN-AMC{^EFW4jJbu=C%!;`ZZPexH|TdDt-pKWsjw6*oBlK(F!5R!+|)iH7r! z!GrZ%bowWE{`tIj;?%HqFJ@fi_(6~Hln>|M;=#N;=#_pnnBzyTuWEn6`oIqO+s7Kh z1NHHAG;StmpY@d+ZaILND|o+qjs|e{ejd&H(|(Alc>=pi<+BTEJ3-6Yhi5xu7Elk%*DWbhZiEhYrpOhgQAsX=T zvjcJ0@9ESZ@Y_Is3NNqqz*fL+{ZJ+b<3G|z{Bi3e*ey>pfxJd89+i=+-6+JMxm$5C zG(8XEr7bcf7h4oy|NZ*uu_+m;J%DeZ%;gTs}z|+LX^Ps z`EDsnO-)S)oV^MmU#pGyzjb~|jG@~s2Kt5M4MCd1zHY!JGS>dQRKTA0JTYxSNSSlD z1M)#zu>H(8-vs#wyVaCJk&^@X@S2;td$$jfe5`oUCsb2-+X(cHBh|=|Wj+S@V=?QG zW*%Tq`}1&qm2!nY(4%oa($iB?0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Y;VirjeES z7pBu_Uj%09zsGdj1pZm`IKmh!L--$<#}y)Lh~O3(Pt0XldOyZE7=*rdAujg3P}UAk@-y znar=Lcpk(PND0IYwdMA;AJ{RSpF5jAio+h6jQ>q zK8)wtVtp5onPn9mDk|+aZur5Dg<8rK@OS_Z1eE^u3ynP##`@mscP(Q)Y1j{?mnZdGnjJ z#ekdeepKpWa-W3XYdD-1pjS02sFtp6`vG@VccgFdE+qFw!zw&KT^T0*Ez{ky6$o6kBRF?xd(tZ-YZ!A+Utp|EkoB}D;Tyo$4anH9LdC=zv`kUUP zHO1E+IRSV>Pe)~x?ENcsu^--(P33sWms!C0Nfong!swz3cBgI3+pTFRF*XqBr0`xVNixJv{ z>pK-|z$pn1ap diff --git a/Images/Classes/Spell_Nature_Drowsy.blp b/Images/Classes/Spell_Nature_Drowsy.blp index 355c6dd59f9c946ee479bf47b2e1d48b5ff08caf..420120bfe08dadc89e9b1d32a1ce5c5f7c438037 100644 GIT binary patch literal 6660 zcmai&3se(V8h|gcu7QZqqqKBum&7)^phdze3hk)`+wPHSS5Sr|G?D;aTi{p$OB;fi zfMCl*+wv%uP^BP<34s=gtqR1g_OUDM+DgRQ@~AaHA0XWtpeUKWGvU91?CCn^40FEx z|NZa(x_9odaZA*n-4H??uA7?}KbgDy9(*suw=cdQK&S`bH}HK6-}n3;E8Ok!#tPU5 z!iL58!64jstTc`Bw=b+%^$v5niQlR|ec-bCMtJ?E*PE94S;F6m5uVw;=5jbc&N2K* z;63NIt~rl?U!z;}QFC~5zW?Z^1wG+jK@PcKc9s=;1Kl3Oc0X8)3MMr$^>{c3hs{t_ z*TqH5laVvem#wE#m}koJExwFCu#X#B<{XdE`TVP_Tsy0eLLJPEWv`zcb^z~PB6^S+ z5B_`4#sPAs4$MU_a6FxVSF^teE59D0S^pi(IM3JvJ75>aMfE%8cQps|ya$T2&*+C8 z@hTtqgdM_8g=MY`zr$0^R@qT&v5QRxl?xj^ndfp_`~!3S9gJMgvhSF~&-)LK$r!!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f)o($+9xPELzwqi7}X8yuoVWG1Qw`Fc1wMb@xtw5f}kG@vxx50ZKd9 z`YTX=NU|7EnoRK!7v-V*L!@UI&_trPukvTyEMGl7lrQ57FboTbKddt11z+}ez-{sk zfUlA-KS71?eMK#0T}(#G8UQJn z0j|P=I$PZc{&AUG|HwE19KUmY<w;lt*fPl5!ydI+yP@?Csg zMn(qVaF~z?Pwsn_FzkEDuypuKnsC^)-3wvxi4?-{5!(=bDum_VF9(Vh(y%ZYUje38 zD6Ka~@(H9_a<>$x_lik?gXQ<$uX3J!op8T<_C{t~&T+y=?HdxIYiAYVV}D%BE-r<9 zOW$Fi>Sr^qU9H4Gb1*_GlZAy5?mHu(8l$432$!^NtjSE#xCp1)V{4RM=eUmtTAX%% zuoCnv|A^=-vh~q#Ww?t7m)K_{YE~!d2(#IV3MxulXd??NO9ayJ@Nm8YmI?p@0s{C7 zj5hvxpdU{7me`*@Fn@QjQnZI~b-m&Ek?F}=!p4dv@tNycKH;aPb>xE=Jd~Y5c|Uq*Or7^x=7B0*Z3^=*tmXy^QvEcGfGXi2FTrEW%hg77z&)D*PD44}8D6|dRKRTQ-K z5;dG+4p6)%e$Y%7Zuga^cFGF&V`lN+;ciLR>G(-G_!&#rB?TDhzdgVagy&il(yrb) z8ASMOOGizRYjhLg$+gtdcQ4l#5{@m_(H7&6o*s{)Pry^t_cH{0Tlto0>wk}v?{Q&f zJwA3r@Uou<&T$4-IIFAss~KCfTtm;j5iO=AvD#;I7r|59!f^9l`L;BNH$fLHYDriY zVJasZoa!i#pnrDlX>vQUz1wLsycbv4lgEE6HkN*n#c1%iWg-{w^9^lTO-TL%obaeu From 66931e18f96e7169c9535f8c1e1774710c08aa84 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Tue, 25 Jan 2022 20:41:32 +0100 Subject: [PATCH 12/51] fix castbar width/height being 0 on import --- Modules/Castbar.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Modules/Castbar.lua b/Modules/Castbar.lua index 3bf8f65..38f0ff0 100644 --- a/Modules/Castbar.lua +++ b/Modules/Castbar.lua @@ -879,6 +879,12 @@ function Castbar:LegacySetPosition(castBar, unit, leftMargin, rightMargin) return Gladdy.db.newLayout end castBar:ClearAllPoints() + if Gladdy.db.castBarWidth <= 0 then + castBar:SetWidth(0.1) + end + if Gladdy.db.castBarHeight <= 0 then + castBar:SetHeight(0.1) + end local horizontalMargin = (Gladdy.db.highlightInset and 0 or Gladdy.db.highlightBorderSize) + Gladdy.db.padding if (Gladdy.db.castBarPos == "LEFT") then local anchor = Gladdy:GetAnchor(unit, "LEFT") From 5ceedb53dea7fb5c2d04dac0d85a3ce718e57d4a Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Tue, 25 Jan 2022 20:42:33 +0100 Subject: [PATCH 13/51] temp fix for legacy xOffset yOffset not present --- Frame.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Frame.lua b/Frame.lua index 84f5453..2713510 100644 --- a/Frame.lua +++ b/Frame.lua @@ -369,8 +369,8 @@ function Gladdy:SetPosition(frame, unit, xOffsetDB, yOffsetDB, newLayout, module --Gladdy:Debug("INFO", name, "old X/Y:", frame:GetCenter()) local xOffset, yOffset = frame:GetLeft(), frame:GetTop() if not xOffset or not yOffset then - xOffset = frame:GetCenter() - frame:GetWidth()/2 - yOffset = select(2, frame:GetCenter()) + frame:GetHeight()/2 + xOffset = frame:GetCenter()-- - frame:GetWidth()/2 + yOffset = select(2, frame:GetCenter())-- + frame:GetHeight()/2 end local x,y = button.healthBar:GetLeft(), button.healthBar:GetTop() local newXOffset = math_abs(x - xOffset) * (x > xOffset and -1 or 1) From 0b512af2b7ba5f537e8f56bf27d89db6c53bb6af Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Thu, 27 Jan 2022 01:02:31 +0100 Subject: [PATCH 14/51] cooldowns first refactor: - no more lastCooldownSpell - unused icons are in iconCache for later reuse - only create as many icons as needed - no more weired indexing - cleanup duplicate code - testmode cleanup --- Modules/Cooldowns.lua | 569 ++++++++++++++++++++---------------------- 1 file changed, 269 insertions(+), 300 deletions(-) diff --git a/Modules/Cooldowns.lua b/Modules/Cooldowns.lua index 9c8b190..61ec21a 100644 --- a/Modules/Cooldowns.lua +++ b/Modules/Cooldowns.lua @@ -1,4 +1,4 @@ -local type, pairs, ipairs, ceil, tonumber, mod, tostring, upper, select = type, pairs, ipairs, ceil, tonumber, mod, tostring, string.upper, select +local type, pairs, ipairs, ceil, tonumber, mod, tostring, upper, select, tinsert, tremove = type, pairs, ipairs, ceil, tonumber, mod, tostring, string.upper, select, tinsert, tremove local GetTime = GetTime local CreateFrame = CreateFrame local RACE_ICON_TCOORDS = { @@ -74,6 +74,7 @@ local Cooldowns = Gladdy:NewModule("Cooldowns", nil, { function Cooldowns:Initialize() self.cooldownSpellIds = {} self.spellTextures = {} + self.iconCache = {} for _,spellTable in pairs(Gladdy:GetCooldownList()) do for spellId,_ in pairs(spellTable) do local spellName, _, texture = GetSpellInfo(spellId) @@ -91,6 +92,10 @@ function Cooldowns:Initialize() self:RegisterMessage("UNIT_DESTROYED") end +--------------------- +-- Frame +--------------------- + function Cooldowns:CreateFrame(unit) local button = Gladdy.buttons[unit] -- Cooldown frame @@ -99,42 +104,105 @@ function Cooldowns:CreateFrame(unit) spellCooldownFrame:SetMovable(true) spellCooldownFrame:SetFrameStrata(Gladdy.db.cooldownFrameStrata) spellCooldownFrame:SetFrameLevel(Gladdy.db.cooldownFrameLevel) - for x = 1, 14 do - local icon = CreateFrame("Frame", nil, spellCooldownFrame) + spellCooldownFrame.icons = {} + button.spellCooldownFrame = spellCooldownFrame +end + +function Cooldowns:CreateIcon() -- returns iconFrame + local icon + if (#self.iconCache > 0) then + icon = tremove(self.iconCache, #self.iconCache) + else + icon = CreateFrame("Frame") icon:EnableMouse(false) - icon:SetFrameStrata(Gladdy.db.cooldownFrameStrata) - icon:SetFrameLevel(Gladdy.db.cooldownFrameLevel) + icon.texture = icon:CreateTexture(nil, "BACKGROUND") icon.texture:SetMask("Interface\\AddOns\\Gladdy\\Images\\mask") icon.texture:SetAllPoints(icon) icon.cooldown = CreateFrame("Cooldown", nil, icon, "CooldownFrameTemplate") icon.cooldown.noCooldownCount = true - - icon.cooldown:SetFrameStrata(Gladdy.db.cooldownFrameStrata) - icon.cooldown:SetFrameLevel(Gladdy.db.cooldownFrameLevel + 1) icon.cooldown:SetReverse(false) icon.cooldown:SetHideCountdownNumbers(true) icon.cooldownFrame = CreateFrame("Frame", nil, icon) icon.cooldownFrame:ClearAllPoints() icon.cooldownFrame:SetAllPoints(icon) - icon.cooldownFrame:SetFrameStrata(Gladdy.db.cooldownFrameStrata) - icon.cooldownFrame:SetFrameLevel(Gladdy.db.cooldownFrameLevel + 2) icon.border = icon.cooldownFrame:CreateTexture(nil, "OVERLAY") icon.border:SetAllPoints(icon) - icon.border:SetTexture(Gladdy.db.cooldownBorderStyle) - icon.border:SetVertexColor(Gladdy:SetColor(Gladdy.db.cooldownBorderColor)) icon.cooldownFont = icon.cooldownFrame:CreateFontString(nil, "OVERLAY") - icon.cooldownFont:SetFont(Gladdy:SMFetch("font", "cooldownFont"), Gladdy.db.cooldownSize / 2 * Gladdy.db.cooldownFontScale, "OUTLINE") - icon.cooldownFont:SetTextColor(Gladdy:SetColor(Gladdy.db.cooldownFontColor)) icon.cooldownFont:SetAllPoints(icon) - spellCooldownFrame["icon" .. x] = icon + self:UpdateIcon(icon) + end + return icon +end + +function Cooldowns:UpdateIcon(icon) + icon:SetFrameStrata(Gladdy.db.cooldownFrameStrata) + icon:SetFrameLevel(Gladdy.db.cooldownFrameLevel) + icon.cooldown:SetFrameStrata(Gladdy.db.cooldownFrameStrata) + icon.cooldown:SetFrameLevel(Gladdy.db.cooldownFrameLevel + 1) + icon.cooldownFrame:SetFrameStrata(Gladdy.db.cooldownFrameStrata) + icon.cooldownFrame:SetFrameLevel(Gladdy.db.cooldownFrameLevel + 2) + + icon:SetHeight(Gladdy.db.cooldownSize) + icon:SetWidth(Gladdy.db.cooldownSize * Gladdy.db.cooldownWidthFactor) + icon.cooldownFont:SetFont(Gladdy:SMFetch("font", "cooldownFont"), Gladdy.db.cooldownSize / 2 * Gladdy.db.cooldownFontScale, "OUTLINE") + icon.cooldownFont:SetTextColor(Gladdy:SetColor(Gladdy.db.cooldownFontColor)) + + icon.cooldown:SetWidth(icon:GetWidth() - icon:GetWidth()/16) + icon.cooldown:SetHeight(icon:GetHeight() - icon:GetHeight()/16) + icon.cooldown:ClearAllPoints() + icon.cooldown:SetPoint("CENTER", icon, "CENTER") + icon.cooldown:SetAlpha(Gladdy.db.cooldownCooldownAlpha) + + icon.cooldownFont:SetFont(Gladdy:SMFetch("font", "cooldownFont"), (icon:GetWidth()/2 - 1) * Gladdy.db.cooldownFontScale, "OUTLINE") + icon.cooldownFont:SetTextColor(Gladdy:SetColor(Gladdy.db.cooldownFontColor)) + + icon.border:SetTexture(Gladdy.db.cooldownBorderStyle) + icon.border:SetVertexColor(Gladdy:SetColor(Gladdy.db.cooldownBorderColor)) +end + +function Cooldowns:IconsSetPoint(button) + for i,icon in ipairs(button.spellCooldownFrame.icons) do + icon:SetParent(button.spellCooldownFrame) + icon:ClearAllPoints() + if (Gladdy.db.cooldownXGrowDirection == "LEFT") then + if (i == 1) then + icon:SetPoint("LEFT", button.spellCooldownFrame, "LEFT", 0, 0) + elseif (mod(i-1,Gladdy.db.cooldownMaxIconsPerLine) == 0) then + if (Gladdy.db.cooldownYGrowDirection == "DOWN") then + icon:SetPoint("TOP", button.spellCooldownFrame.icons[i-Gladdy.db.cooldownMaxIconsPerLine], "BOTTOM", 0, -Gladdy.db.cooldownIconPadding) + else + icon:SetPoint("BOTTOM", button.spellCooldownFrame.icons[i-Gladdy.db.cooldownMaxIconsPerLine], "TOP", 0, Gladdy.db.cooldownIconPadding) + end + else + icon:SetPoint("RIGHT", button.spellCooldownFrame.icons[i-1], "LEFT", -Gladdy.db.cooldownIconPadding, 0) + end + end + if (Gladdy.db.cooldownXGrowDirection == "RIGHT") then + if (i == 1) then + icon:SetPoint("LEFT", button.spellCooldownFrame, "LEFT", 0, 0) + elseif (mod(i-1,Gladdy.db.cooldownMaxIconsPerLine) == 0) then + if (Gladdy.db.cooldownYGrowDirection == "DOWN") then + icon:SetPoint("TOP", button.spellCooldownFrame.icons[i-Gladdy.db.cooldownMaxIconsPerLine], "BOTTOM", 0, -Gladdy.db.cooldownIconPadding) + else + icon:SetPoint("BOTTOM", button.spellCooldownFrame.icons[i-Gladdy.db.cooldownMaxIconsPerLine], "TOP", 0, Gladdy.db.cooldownIconPadding) + end + else + icon:SetPoint("LEFT", button.spellCooldownFrame.icons[i-1], "RIGHT", Gladdy.db.cooldownIconPadding, 0) + end + end + end +end + +function Cooldowns:UpdateFrameOnce() + for _,icon in ipairs(self.iconCache) do + Cooldowns:UpdateIcon(icon) end - button.spellCooldownFrame = spellCooldownFrame end function Cooldowns:UpdateFrame(unit) @@ -145,7 +213,6 @@ function Cooldowns:UpdateFrame(unit) button.spellCooldownFrame:SetWidth(1) button.spellCooldownFrame:SetFrameStrata(Gladdy.db.cooldownFrameStrata) button.spellCooldownFrame:SetFrameLevel(Gladdy.db.cooldownFrameLevel) - button.spellCooldownFrame:Show() Gladdy:SetPosition(button.spellCooldownFrame, unit, "cooldownXOffset", "cooldownYOffset", Cooldowns:LegacySetPosition(button, unit), Cooldowns) @@ -155,92 +222,65 @@ function Cooldowns:UpdateFrame(unit) Gladdy.db.cooldownSize * Gladdy.db.cooldownWidthFactor, Gladdy.db.cooldownSize, 0, 0, "cooldown") end -- Update each cooldown icon - local o = 1 - for j = 1, 14 do - local icon = button.spellCooldownFrame["icon" .. j] - - icon:SetFrameStrata(Gladdy.db.cooldownFrameStrata) - icon:SetFrameLevel(Gladdy.db.cooldownFrameLevel) - icon.cooldown:SetFrameStrata(Gladdy.db.cooldownFrameStrata) - icon.cooldown:SetFrameLevel(Gladdy.db.cooldownFrameLevel + 1) - icon.cooldownFrame:SetFrameStrata(Gladdy.db.cooldownFrameStrata) - icon.cooldownFrame:SetFrameLevel(Gladdy.db.cooldownFrameLevel + 2) - - icon:SetHeight(Gladdy.db.cooldownSize) - icon:SetWidth(Gladdy.db.cooldownSize * Gladdy.db.cooldownWidthFactor) - icon.cooldownFont:SetFont(Gladdy:SMFetch("font", "cooldownFont"), Gladdy.db.cooldownSize / 2 * Gladdy.db.cooldownFontScale, "OUTLINE") - icon.cooldownFont:SetTextColor(Gladdy:SetColor(Gladdy.db.cooldownFontColor)) - icon:ClearAllPoints() - if (Gladdy.db.cooldownXGrowDirection == "LEFT") then - if (j == 1) then - icon:SetPoint("LEFT", button.spellCooldownFrame, "LEFT", 0, 0) - elseif (mod(j-1,Gladdy.db.cooldownMaxIconsPerLine) == 0) then - if (Gladdy.db.cooldownYGrowDirection == "DOWN") then - icon:SetPoint("TOP", button.spellCooldownFrame["icon" .. o], "BOTTOM", 0, -Gladdy.db.cooldownIconPadding) - else - icon:SetPoint("BOTTOM", button.spellCooldownFrame["icon" .. o], "TOP", 0, Gladdy.db.cooldownIconPadding) - end - o = o + tonumber(Gladdy.db.cooldownMaxIconsPerLine) - else - icon:SetPoint("RIGHT", button.spellCooldownFrame["icon" .. j - 1], "LEFT", -Gladdy.db.cooldownIconPadding, 0) - end - end - if (Gladdy.db.cooldownXGrowDirection == "RIGHT") then - if (j == 1) then - icon:SetPoint("LEFT", button.spellCooldownFrame, "LEFT", 0, 0) - elseif (mod(j-1,Gladdy.db.cooldownMaxIconsPerLine) == 0) then - if (Gladdy.db.cooldownYGrowDirection == "DOWN") then - icon:SetPoint("TOP", button.spellCooldownFrame["icon" .. o], "BOTTOM", 0, -Gladdy.db.cooldownIconPadding) - else - icon:SetPoint("BOTTOM", button.spellCooldownFrame["icon" .. o], "TOP", 0, Gladdy.db.cooldownIconPadding) - end - o = o + tonumber(Gladdy.db.cooldownMaxIconsPerLine) - else - icon:SetPoint("LEFT", button.spellCooldownFrame["icon" .. j - 1], "RIGHT", Gladdy.db.cooldownIconPadding, 0) - end - end - - if (icon.active) then - icon.active = false - icon.cooldown:SetCooldown(GetTime(), 0) - icon.cooldownFont:SetText("") - icon:SetScript("OnUpdate", nil) - end - icon.spellId = nil - icon:SetAlpha(1) - icon.texture:SetTexture("Interface\\Icons\\Spell_Holy_PainSupression") - - icon.cooldown:SetWidth(icon:GetWidth() - icon:GetWidth()/16) - icon.cooldown:SetHeight(icon:GetHeight() - icon:GetHeight()/16) - icon.cooldown:ClearAllPoints() - icon.cooldown:SetPoint("CENTER", icon, "CENTER") - icon.cooldown:SetAlpha(Gladdy.db.cooldownCooldownAlpha) - - icon.cooldownFont:SetFont(Gladdy:SMFetch("font", "cooldownFont"), (icon:GetWidth()/2 - 1) * Gladdy.db.cooldownFontScale, "OUTLINE") - icon.cooldownFont:SetTextColor(Gladdy:SetColor(Gladdy.db.cooldownFontColor)) - - icon.border:SetTexture(Gladdy.db.cooldownBorderStyle) - icon.border:SetVertexColor(Gladdy:SetColor(Gladdy.db.cooldownBorderColor)) - icon:Hide() + for _,icon in pairs(button.spellCooldownFrame.icons) do + self:UpdateIcon(icon) end + self:IconsSetPoint(button) button.spellCooldownFrame:Show() else button.spellCooldownFrame:Hide() end - if (Gladdy.frame.testing) then - self:Test(unit) +end + +function Cooldowns:ResetUnit(unit) + local button = Gladdy.buttons[unit] + if not button then + return + end + for i=#button.spellCooldownFrame.icons,1,-1 do + self:ClearIcon(button, i) end end +function Cooldowns:ClearIcon(button, index, spellId, icon) + if index then + icon = tremove(button.spellCooldownFrame.icons, index) + else + for i=#button.spellCooldownFrame.icons,1,-1 do + if icon then + if button.spellCooldownFrame.icons[i] == icon then + icon = tremove(button.spellCooldownFrame.icons, index) + end + end + if not icon and spellId then + if button.spellCooldownFrame.icons[i].spellId == spellId then + icon = tremove(button.spellCooldownFrame.icons, index) + end + end + end + end + icon:ClearAllPoints() + icon:SetParent(nil) + icon:Hide() + icon.spellId = nil + icon.active = false + icon.cooldown:Hide() + icon.cooldownFont:SetText("") + icon:SetScript("OnUpdate", nil) + tinsert(self.iconCache, icon) +end + +--------------------- +-- Test +--------------------- + function Cooldowns:Test(unit) local button = Gladdy.buttons[unit] if Gladdy.db.cooldown then button.spellCooldownFrame:Show() - button.lastCooldownSpell = 1 self:UpdateTestCooldowns(unit) else button.spellCooldownFrame:Hide() - button.lastCooldownSpell = 1 self:UpdateTestCooldowns(unit) end @@ -250,11 +290,9 @@ function Cooldowns:UpdateTestCooldowns(unit) local button = Gladdy.buttons[unit] if (button.testSpec and button.testSpec == Gladdy.testData[unit].testSpec) then - button.lastCooldownSpell = 1 self:UpdateCooldowns(button) button.spec = nil self:DetectSpec(unit, button.testSpec) - button.test = true -- use class spells for spellId,_ in pairs(Gladdy:GetCooldownList()[button.class]) do @@ -267,6 +305,10 @@ function Cooldowns:UpdateTestCooldowns(unit) end end +--------------------- +-- Events +--------------------- + function Cooldowns:ENEMY_SPOTTED(unit) self:UpdateCooldowns(Gladdy.buttons[unit]) end @@ -275,18 +317,25 @@ function Cooldowns:SPEC_DETECTED(unit, spec) self:DetectSpec(unit, spec) end +function Cooldowns:UNIT_DESTROYED(unit) + +end + +--------------------- +-- Cooldown Start/Ready +--------------------- + function Cooldowns:CooldownStart(button, spellId, duration, start) -- starts timer frame if not duration or duration == nil or type(duration) ~= "number" then return end - for i = 1, button.lastCooldownSpell + 1 do - if (button.spellCooldownFrame["icon" .. i].spellId == spellId) then - local frame = button.spellCooldownFrame["icon" .. i] - frame.active = true - frame.timeLeft = start and start - GetTime() + duration or duration - if (not Gladdy.db.cooldownDisableCircle) then frame.cooldown:SetCooldown(start or GetTime(), duration) end - frame:SetScript("OnUpdate", function(self, elapsed) + for _,icon in pairs(button.spellCooldownFrame.icons) do + if (icon.spellId == spellId) then + icon.active = true + icon.timeLeft = start and start - GetTime() + duration or duration + if (not Gladdy.db.cooldownDisableCircle) then icon.cooldown:SetCooldown(start or GetTime(), duration) end + icon:SetScript("OnUpdate", function(self, elapsed) self.timeLeft = self.timeLeft - elapsed local timeLeft = ceil(self.timeLeft) if timeLeft >= 540 then @@ -298,26 +347,25 @@ function Cooldowns:CooldownStart(button, spellId, duration, start) end Gladdy:FormatTimer(self.cooldownFont, self.timeLeft, self.timeLeft < 0) if (self.timeLeft <= 0) then - Cooldowns:CooldownReady(button, spellId, frame) + Cooldowns:CooldownReady(button, spellId, icon) end if (self.timeLeft <= 0) then - Cooldowns:CooldownReady(button, spellId, frame) + Cooldowns:CooldownReady(button, spellId, icon) end end) + --C_VoiceChat.SpeakText(2, GetSpellInfo(spellId), 3, 4, 100) end end end function Cooldowns:CooldownReady(button, spellId, frame) if (frame == false) then - for i = 1, button.lastCooldownSpell do - frame = button.spellCooldownFrame["icon" .. i] - - if (frame.spellId == spellId) then - frame.active = false - frame.cooldown:Hide() - frame.cooldownFont:SetText("") - frame:SetScript("OnUpdate", nil) + for _,icon in pairs(button.spellCooldownFrame.icons) do + if (icon.spellId == spellId) then + icon.active = false + icon.cooldown:Hide() + icon.cooldownFont:SetText("") + icon:SetScript("OnUpdate", nil) end end else @@ -328,175 +376,6 @@ function Cooldowns:CooldownReady(button, spellId, frame) end end -local function notIn(spec, list) - for _,v in ipairs(list) do - if spec == v then - return false - end - end - return true -end - -function Cooldowns:DetectSpec(unit, spec) - - local button = Gladdy.buttons[unit] - if (not button or not spec or button.spec) then - return - end - if button.class == "PALADIN" and notIn(spec, {L["Holy"], L["Retribution"], L["Protection"]}) - or button.class == "SHAMAN" and notIn(spec, {L["Restoration"], L["Enhancement"], L["Elemental"]}) - or button.class == "ROGUE" and notIn(spec, {L["Subtlety"], L["Assassination"], L["Combat"]}) - or button.class == "WARLOCK" and notIn(spec, {L["Demonology"], L["Destruction"], L["Affliction"]}) - or button.class == "PRIEST" and notIn(spec, {L["Shadow"], L["Discipline"], L["Holy"]}) - or button.class == "MAGE" and notIn(spec, {L["Frost"], L["Fire"], L["Arcane"]}) - or button.class == "DRUID" and notIn(spec, {L["Restoration"], L["Feral"], L["Balance"]}) - or button.class == "HUNTER" and notIn(spec, {L["Beast Mastery"], L["Marksmanship"], L["Survival"]}) - or button.class == "WARRIOR" and notIn(spec, {L["Arms"], L["Protection"], L["Fury"]}) then - return - end - - button.spec = spec - if not button.test then - Gladdy:SendMessage("UNIT_SPEC", unit, spec) - end - - - -- update cooldown tracker - --[[ - All of this could possibly be handled in a "once they're used, they show up"-manner - but I PERSONALLY prefer it this way. It also meant less work and makes spec-specific cooldowns easier - ]] - if (Gladdy.db.cooldown) then - local class = Gladdy.buttons[unit].class - for k, v in pairs(Gladdy:GetCooldownList()[class]) do - if Gladdy.db.cooldownCooldowns[tostring(k)] then - --if (self.db.cooldownList[k] ~= false and self.db.cooldownList[class] ~= false) then - if (type(v) == "table" and ((v.spec ~= nil and v.spec == spec) or (v.notSpec ~= nil and v.notSpec ~= spec))) then - local sharedCD = false - if (type(v) == "table" and v.sharedCD ~= nil and v.sharedCD.cd == nil) then - for spellId, _ in pairs(v.sharedCD) do - for i = 1, button.lastCooldownSpell do - local icon = button.spellCooldownFrame["icon" .. i] - if (icon.spellId == spellId) then - sharedCD = true - end - end - end - end - if sharedCD then - return - end - - local icon = button.spellCooldownFrame["icon" .. button.lastCooldownSpell] - icon:Show() - icon.texture:SetTexture(self.spellTextures[k]) - icon.spellId = k - button.spellCooldownFrame["icon" .. button.lastCooldownSpell] = icon - button.lastCooldownSpell = button.lastCooldownSpell + 1 - end - end - end - end - ---------------------- - --- RACE FUNCTIONALITY - ---------------------- - local race = Gladdy.buttons[unit].race - if Gladdy:GetCooldownList()[race] then - for k, v in pairs(Gladdy:GetCooldownList()[race]) do - if Gladdy.db.cooldownCooldowns[tostring(k)] then - --if (self.db.cooldownList[k] ~= false and self.db.cooldownList[class] ~= false) then - if (type(v) == "table" and ((v.spec ~= nil and v.spec == spec) or (v.notSpec ~= nil and v.notSpec ~= spec))) then - local sharedCD = false - if (type(v) == "table" and v.sharedCD ~= nil and v.sharedCD.cd == nil) then - for spellId, _ in pairs(v.sharedCD) do - for i = 1, button.lastCooldownSpell do - local icon = button.spellCooldownFrame["icon" .. i] - if (icon.spellId == spellId) then - sharedCD = true - end - end - end - end - if sharedCD then - return - end - - local icon = button.spellCooldownFrame["icon" .. button.lastCooldownSpell] - icon:Show() - icon.texture:SetTexture(self.spellTextures[k]) - icon.spellId = k - button.spellCooldownFrame["icon" .. button.lastCooldownSpell] = icon - button.lastCooldownSpell = button.lastCooldownSpell + 1 - end - end - end - end -end - -function Cooldowns:ResetUnit(unit) - Gladdy.buttons[unit].lastCooldownSpell = nil - Gladdy.buttons[unit].test = nil -end - -function Cooldowns:UNIT_DESTROYED(unit) - -end - -function Cooldowns:UpdateCooldowns(button) - local class = button.class - local race = button.race - if ( not button.lastCooldownSpell) then - button.lastCooldownSpell = 1 - end - - if (Gladdy.db.cooldown) then - for k, v in pairs(Gladdy:GetCooldownList()[class]) do - if Gladdy.db.cooldownCooldowns[tostring(k)] then - if (type(v) ~= "table" or (type(v) == "table" and v.spec == nil and v.notSpec == nil)) then - -- see if we have shared cooldowns without a cooldown defined - -- e.g. hunter traps have shared cooldowns, so only display one trap instead all of them - local sharedCD = false - if (type(v) == "table" and v.sharedCD ~= nil and v.sharedCD.cd == nil) then - for spellId, _ in pairs(v.sharedCD) do - for i = 1, button.lastCooldownSpell do - local icon = button.spellCooldownFrame["icon" .. i] - if (icon.spellId == spellId) then - sharedCD = true - end - end - end - end - - if (not sharedCD) then - local icon = button.spellCooldownFrame["icon" .. button.lastCooldownSpell] - icon:Show() - icon.spellId = k - icon.texture:SetTexture(self.spellTextures[k]) - button.spellCooldownFrame["icon" .. button.lastCooldownSpell] = icon - button.lastCooldownSpell = button.lastCooldownSpell + 1 - end - end - end - end - ---- - -- RACE FUNCTIONALITY - ---- - - for k, v in pairs(Gladdy:GetCooldownList()[race]) do - if Gladdy.db.cooldownCooldowns[tostring(k)] then - if (type(v) ~= "table" or (type(v) == "table" and v.spec == nil and v.notSpec == nil)) then - local icon = button.spellCooldownFrame["icon" .. button.lastCooldownSpell] - icon:Show() - icon.spellId = k - icon.texture:SetTexture(self.spellTextures[k]) - button.spellCooldownFrame["icon" .. button.lastCooldownSpell] = icon - button.lastCooldownSpell = button.lastCooldownSpell + 1 - end - end - end - end -end - function Cooldowns:CooldownUsed(unit, unitClass, spellId, expirationTimeInSeconds) local button = Gladdy.buttons[unit] if not button then @@ -535,8 +414,7 @@ function Cooldowns:CooldownUsed(unit, unitClass, spellId, expirationTimeInSecond for spellID,_ in pairs(cooldown.sharedCD) do if (spellID ~= "cd") then local skip = false - for i = 1, button.lastCooldownSpell do - local icon = button.spellCooldownFrame["icon" .. i] + for _,icon in pairs(button.spellCooldownFrame.icons) do if (icon.spellId == spellID and icon.active and icon.timeLeft > sharedCD) then skip = true break @@ -566,6 +444,119 @@ function Cooldowns:CooldownUsed(unit, unitClass, spellId, expirationTimeInSecond end ]] end +--------------------- +-- Detect Spec +--------------------- + +local function notIn(spec, list) + for _,v in ipairs(list) do + if spec == v then + return false + end + end + return true +end + +function Cooldowns:DetectSpec(unit, spec) + local button = Gladdy.buttons[unit] + if (not button or not spec or button.spec) then + return + end + if button.class == "PALADIN" and notIn(spec, {L["Holy"], L["Retribution"], L["Protection"]}) + or button.class == "SHAMAN" and notIn(spec, {L["Restoration"], L["Enhancement"], L["Elemental"]}) + or button.class == "ROGUE" and notIn(spec, {L["Subtlety"], L["Assassination"], L["Combat"]}) + or button.class == "WARLOCK" and notIn(spec, {L["Demonology"], L["Destruction"], L["Affliction"]}) + or button.class == "PRIEST" and notIn(spec, {L["Shadow"], L["Discipline"], L["Holy"]}) + or button.class == "MAGE" and notIn(spec, {L["Frost"], L["Fire"], L["Arcane"]}) + or button.class == "DRUID" and notIn(spec, {L["Restoration"], L["Feral"], L["Balance"]}) + or button.class == "HUNTER" and notIn(spec, {L["Beast Mastery"], L["Marksmanship"], L["Survival"]}) + or button.class == "WARRIOR" and notIn(spec, {L["Arms"], L["Protection"], L["Fury"]}) then + return + end + if not button.spec then + button.spec = spec + Gladdy:SendMessage("UNIT_SPEC", unit, spec) + Cooldowns:UpdateCooldowns(button) + end +end + +function Cooldowns:AddCooldown(spellID, value, button) + -- see if we have shared cooldowns without a cooldown defined + -- e.g. hunter traps have shared cooldowns, so only display one trap instead all of them + local sharedCD = false + if (type(value) == "table" and value.sharedCD ~= nil and value.sharedCD.cd == nil) then + for spellId, _ in pairs(value.sharedCD) do + for _,icon in pairs(button.spellCooldownFrame.icons) do + if (icon.spellId == spellId) then + sharedCD = true + end + end + end + end + for _,icon in pairs(button.spellCooldownFrame.icons) do + if (icon and icon.spellId == spellID) then + sharedCD = true + end + end + if (not sharedCD) then + local icon = self:CreateIcon() + icon:Show() + icon.spellId = spellID + icon.texture:SetTexture(self.spellTextures[spellID]) + tinsert(button.spellCooldownFrame.icons, icon) + self:IconsSetPoint(button) + Gladdy:Debug("Cooldowns:AddCooldown", button.unit, GetSpellInfo(spellID)) + end +end + +function Cooldowns:UpdateCooldowns(button) + local class = button.class + local race = button.race + local spec = button.spec + if not class or not race then + return + end + + if spec then + if class == "PALADIN" and notIn(spec, {L["Holy"], L["Retribution"], L["Protection"]}) + or class == "SHAMAN" and notIn(spec, {L["Restoration"], L["Enhancement"], L["Elemental"]}) + or class == "ROGUE" and notIn(spec, {L["Subtlety"], L["Assassination"], L["Combat"]}) + or class == "WARLOCK" and notIn(spec, {L["Demonology"], L["Destruction"], L["Affliction"]}) + or class == "PRIEST" and notIn(spec, {L["Shadow"], L["Discipline"], L["Holy"]}) + or class == "MAGE" and notIn(spec, {L["Frost"], L["Fire"], L["Arcane"]}) + or class == "DRUID" and notIn(spec, {L["Restoration"], L["Feral"], L["Balance"]}) + or class == "HUNTER" and notIn(spec, {L["Beast Mastery"], L["Marksmanship"], L["Survival"]}) + or class == "WARRIOR" and notIn(spec, {L["Arms"], L["Protection"], L["Fury"]}) then + return + end + end + + for k, v in pairs(Gladdy:GetCooldownList()[class]) do + if Gladdy.db.cooldownCooldowns[tostring(k)] then + if (type(v) ~= "table" or (type(v) == "table" and v.spec == nil)) then + Cooldowns:AddCooldown(k, v, button) + end + if (type(v) == "table" and v.spec ~= nil and v.spec == spec) then + Cooldowns:AddCooldown(k, v, button) + end + end + end + for k, v in pairs(Gladdy:GetCooldownList()[button.race]) do + if Gladdy.db.cooldownCooldowns[tostring(k)] then + if (type(v) ~= "table" or (type(v) == "table" and v.spec == nil)) then + Cooldowns:AddCooldown(k, v, button) + end + if (type(v) == "table" and v.spec ~= nil and v.spec == spec) then + Cooldowns:AddCooldown(k, v, button) + end + end + end +end + +--------------------- +-- Options +--------------------- + function Cooldowns:GetOptions() return { headerCooldown = { @@ -900,28 +891,6 @@ function Cooldowns:GetCooldownOptions() return group end -function Gladdy:UpdateTestCooldowns(i) - local unit = "arena" .. i - local button = Gladdy.buttons[unit] - - if (button.testSpec and button.testSpec == Gladdy.testData[unit].testSpec) then - button.lastCooldownSpell = 1 - Cooldowns:UpdateCooldowns(button) - button.spec = nil - Cooldowns:DetectSpec(unit, button.testSpec) - - -- use class spells - for spellID,_ in pairs(Gladdy:GetCooldownList()[button.class]) do - --k is spellId - Cooldowns:CooldownUsed(unit, button.class, spellID) - end - -- use race spells - for spellID,_ in pairs(Gladdy:GetCooldownList()[button.race]) do - Cooldowns:CooldownUsed(unit, button.race, spellID) - end - end -end - --------------------------- -- LAGACY HANDLER From 23729f5960e7b3c45c5278d0ec037895d534300e Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Thu, 27 Jan 2022 01:30:28 +0100 Subject: [PATCH 15/51] move DetectSpec to EventListener --- EventListener.lua | 64 +++++++++++++++++++++++++-------- Modules/Cooldowns.lua | 84 ++++++++++--------------------------------- 2 files changed, 67 insertions(+), 81 deletions(-) diff --git a/EventListener.lua b/EventListener.lua index 4d97d35..c7f2172 100644 --- a/EventListener.lua +++ b/EventListener.lua @@ -1,4 +1,4 @@ -local select, string_gsub, tostring, pairs = select, string.gsub, tostring, pairs +local select, string_gsub, tostring, pairs, ipairs = select, string.gsub, tostring, pairs, ipairs local CombatLogGetCurrentEventInfo = CombatLogGetCurrentEventInfo local AURA_TYPE_DEBUFF = AURA_TYPE_DEBUFF @@ -11,10 +11,11 @@ local FindAuraByName = AuraUtil.FindAuraByName local GetTime = GetTime local Gladdy = LibStub("Gladdy") +local L = Gladdy.L local Cooldowns = Gladdy.modules["Cooldowns"] local Diminishings = Gladdy.modules["Diminishings"] -local EventListener = Gladdy:NewModule("EventListener", nil, { +local EventListener = Gladdy:NewModule("EventListener", 100, { test = true, }) @@ -51,12 +52,6 @@ function EventListener:Reset() self:SetScript("OnEvent", nil) end -function Gladdy:DetectSpec(unit, spec) - if spec then - self.modules["Cooldowns"]:DetectSpec(unit, spec) - end -end - function Gladdy:SpotEnemy(unit, auraScan) local button = self.buttons[unit] if not unit or not button then @@ -92,7 +87,7 @@ function Gladdy:SpotEnemy(unit, auraScan) if Gladdy.specBuffs[spellName] then -- Check for auras that detect a spec local unitPet = string_gsub(unit, "%d$", "pet%1") if UnitIsUnit(unit, unitCaster) or UnitIsUnit(unitPet, unitCaster) then - Gladdy:DetectSpec(unit, Gladdy.specBuffs[spellName]) + EventListener:DetectSpec(unit, Gladdy.specBuffs[spellName]) end end end @@ -144,7 +139,7 @@ function EventListener:COMBAT_LOG_EVENT_UNFILTERED() unitClass = Gladdy.buttons[srcUnit].race end Cooldowns:CooldownUsed(srcUnit, unitClass, spellId) - Gladdy:DetectSpec(srcUnit, Gladdy.specSpells[spellName]) + self:DetectSpec(srcUnit, Gladdy.specSpells[spellName]) end end @@ -157,7 +152,7 @@ function EventListener:COMBAT_LOG_EVENT_UNFILTERED() Gladdy:SpotEnemy(srcUnit, true) end if not Gladdy.buttons[srcUnit].spec then - Gladdy:DetectSpec(srcUnit, Gladdy.specSpells[spellName]) + self:DetectSpec(srcUnit, Gladdy.specSpells[spellName]) end end end @@ -255,7 +250,7 @@ function EventListener:UNIT_AURA(unit) if not button.spec and Gladdy.specBuffs[spellName] then local unitPet = string_gsub(unit, "%d$", "pet%1") if unitCaster and (UnitIsUnit(unit, unitCaster) or UnitIsUnit(unitPet, unitCaster)) then - Gladdy:DetectSpec(unit, Gladdy.specBuffs[spellName]) + self:DetectSpec(unit, Gladdy.specBuffs[spellName]) end end if Gladdy.exceptionNames[spellID] then @@ -271,7 +266,7 @@ function EventListener:UNIT_SPELLCAST_START(unit) if Gladdy.buttons[unit] then local spellName = UnitCastingInfo(unit) if Gladdy.specSpells[spellName] and not Gladdy.buttons[unit].spec then - Gladdy:DetectSpec(unit, Gladdy.specSpells[spellName]) + self:DetectSpec(unit, Gladdy.specSpells[spellName]) end end end @@ -280,7 +275,7 @@ function EventListener:UNIT_SPELLCAST_CHANNEL_START(unit) if Gladdy.buttons[unit] then local spellName = UnitChannelInfo(unit) if Gladdy.specSpells[spellName] and not Gladdy.buttons[unit].spec then - Gladdy:DetectSpec(unit, Gladdy.specSpells[spellName]) + self:DetectSpec(unit, Gladdy.specSpells[spellName]) end end end @@ -289,7 +284,46 @@ function EventListener:UNIT_SPELLCAST_SUCCEEDED(unit) if Gladdy.buttons[unit] then local spellName = UnitCastingInfo(unit) if Gladdy.specSpells[spellName] and not Gladdy.buttons[unit].spec then - Gladdy:DetectSpec(unit, Gladdy.specSpells[spellName]) + self:DetectSpec(unit, Gladdy.specSpells[spellName]) end end end + +local function notIn(spec, list) + for _,v in ipairs(list) do + if spec == v then + return false + end + end + return true +end + +function EventListener:DetectSpec(unit, spec) + local button = Gladdy.buttons[unit] + if (not button or not spec or button.spec) then + return + end + if button.class == "PALADIN" and notIn(spec, {L["Holy"], L["Retribution"], L["Protection"]}) + or button.class == "SHAMAN" and notIn(spec, {L["Restoration"], L["Enhancement"], L["Elemental"]}) + or button.class == "ROGUE" and notIn(spec, {L["Subtlety"], L["Assassination"], L["Combat"]}) + or button.class == "WARLOCK" and notIn(spec, {L["Demonology"], L["Destruction"], L["Affliction"]}) + or button.class == "PRIEST" and notIn(spec, {L["Shadow"], L["Discipline"], L["Holy"]}) + or button.class == "MAGE" and notIn(spec, {L["Frost"], L["Fire"], L["Arcane"]}) + or button.class == "DRUID" and notIn(spec, {L["Restoration"], L["Feral"], L["Balance"]}) + or button.class == "HUNTER" and notIn(spec, {L["Beast Mastery"], L["Marksmanship"], L["Survival"]}) + or button.class == "WARRIOR" and notIn(spec, {L["Arms"], L["Protection"], L["Fury"]}) then + return + end + if not button.spec then + button.spec = spec + Gladdy:SendMessage("UNIT_SPEC", unit, spec) + end +end + +function EventListener:Test(unit) + local button = Gladdy.buttons[unit] + if (Gladdy.testData[unit].testSpec) then + button.spec = nil + self:DetectSpec(unit, button.testSpec) + end +end diff --git a/Modules/Cooldowns.lua b/Modules/Cooldowns.lua index 61ec21a..64ccdfb 100644 --- a/Modules/Cooldowns.lua +++ b/Modules/Cooldowns.lua @@ -278,30 +278,22 @@ function Cooldowns:Test(unit) local button = Gladdy.buttons[unit] if Gladdy.db.cooldown then button.spellCooldownFrame:Show() - self:UpdateTestCooldowns(unit) else button.spellCooldownFrame:Hide() - self:UpdateTestCooldowns(unit) end - + self:UpdateTestCooldowns(unit) end function Cooldowns:UpdateTestCooldowns(unit) local button = Gladdy.buttons[unit] - - if (button.testSpec and button.testSpec == Gladdy.testData[unit].testSpec) then - self:UpdateCooldowns(button) - button.spec = nil - self:DetectSpec(unit, button.testSpec) - - -- use class spells - for spellId,_ in pairs(Gladdy:GetCooldownList()[button.class]) do - self:CooldownUsed(unit, button.class, spellId) - end - -- use race spells - for spellId,_ in pairs(Gladdy:GetCooldownList()[button.race]) do - self:CooldownUsed(unit, button.race, spellId) - end + self:UpdateCooldowns(button) + -- use class spells + for spellId,_ in pairs(Gladdy:GetCooldownList()[button.class]) do + self:CooldownUsed(unit, button.class, spellId) + end + -- use race spells + for spellId,_ in pairs(Gladdy:GetCooldownList()[button.race]) do + self:CooldownUsed(unit, button.race, spellId) end end @@ -310,11 +302,17 @@ end --------------------- function Cooldowns:ENEMY_SPOTTED(unit) + if (not Gladdy.buttons[unit]) then + return + end self:UpdateCooldowns(Gladdy.buttons[unit]) end -function Cooldowns:SPEC_DETECTED(unit, spec) - self:DetectSpec(unit, spec) +function Cooldowns:SPEC_DETECTED(unit) + if (not Gladdy.buttons[unit]) then + return + end + self:UpdateCooldowns(Gladdy.buttons[unit]) end function Cooldowns:UNIT_DESTROYED(unit) @@ -445,41 +443,9 @@ function Cooldowns:CooldownUsed(unit, unitClass, spellId, expirationTimeInSecond end --------------------- --- Detect Spec +-- Update Cooldowns --------------------- -local function notIn(spec, list) - for _,v in ipairs(list) do - if spec == v then - return false - end - end - return true -end - -function Cooldowns:DetectSpec(unit, spec) - local button = Gladdy.buttons[unit] - if (not button or not spec or button.spec) then - return - end - if button.class == "PALADIN" and notIn(spec, {L["Holy"], L["Retribution"], L["Protection"]}) - or button.class == "SHAMAN" and notIn(spec, {L["Restoration"], L["Enhancement"], L["Elemental"]}) - or button.class == "ROGUE" and notIn(spec, {L["Subtlety"], L["Assassination"], L["Combat"]}) - or button.class == "WARLOCK" and notIn(spec, {L["Demonology"], L["Destruction"], L["Affliction"]}) - or button.class == "PRIEST" and notIn(spec, {L["Shadow"], L["Discipline"], L["Holy"]}) - or button.class == "MAGE" and notIn(spec, {L["Frost"], L["Fire"], L["Arcane"]}) - or button.class == "DRUID" and notIn(spec, {L["Restoration"], L["Feral"], L["Balance"]}) - or button.class == "HUNTER" and notIn(spec, {L["Beast Mastery"], L["Marksmanship"], L["Survival"]}) - or button.class == "WARRIOR" and notIn(spec, {L["Arms"], L["Protection"], L["Fury"]}) then - return - end - if not button.spec then - button.spec = spec - Gladdy:SendMessage("UNIT_SPEC", unit, spec) - Cooldowns:UpdateCooldowns(button) - end -end - function Cooldowns:AddCooldown(spellID, value, button) -- see if we have shared cooldowns without a cooldown defined -- e.g. hunter traps have shared cooldowns, so only display one trap instead all of them @@ -517,20 +483,6 @@ function Cooldowns:UpdateCooldowns(button) return end - if spec then - if class == "PALADIN" and notIn(spec, {L["Holy"], L["Retribution"], L["Protection"]}) - or class == "SHAMAN" and notIn(spec, {L["Restoration"], L["Enhancement"], L["Elemental"]}) - or class == "ROGUE" and notIn(spec, {L["Subtlety"], L["Assassination"], L["Combat"]}) - or class == "WARLOCK" and notIn(spec, {L["Demonology"], L["Destruction"], L["Affliction"]}) - or class == "PRIEST" and notIn(spec, {L["Shadow"], L["Discipline"], L["Holy"]}) - or class == "MAGE" and notIn(spec, {L["Frost"], L["Fire"], L["Arcane"]}) - or class == "DRUID" and notIn(spec, {L["Restoration"], L["Feral"], L["Balance"]}) - or class == "HUNTER" and notIn(spec, {L["Beast Mastery"], L["Marksmanship"], L["Survival"]}) - or class == "WARRIOR" and notIn(spec, {L["Arms"], L["Protection"], L["Fury"]}) then - return - end - end - for k, v in pairs(Gladdy:GetCooldownList()[class]) do if Gladdy.db.cooldownCooldowns[tostring(k)] then if (type(v) ~= "table" or (type(v) == "table" and v.spec == nil)) then From ce3812d2341e6d74ed13ae94c738bf98385ee6a9 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Thu, 27 Jan 2022 01:51:02 +0100 Subject: [PATCH 16/51] improve warrior icon --- Images/Classes/INV_Sword_27.blp | Bin 6660 -> 6660 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/Images/Classes/INV_Sword_27.blp b/Images/Classes/INV_Sword_27.blp index eea39b6e845a50ec28eeb5b8da7591bcee74aac2..c9249b6fa650a63e3c04ab7e646c669d247b2b95 100644 GIT binary patch delta 1943 zcmah}TTE0}6y5UxE(`<1d!|sG8yw5<2sV|3X&VZ}+Jb3fTC-EpAvI+idK5X?gjpr&<$!e3pdm~-hF7UI!+(LPmL>|-JYu$=v446}YRrb#cl zq>3%M_m}KILun)g`2dx2maEV563c9jmz^54a-N%9jps&2f>F9UIoaIf&sL6m5+2M} zD3Uwh%lVb9+%YX1h&dimgifksH^V8f%)He6NK3ip_hm-oh^~&>nuxo|@&ihqZMcm0 z?ljS(X?297@pJ^6%{$dPe_+aCy^eXoB&a9#Pq&rpA=g6i6abqvaC?IBc^~Mz#qiD$ zSTb{1RLJ@L!v2{3@J_jHClMTERFB`Hy z$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HnHYCoh+G zX72S^;BCp4Tu5(6+HGMxG?`0zlTJ7sSC)wSVZQ#h`qOszm-4ADYxiU%S*PZ39NwuM zAFYJct?|)BEdVr*)Y!)Eh6TYg{w?DUe%@9HyL<{^jBl_t^;#Wg1i;AR%3cw`oKdvY zO?d~KaC4q^!{W zdt>WJcdIHo-)KbcI^)R1#k}s7Y0Vmtg8}W*RF0G+fRj>Qnhnetu*q*(T*ko$&b3L; zm0_?3TC<*mANzmAeKlFuL8UXF zbcceLxSyM{!Jin=F2gB6NC{q+>fN6qGs?W9>zxFdSy1lPDVCJi3-x$y?On|AnFCw= z9S+AZ?AkOS(!&#>Dl5L!_|4R-!Em9)z4r@vpn)}S*~6V)^Obh zE_-}^ye)k_=TbDdE060H3D$l{W)lKWAO@)5|9M`Ko`0_xTUd?5jH!}J*$CgRc8E@<$1-99gjF!p#1V_O<=Ff({7-%>V!Z From d8391b0f66badbe323a0a2d340c29ff80ccc0d72 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Thu, 27 Jan 2022 14:00:59 +0100 Subject: [PATCH 17/51] Anouncements + Gladdy RegisterMessages --- EventListener.lua | 4 ++-- Gladdy.lua | 12 ++++++++++ Modules/Announcements.lua | 50 +++++++++++++++++++++++---------------- Modules/Auras.lua | 2 +- 4 files changed, 45 insertions(+), 23 deletions(-) diff --git a/EventListener.lua b/EventListener.lua index c7f2172..0086627 100644 --- a/EventListener.lua +++ b/EventListener.lua @@ -15,7 +15,7 @@ local L = Gladdy.L local Cooldowns = Gladdy.modules["Cooldowns"] local Diminishings = Gladdy.modules["Diminishings"] -local EventListener = Gladdy:NewModule("EventListener", 100, { +local EventListener = Gladdy:NewModule("EventListener", 10, { test = true, }) @@ -214,6 +214,7 @@ Gladdy.exceptionNames = { -- TODO MOVE ME TO CLASSBUFFS LIB Gladdy.cooldownBuffs = { [GetSpellInfo(6346)] = { cd = 180, spellId = 6346 }, -- Fear Ward + -- TODO sprint, shadowstep racials = { [GetSpellInfo(20600)] = { cd = 180, spellId = 20600 }, -- Perception } @@ -257,7 +258,6 @@ function EventListener:UNIT_AURA(unit) spellName = Gladdy.exceptionNames[spellID] end Gladdy:SendMessage("AURA_GAIN", unit, auraType, spellID, spellName, texture, duration, expirationTime, count, debuffType, i) - Gladdy:Call("Announcements", "CheckDrink", unit, spellName) end end end diff --git a/Gladdy.lua b/Gladdy.lua index 32fb1e3..63c5d17 100644 --- a/Gladdy.lua +++ b/Gladdy.lua @@ -187,6 +187,12 @@ function Gladdy:NewModule(name, priority, defaults) module.defaults = defaults or {} module.messages = {} + module.RegisterMessages = function(self, ...) + for _,message in pairs({...}) do + self.messages[message] = message + end + end + module.RegisterMessage = function(self, message, func) self.messages[message] = func or message end @@ -195,6 +201,12 @@ function Gladdy:NewModule(name, priority, defaults) self.messages[message] = nil end + module.UnregisterMessages = function(self, ...) + for _,message in pairs({...}) do + self.messages[message] = nil + end + end + module.UnregisterAllMessages = function(self) for msg,_ in pairs(self.messages) do self.messages[msg] = nil diff --git a/Modules/Announcements.lua b/Modules/Announcements.lua index 27de5f1..5cb0066 100644 --- a/Modules/Announcements.lua +++ b/Modules/Announcements.lua @@ -16,7 +16,7 @@ local UnitName = UnitName local Gladdy = LibStub("Gladdy") local L = Gladdy.L -local Announcements = Gladdy:NewModule("Announcements", nil, { +local Announcements = Gladdy:NewModule("Announcements", 101, { announcements = { drinks = true, resurrections = true, @@ -42,18 +42,20 @@ function Announcements:Initialize() [GetSpellInfo(20777)] = true, } - self:RegisterMessage("CAST_START") - self:RegisterMessage("ENEMY_SPOTTED") - self:RegisterMessage("UNIT_SPEC") - self:RegisterMessage("UNIT_HEALTH") - self:RegisterMessage("TRINKET_USED") - self:RegisterMessage("TRINKET_READY") - self:RegisterMessage("SHADOWSIGHT") - self:RegisterMessage("SPELL_INTERRUPT") + self:RegisterMessage("JOINED_ARENA") end function Announcements:Reset() - self:UnregisterAllMessages() + self:UnregisterMessages( + "CAST_START", + "ENEMY_SPOTTED", + "UNIT_SPEC", + "AURA_GAIN", + "UNIT_HEALTH", + "TRINKET_USED", + "TRINKET_READY", + "SHADOWSIGHT", + "SPELL_INTERRUPT") self.enemy = {} self.throttled = {} end @@ -63,17 +65,25 @@ function Announcements:Test(unit) if (not button) then return end - - if (unit == "arena1") then - self:UNIT_SPEC(unit, button.testSpec) - elseif (unit == "arena2") then - self:CheckDrink(unit, self.DRINK_AURA) - elseif (unit == "arena3") then - self:UNIT_HEALTH(unit, button.health, button.healthMax) - self:ENEMY_SPOTTED(unit) + self:JOINED_ARENA() + if unit == "arena1" then + self:AURA_GAIN(unit, nil, nil, self.DRINK_AURA) end end +function Announcements:JOINED_ARENA() + self:RegisterMessages( + "CAST_START", + "ENEMY_SPOTTED", + "UNIT_SPEC", + "AURA_GAIN", + "UNIT_HEALTH", + "TRINKET_USED", + "TRINKET_READY", + "SHADOWSIGHT", + "SPELL_INTERRUPT") +end + function Announcements:CAST_START(unit, spell) local button = Gladdy.buttons[unit] if (not button or not Gladdy.db.announcements.resurrections) then @@ -149,13 +159,13 @@ function Announcements:SPELL_INTERRUPT(destUnit,spellID,spellName,spellSchool,ex self:Send(L["INTERRUPTED: %s (%s)"]:format(extraSpellName, button.name or ""), nil, RAID_CLASS_COLORS[button.class]) end -function Announcements:CheckDrink(unit, aura) +function Announcements:AURA_GAIN(unit, auraType, spellID, spellName) local button = Gladdy.buttons[unit] if (not button or not Gladdy.db.announcements.drinks) then return end - if (aura == self.DRINK_AURA) then + if (spellName == self.DRINK_AURA) then self:Send(L["DRINKING: %s (%s)"]:format(button.name, button.classLoc), 3, RAID_CLASS_COLORS[button.class]) end end diff --git a/Modules/Auras.lua b/Modules/Auras.lua index 7d903e4..5d33667 100644 --- a/Modules/Auras.lua +++ b/Modules/Auras.lua @@ -472,7 +472,7 @@ function Auras:Test(unit) local extraSpellSchool = spellSchools[rand(1, #spellSchools)] spellid = tonumber(enabledInterrupts[rand(1, #enabledInterrupts)]) spellName = select(1, GetSpellInfo(spellid)) - self:SPELL_INTERRUPT(unit,spellid, spellName, "physical", spellid, spellName, extraSpellSchool) + Gladdy:SendMessage("SPELL_INTERRUPT", unit,spellid, spellName, "physical", spellid, spellName, extraSpellSchool) end end end From 41b299e0b1c118846f6ec633a89cd6768335cbcf Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Sat, 5 Feb 2022 04:16:44 +0100 Subject: [PATCH 18/51] initial TotemPulse --- Modules/TotemPulse.lua | 476 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 476 insertions(+) create mode 100644 Modules/TotemPulse.lua diff --git a/Modules/TotemPulse.lua b/Modules/TotemPulse.lua new file mode 100644 index 0000000..a2a49a9 --- /dev/null +++ b/Modules/TotemPulse.lua @@ -0,0 +1,476 @@ +local C_NamePlate = C_NamePlate +local Gladdy = LibStub("Gladdy") +local L = Gladdy.L +local tremove, tinsert = tremove, tinsert +local GetSpellInfo, CreateFrame = GetSpellInfo, CreateFrame +local GetTime, GetPlayerInfoByGUID, UnitIsEnemy, UnitGUID = GetTime, GetPlayerInfoByGUID, UnitIsEnemy, UnitGUID +local CombatLogGetCurrentEventInfo = CombatLogGetCurrentEventInfo + +local cooldowns = { + [2484] = 3, --Earthbind + [8143] = 4, -- Tremor + [8166] = 4, -- Poison Cleansing + [8170] = 4, -- Disease Cleansing + [1535] = { cd = 4, once = true }, -- Fire Nova 1 + [8498] = { cd = 4, once = true }, -- Fire Nova 2 + [8499] = { cd = 4, once = true }, -- Fire Nova 3 + [11314] = { cd = 4, once = true }, -- Fire Nova 4 + [11315] = { cd = 4, once = true }, -- Fire Nova 5 + [25546] = { cd = 4, once = true }, -- Fire Nova 6 + [25547] = { cd = 4, once = true }, -- Fire Nova 7 + [8190] = 2, -- Magma 1 + [10585] = 2, -- Magma 2 + [10586] = 2, -- Magma 3 + [10587] = 2, -- Magma 4 + [25552] = 2, -- Magma 5 + [5394] = 2, -- Healing Stream 1 + [6375] = 2, -- Healing Stream 2 + [6377] = 2, -- Healing Stream 3 + [10462] = 2, -- Healing Stream 4 + [10463] = 2, -- Healing Stream 5 + [25567] = 2, -- Healing Stream 6 + [5675] = 2, -- Mana Spring 1 + [10495] = 2, -- Mana Spring 2 + [10496] = 2, -- Mana Spring 3 + [10497] = 2, -- Mana Spring 4 + [25570] = 2, -- Mana Spring 5 +} + +local ninetyDegreeInRad = 90 * math.pi / 180 + +--------------------------------------------------- + +-- Core + +--------------------------------------------------- + + +local TotemPulse = Gladdy:NewModule("Totem Pulse", nil, { + totemPulseEnabled = true, + totemPulseEnabledShowFriendly = true, + totemPulseEnabledShowEnemy = true, + totemPulseAttachToTotemPlate = true, + totemPulseStyle = "", -- "COOLDOWN", "COOLDOWNREVERSE", "BARVERTICAL", "BARHORIZONTAL" + totemPulseTextColor = { r = 1, g = 1, b = 1, a = 0 }, + --bar + totemPulseBarWidth = 40, + totemPulseBarHeight = 20, + totemPulseBarColor = { r = 1, g = 0, b = 0, a = 1 }, + totemPulseBarBgColor = { r = 0, g = 1, b = 0, a = 1 }, + totemPulseBarBorderColor = { r = 0, g = 0, b = 0, a = 1 }, + totemPulseBarBorderSize = 5, + totemPulseBarBorderStyle = "Gladdy Tooltip squared", + totemPulseBarTexture = "Smooth", + --cooldown + totemPulseCooldownAlpha = 1, +}) + +function TotemPulse.OnEvent(self, event, ...) + TotemPulse[event](self, ...) +end + +function TotemPulse:Initialize() + self.cooldowns = cooldowns + self.timeStamps = {} + self.cooldownCache = {} + self.barCache = {} + self.activeFrames = { bars = {}, cooldowns = {} } + self:SetScript("OnEvent", self.OnEvent) + self:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED") + self:RegisterEvent("NAME_PLATE_UNIT_REMOVED") + self:RegisterEvent("NAME_PLATE_UNIT_ADDED") + self:RegisterEvent("UNIT_NAME_UPDATE") +end + +--------------------------------------------------- + +-- EVENTS + +--------------------------------------------------- + +function TotemPulse:COMBAT_LOG_EVENT_UNFILTERED() + local _,eventType,_,sourceGUID,_,_,_,destGUID,_,_,_,spellID,spellName,spellSchool,extraSpellId,extraSpellName,extraSpellSchool = CombatLogGetCurrentEventInfo() + print(eventType, spellName, spellID, destGUID) + if eventType == "SPELL_SUMMON" then + if cooldowns[spellID] then + print(eventType, spellName, spellID, GetPlayerInfoByGUID(sourceGUID)) + self.timeStamps[destGUID] = { timeStamp = GetTime(), spellID = spellID } + end + elseif eventType == "UNIT_DESTROYED" then + self.timeStamps[destGUID] = nil + end +end + +function TotemPulse:NAME_PLATE_UNIT_REMOVED(unitId) + local nameplate = C_NamePlate.GetNamePlateForUnit(unitId) + if nameplate.totemTick then + print("NAME_PLATE_UNIT_REMOVED", nameplate.totemTick) + nameplate.totemTick:SetScript("OnUpdate", nil) + nameplate.totemTick:Hide() + nameplate.totemTick:SetParent(nil) + tinsert(nameplate.totemTick.bar and self.barCache or self.cooldownCache, nameplate.totemTick) + self.activeFrames.bars[nameplate.totemTick] = nil + self.activeFrames.cooldowns[nameplate.totemTick] = nil + nameplate.totemTick = nil + end +end + +function TotemPulse:NAME_PLATE_UNIT_ADDED(unitId) + self:OnUnitAdded(unitId, "NAME_PLATE_UNIT_ADDED") +end + +function TotemPulse:UNIT_NAME_UPDATE(unitId) + self:OnUnitAdded(unitId, "UNIT_NAME_UPDATE") +end + +function TotemPulse:OnUnitAdded(unitId, event) + local isEnemy = UnitIsEnemy("player", unitId) + local guid = UnitGUID(unitId) + + local nameplate = C_NamePlate.GetNamePlateForUnit(unitId) + + if nameplate then + print(event, self.timeStamps[guid], nameplate.totemTick) + if self.timeStamps[guid] then + self:AddTimerFrame(nameplate, self.timeStamps[guid], Gladdy.db.totemPulseAttachToTotemPlate and nameplate.gladdyTotemFrame) + else + if nameplate.totemTick then + nameplate.totemTick:SetScript("OnUpdate", nil) + nameplate.totemTick:Hide() + nameplate.totemTick:SetParent(nil) + tinsert(nameplate.totemTick.bar and self.barCache or self.cooldownCache, nameplate.totemTick) + self.activeFrames.bars[nameplate.totemTick] = nil + self.activeFrames.cooldowns[nameplate.totemTick] = nil + nameplate.totemTick = nil + end + end + end +end + +--------------------------------------------------- + +-- FRAMES + +--------------------------------------------------- + +function TotemPulse:CreateCooldownFrame(gladdyTotemFrame) + local totemTick + + if gladdyTotemFrame then + if #self.cooldownCache > 0 then + totemTick = tremove(self.cooldownCache, #self.cooldownCache) + else + Gladdy:Print("TotemPulse:CreateCooldownFrame()", "CreateCooldown") + totemTick = CreateFrame("Cooldown", nil, nil, "CooldownFrameTemplate") + totemTick.noCooldownCount = true + totemTick:SetFrameStrata("MEDIUM") + totemTick:SetFrameLevel(4) + totemTick:SetReverse(true) + totemTick:SetHideCountdownNumbers(true) + totemTick:SetAlpha(Gladdy.db.totemPulseCooldownAlpha) + + totemTick.text = totemTick:CreateFontString(nil, "OVERLAY") + totemTick.text:SetPoint("LEFT", totemTick, "LEFT", 4, 0) + totemTick.text:SetFont("Fonts\\FRIZQT__.TTF", 16, "OUTLINE") + totemTick.text:SetJustifyH("LEFT") + totemTick.text:SetShadowOffset(1, -1) + totemTick.text:SetTextColor(Gladdy:SetColor(Gladdy.db.totemPulseTextColor)) + end + else + if #self.barCache > 0 then + Gladdy:Print("TotemPulse:CreateCooldownFrame()", #self.barCache) + totemTick = tremove(self.barCache, #self.barCache) + else + Gladdy:Print("TotemPulse:CreateCooldownFrame()", "CreateBar") + totemTick = CreateFrame("Frame", nil) + + totemTick:SetWidth(Gladdy.db.totemPulseBarWidth) + totemTick:SetHeight(Gladdy.db.totemPulseBarHeight) + + totemTick.backdrop = CreateFrame("Frame", nil, totemTick, BackdropTemplateMixin and "BackdropTemplate") + totemTick.backdrop:SetAllPoints(totemTick) + totemTick.backdrop:SetBackdrop({ edgeFile = Gladdy:SMFetch("border", "totemPulseBarBorderStyle"), + edgeSize = Gladdy.db.totemPulseBarBorderSize }) + totemTick.backdrop:SetBackdropBorderColor(Gladdy:SetColor(Gladdy.db.totemPulseBarBorderColor)) + totemTick.backdrop:SetFrameLevel(1) + --totemTick.backdrop:SetFrameStrata(Gladdy.db.castBarFrameStrata) + --totemTick.backdrop:SetFrameLevel(Gladdy.db.castBarFrameLevel - 1) + + totemTick.bar = CreateFrame("StatusBar", nil, totemTick) + totemTick.bar:SetStatusBarTexture(Gladdy:SMFetch("statusbar", "totemPulseBarTexture")) + totemTick.bar:SetStatusBarColor(Gladdy:SetColor(Gladdy.db.totemPulseBarColor)) + totemTick.bar:SetOrientation("Vertical") + totemTick.bar:SetFrameLevel(0) + totemTick.bar:SetPoint("TOPLEFT", totemTick, "TOPLEFT", (Gladdy.db.totemPulseBarBorderSize/Gladdy.db.statusbarBorderOffset), -(Gladdy.db.totemPulseBarBorderSize/Gladdy.db.statusbarBorderOffset)) + totemTick.bar:SetPoint("BOTTOMRIGHT", totemTick, "BOTTOMRIGHT", -(Gladdy.db.totemPulseBarBorderSize/Gladdy.db.statusbarBorderOffset), (Gladdy.db.totemPulseBarBorderSize/Gladdy.db.statusbarBorderOffset)) + + totemTick.spark = totemTick.bar:CreateTexture(nil, "OVERLAY") + totemTick.spark:SetTexture("Interface\\CastingBar\\UI-CastingBar-Spark") + totemTick.spark:SetBlendMode("ADD") + totemTick.spark:SetWidth(8) + totemTick.spark:SetHeight(40) + totemTick.spark.position = 0 + totemTick.spark:SetRotation(ninetyDegreeInRad) + + totemTick.bg = totemTick.bar:CreateTexture(nil, "BACKGROUND") + totemTick.bg:SetTexture(Gladdy:SMFetch("statusbar", "totemPulseBarTexture")) + totemTick.bg:SetAllPoints(totemTick.bar) + totemTick.bg:SetVertexColor(Gladdy:SetColor(Gladdy.db.totemPulseBarBgColor)) + + totemTick.text = totemTick.bar:CreateFontString(nil, "OVERLAY") + totemTick.text:SetPoint("LEFT", totemTick, "LEFT", 4, 0) + totemTick.text:SetFont("Fonts\\FRIZQT__.TTF", 16, "OUTLINE") + totemTick.text:SetJustifyH("LEFT") + totemTick.text:SetShadowOffset(1, -1) + totemTick.text:SetTextColor(Gladdy:SetColor(Gladdy.db.totemPulseTextColor)) + end + end + return totemTick +end + +function TotemPulse:AddTimerFrame(nameplate, timestamp, gladdyTotemFrame) + if nameplate:IsShown() and cooldowns[timestamp.spellID] then + if not nameplate.totemTick then + nameplate.totemTick = TotemPulse:CreateCooldownFrame(gladdyTotemFrame) + end + nameplate.totemTick:SetParent(nameplate) + nameplate.totemTick:ClearAllPoints() + if gladdyTotemFrame then + nameplate.totemTick:SetPoint("TOPLEFT", gladdyTotemFrame, "TOPLEFT", Gladdy.db.npTotemPlatesSize/16, -Gladdy.db.npTotemPlatesSize/16) + nameplate.totemTick:SetPoint("BOTTOMRIGHT", gladdyTotemFrame, "BOTTOMRIGHT", -Gladdy.db.npTotemPlatesSize/16, Gladdy.db.npTotemPlatesSize/16) + else + nameplate.totemTick:SetPoint("TOP", nameplate, "BOTTOM") + end + + local cd = type(cooldowns[timestamp.spellID]) == "table" and cooldowns[timestamp.spellID].cd or cooldowns[timestamp.spellID] + local once = type(cooldowns[timestamp.spellID]) == "table" + local cooldown = (timestamp.timeStamp - GetTime()) % cd + + if not gladdyTotemFrame then + nameplate.totemTick.bar:SetMinMaxValues(0, cd) + nameplate.totemTick.bar:SetValue(cooldown) + self.activeFrames.bars[nameplate.totemTick] = nameplate.totemTick + else + self.activeFrames.cooldowns[nameplate.totemTick] = nameplate.totemTick + end + + nameplate.totemTick.timestamp = timestamp.timeStamp + nameplate.totemTick.maxValue = cd + nameplate.totemTick.value = cooldown + nameplate.totemTick.once = once + + print("once", once, " - totemTick.once", nameplate.totemTick.once, " - cd off", math.abs(timestamp.timeStamp - GetTime()) > cd) + if once and GetTime() - timestamp.timeStamp > cd then + nameplate.totemTick:SetScript("OnUpdate", nil) + nameplate.totemTick:Hide() + print("nameplate.totemTick:Hide()") + else + nameplate.totemTick:SetScript("OnUpdate", function(totemTick, elapsed) + totemTick.now = GetTime() + totemTick.value = (totemTick.timestamp - totemTick.now) % totemTick.maxValue + if totemTick.once and totemTick.now - totemTick.timestamp >= totemTick.maxValue then + totemTick:SetScript("OnUpdate", nil) + print("OnUpdate totemTick:Hide()") + totemTick:Hide() + end + if not totemTick.bar and not (totemTick.once and totemTick.now - totemTick.timestamp >= totemTick.maxValue) then + totemTick:SetCooldown(totemTick.now - totemTick.value, totemTick.maxValue) + elseif totemTick.bar then + totemTick.spark.position = (totemTick.value / totemTick.maxValue) * totemTick.bar:GetHeight() + if ( totemTick.spark.position < 0 ) then + totemTick.spark.position = 0 + end + totemTick.spark:SetPoint("CENTER", totemTick.bar, "BOTTOM", 0, totemTick.spark.position) + totemTick.bar:SetValue(totemTick.value) + end + totemTick.text:SetFormattedText("%.1f", totemTick.value) + end) + print("nameplate.totemTick:Show()") + nameplate.totemTick:Show() + end + else + if nameplate.totemTick then + nameplate.totemTick:SetScript("OnUpdate", nil) + nameplate.totemTick:Hide() + nameplate.totemTick:SetParent(nil) + tinsert(nameplate.totemTick.bar and self.barCache or self.cooldownCache, nameplate.totemTick) + self.activeFrames.bars[nameplate.totemTick] = nil + self.activeFrames.cooldowns[nameplate.totemTick] = nil + nameplate.totemTick = nil + end + end +end + +function TotemPulse:UpdateBar(bar) + bar:SetWidth(Gladdy.db.totemPulseBarWidth) + bar:SetHeight(Gladdy.db.totemPulseBarHeight) + + bar.backdrop:SetBackdrop({ edgeFile = Gladdy:SMFetch("border", "totemPulseBarBorderStyle"), + edgeSize = Gladdy.db.totemPulseBarBorderSize }) + bar.backdrop:SetBackdropBorderColor(Gladdy:SetColor(Gladdy.db.totemPulseBarBorderColor)) + + bar.bar:SetStatusBarTexture(Gladdy:SMFetch("statusbar", "totemPulseBarTexture")) + bar.bar:SetStatusBarColor(Gladdy:SetColor(Gladdy.db.totemPulseBarColor)) + bar.bar:SetOrientation("Vertical") + bar.bar:SetPoint("TOPLEFT", bar, "TOPLEFT", (Gladdy.db.totemPulseBarBorderSize/Gladdy.db.statusbarBorderOffset), -(Gladdy.db.totemPulseBarBorderSize/Gladdy.db.statusbarBorderOffset)) + bar.bar:SetPoint("BOTTOMRIGHT", bar, "BOTTOMRIGHT", -(Gladdy.db.totemPulseBarBorderSize/Gladdy.db.statusbarBorderOffset), (Gladdy.db.totemPulseBarBorderSize/Gladdy.db.statusbarBorderOffset)) + + bar.spark:SetWidth(8) + bar.spark:SetHeight(40) + bar.spark:SetRotation(ninetyDegreeInRad) + + bar.bg:SetTexture(Gladdy:SMFetch("statusbar", "totemPulseBarTexture")) + bar.bg:SetVertexColor(Gladdy:SetColor(Gladdy.db.totemPulseBarBgColor)) + + bar.text:SetFont("Fonts\\FRIZQT__.TTF", 16, "OUTLINE") + bar.text:SetTextColor(Gladdy:SetColor(Gladdy.db.totemPulseTextColor)) +end + +function TotemPulse:UpdateCooldown(cooldown) + cooldown:SetReverse(true) + cooldown:SetAlpha(Gladdy.db.totemPulseCooldownAlpha) + cooldown.text:SetFont("Fonts\\FRIZQT__.TTF", 16, "OUTLINE") + cooldown.text:SetTextColor(Gladdy:SetColor(Gladdy.db.totemPulseTextColor)) +end + +function TotemPulse:UpdateFrameOnce() + for _,bar in pairs(self.activeFrames.bars) do + self:UpdateBar(bar) + end + for _,cooldown in pairs(self.activeFrames.cooldowns) do + self:UpdateCooldown(cooldown) + end + for _,bar in pairs(self.barCache) do + self:UpdateBar(bar) + end + for _,cooldown in pairs(self.cooldownCache) do + self:UpdateCooldown(cooldown) + end +end + +--------------------------------------------------- + +-- TEST + +--------------------------------------------------- + + +--------------------------------------------------- + +-- OPTIONS + +--------------------------------------------------- + +function TotemPulse:GetOptions() + return { + headerClassicon = { + type = "header", + name = L["Totem Pulse"], + order = 2, + }, + totemPulseEnabled = Gladdy:option({ + type = "toggle", + name = L["Totem Pulse Enabled"], + order = 3, + }), + totemPulseAttachToTotemPlate = Gladdy:option({ + type = "toggle", + name = L["Attach to Totem Plates"], + order = 4, + }), + group = { + type = "group", + childGroups = "tree", + name = L["Frame"], + order = 4, + args = { + barFrame = { + type = "group", + name = L["Bar"], + order = 1, + args = { + headerSize = { + type = "header", + name = L["Bar Size"], + order = 1, + }, + totemPulseBarHeight = Gladdy:option({ + type = "range", + name = L["Bar height"], + desc = L["Height of the bar"], + order = 3, + min = 0.1, + max = 200, + step = .1, + width = "full", + }), + totemPulseBarWidth = Gladdy:option({ + type = "range", + name = L["Bar width"], + desc = L["Width of the bars"], + order = 4, + min = 0.1, + max = 600, + step = .1, + width = "full", + }), + headerTexture = { + type = "header", + name = L["Texture"], + order = 5, + }, + totemPulseBarTexture = Gladdy:option({ + type = "select", + name = L["Bar texture"], + desc = L["Texture of the bar"], + order = 9, + dialogControl = "LSM30_Statusbar", + values = AceGUIWidgetLSMlists.statusbar, + }), + totemPulseBarColor = Gladdy:colorOption({ + type = "color", + name = L["Bar color"], + desc = L["Color of the cast bar"], + order = 10, + hasAlpha = true, + }), + totemPulseBarBgColor = Gladdy:colorOption({ + type = "color", + name = L["Background color"], + desc = L["Color of the cast bar background"], + order = 11, + hasAlpha = true, + }), + headerBorder = { + type = "header", + name = L["Border"], + order = 12, + }, + totemPulseBarBorderSize = Gladdy:option({ + type = "range", + name = L["Border size"], + order = 13, + min = 0.5, + max = Gladdy.db.castBarHeight/2, + step = 0.5, + width = "full", + }), + totemPulseBarBorderStyle = Gladdy:option({ + type = "select", + name = L["Status Bar border"], + order = 51, + dialogControl = "LSM30_Border", + values = AceGUIWidgetLSMlists.border, + }), + totemPulseBarBorderColor = Gladdy:colorOption({ + type = "color", + name = L["Status Bar border color"], + order = 52, + hasAlpha = true, + }), + }, + }, + }, + }, + } +end \ No newline at end of file From 803abd6f076b9407302da681e271dca2785b186a Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Sat, 5 Feb 2022 04:17:03 +0100 Subject: [PATCH 19/51] initial TotemPulse --- Gladdy.toc | 1 + 1 file changed, 1 insertion(+) diff --git a/Gladdy.toc b/Gladdy.toc index 5113781..5dfaf9b 100644 --- a/Gladdy.toc +++ b/Gladdy.toc @@ -26,6 +26,7 @@ Modules\Clicks.lua Modules\Diminishings.lua Modules\Highlight.lua Modules\TotemPlates.lua +Modules\TotemPulse.lua Modules\Trinket.lua Modules\Racial.lua Modules\Cooldowns.lua From 09bfb996815dd2a2a7995b18010245e2d3c428c2 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Sat, 5 Feb 2022 04:17:41 +0100 Subject: [PATCH 20/51] add improved wingclip, entrapment, disarm to DRs --- Libs/DRData-1.0/DRData-1.0.lua | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/Libs/DRData-1.0/DRData-1.0.lua b/Libs/DRData-1.0/DRData-1.0.lua index 6b7d0e7..a3a3c8d 100644 --- a/Libs/DRData-1.0/DRData-1.0.lua +++ b/Libs/DRData-1.0/DRData-1.0.lua @@ -182,7 +182,13 @@ Data.spells = { --[[ RANDOM ROOTS ]]-- -- Improved Hamstring [23694] = "rndroot", - + + -- Entrapment (Hunter Talent) + [19185] = "rndroot", + + -- Improved Wingclip + [19229] = "rndroot", + -- Frostbite [12494] = "rndroot", @@ -244,7 +250,10 @@ Data.spells = { [10912] = "charm", -- Counterattack - [19306] = "counterattack" + [19306] = "counterattack", + + -- Disarm + [676] = "disarm", } -- DR Category names @@ -267,7 +276,8 @@ Data.typeNames = { ["repentance"] = "Repentance", ["dragonsbreath"] = "Dragon's Breath", ["ua"] = "Unstable Affliction Silence", - ["counterattack"] = "Counterattack Immobilize" + ["counterattack"] = "Counterattack Immobilize", + ["disarm"] = "Disarm" } -- Categories that have DR in PvE as well as PvP From 5212479daec0b1757cb8c1d830a2c758df21b55c Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Sat, 5 Feb 2022 04:19:53 +0100 Subject: [PATCH 21/51] completely hide nameplate TotemPlates added --- Modules/TotemPlates.lua | 37 +++++++++++++++++++++++++++++++++++-- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/Modules/TotemPlates.lua b/Modules/TotemPlates.lua index f87053d..5570b97 100644 --- a/Modules/TotemPlates.lua +++ b/Modules/TotemPlates.lua @@ -98,6 +98,18 @@ local function GetTotemColorDefaultOptions() end) for i=1,#indexedList do defaultDB["totem" .. indexedList[i].id] = {color = indexedList[i].color, enabled = indexedList[i].enabled, alpha = 0.6, customText = ""} + options["npTotemsHideDisabledTotems"] = { + order = 1, + name = L["Hide Disabled Totem Plates"], + desc = L["Hide Disabled Totem Plates"], + type = "toggle", + width = "full", + get = function() return Gladdy.dbi.profile.npTotemsHideDisabledTotems end, + set = function(_, value) + Gladdy.dbi.profile.npTotemsHideDisabledTotems = value + Gladdy:UpdateFrame() + end + } options["totem" .. indexedList[i].id] = { order = i+1, name = select(1, GetSpellInfo(indexedList[i].id)), @@ -198,7 +210,8 @@ local TotemPlates = Gladdy:NewModule("Totem Plates", nil, { npTotemPlatesAlpha = 0.6, npTotemPlatesAlphaAlways = false, npTotemPlatesAlphaAlwaysTargeted = false, - npTotemColors = select(1, GetTotemColorDefaultOptions()) + npTotemColors = select(1, GetTotemColorDefaultOptions()), + npTotemsHideDisabledTotems = false, }) LibStub("AceHook-3.0"):Embed(TotemPlates) @@ -295,6 +308,18 @@ function TotemPlates:UpdateFrameOnce() nameplate.gladdyTotemFrame:Hide() self:ToggleAddon(nameplate, true) end + if Gladdy.db.npTotems and Gladdy.db.npTotemColors["totem" .. totemDataEntry.id].enabled then + nameplate.gladdyTotemFrame:Show() + self:ToggleAddon(nameplate) + end + if Gladdy.db.npTotems and not Gladdy.db.npTotemColors["totem" .. totemDataEntry.id].enabled then + nameplate.gladdyTotemFrame:Hide() + self:ToggleAddon(nameplate, true) + end + if Gladdy.db.npTotems and not Gladdy.db.npTotemColors["totem" .. totemDataEntry.id].enabled and Gladdy.db.npTotemsHideDisabledTotems then + nameplate.gladdyTotemFrame:Hide() + self:ToggleAddon(nameplate) + end end for _,gladdyTotemFrame in ipairs(self.totemPlateCache) do gladdyTotemFrame:SetWidth(Gladdy.db.npTotemPlatesSize * Gladdy.db.npTotemPlatesWidthFactor) @@ -395,7 +420,7 @@ function TotemPlates:ToggleAddon(nameplate, show) end function TotemPlates.OnUpdate(self) - if (UnitIsUnit("mouseover", self.unitID) or UnitIsUnit("target", self.unitID)) then + if (UnitIsUnit("mouseover", self.unitID) or UnitIsUnit("target", self.unitID)) and Gladdy.db.npTotemColors["totem" .. self.totemDataEntry.id].alpha > 0 then self.selectionHighlight:SetAlpha(.25) else self.selectionHighlight:SetAlpha(0) @@ -452,6 +477,14 @@ function TotemPlates:OnUnitEvent(unitID) TotemPlates:SetTotemAlpha(nameplate.gladdyTotemFrame, unitID) self:ToggleAddon(nameplate) self.activeTotemNameplates[unitID] = nameplate + elseif totemDataEntry and not Gladdy.db.npTotemColors["totem" .. totemDataEntry.id].enabled and Gladdy.db.npTotemsHideDisabledTotems then + if nameplate.gladdyTotemFrame then + nameplate.gladdyTotemFrame:Hide() + nameplate.gladdyTotemFrame:SetParent(nil) + tinsert(self.totemPlateCache, nameplate.gladdyTotemFrame) + nameplate.gladdyTotemFrame = nil + end + self:ToggleAddon(nameplate) else self:ToggleAddon(nameplate, true) end From 86337919b880f7c62992dd6227106eaf8f14268d Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Sat, 12 Feb 2022 02:08:51 +0100 Subject: [PATCH 22/51] fix UnitIsUnit errors when unitCaster is nil --- EventListener.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/EventListener.lua b/EventListener.lua index 0086627..75cbba1 100644 --- a/EventListener.lua +++ b/EventListener.lua @@ -73,7 +73,7 @@ function Gladdy:SpotEnemy(unit, auraScan) if ( not spellName ) then break end - if Gladdy.cooldownBuffs[spellName] then -- Check for auras that detect used CDs (like Fear Ward) + if Gladdy.cooldownBuffs[spellName] and unitCaster then -- Check for auras that detect used CDs (like Fear Ward) for arenaUnit,v in pairs(self.buttons) do if (UnitIsUnit(arenaUnit, unitCaster)) then Cooldowns:CooldownUsed(arenaUnit, v.class, Gladdy.cooldownBuffs[spellName].spellId, expirationTime - GetTime()) @@ -84,7 +84,7 @@ function Gladdy:SpotEnemy(unit, auraScan) if Gladdy.cooldownBuffs.racials[spellName] then Gladdy:SendMessage("RACIAL_USED", unit, expirationTime, spellName) end - if Gladdy.specBuffs[spellName] then -- Check for auras that detect a spec + if Gladdy.specBuffs[spellName] and unitCaster then -- Check for auras that detect a spec local unitPet = string_gsub(unit, "%d$", "pet%1") if UnitIsUnit(unit, unitCaster) or UnitIsUnit(unitPet, unitCaster) then EventListener:DetectSpec(unit, Gladdy.specBuffs[spellName]) @@ -238,7 +238,7 @@ function EventListener:UNIT_AURA(unit) Gladdy:SendMessage("AURA_GAIN_LIMIT", unit, auraType, n - 1) break end - if Gladdy.cooldownBuffs[spellName] then -- Check for auras that hint used CDs (like Fear Ward) + if Gladdy.cooldownBuffs[spellName] and unitCaster then -- Check for auras that hint used CDs (like Fear Ward) for arenaUnit,v in pairs(Gladdy.buttons) do if (UnitIsUnit(arenaUnit, unitCaster)) then Cooldowns:CooldownUsed(arenaUnit, v.class, Gladdy.cooldownBuffs[spellName].spellId, expirationTime - GetTime()) @@ -248,7 +248,7 @@ function EventListener:UNIT_AURA(unit) if Gladdy.cooldownBuffs.racials[spellName] then Gladdy:SendMessage("RACIAL_USED", unit, spellName, expirationTime, spellName) end - if not button.spec and Gladdy.specBuffs[spellName] then + if not button.spec and Gladdy.specBuffs[spellName] and unitCaster then local unitPet = string_gsub(unit, "%d$", "pet%1") if unitCaster and (UnitIsUnit(unit, unitCaster) or UnitIsUnit(unitPet, unitCaster)) then self:DetectSpec(unit, Gladdy.specBuffs[spellName]) From 3e59a03ce98887699f15010c2229d86c79b7181f Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Tue, 15 Feb 2022 22:59:21 +0100 Subject: [PATCH 23/51] disable options for disabled module + (un)register messages when enabled/disabled --- Modules/ArenaCountDown.lua | 18 +++++++++++++++--- Modules/BuffsDebuffs.lua | 37 +++++++++++++++++++++++++++++------- Modules/Castbar.lua | 16 ++++++++++++++-- Modules/Classicon.lua | 20 ++++++++++++++++--- Modules/CombatIndicator.lua | 13 ++++++++++++- Modules/Diminishings.lua | 5 ++++- Modules/Pets.lua | 25 +++++++++++++++++++----- Modules/Powerbar.lua | 30 +++++++++++++++++++++++++---- Modules/Racial.lua | 19 +++++++++++++++--- Modules/RangeCheck.lua | 20 ++++++++++++++++--- Modules/ShadowsightTimer.lua | 14 +++++++++++++- Modules/Trinket.lua | 21 +++++++++++++------- 12 files changed, 198 insertions(+), 40 deletions(-) diff --git a/Modules/ArenaCountDown.lua b/Modules/ArenaCountDown.lua index 6218064..4f7e5df 100644 --- a/Modules/ArenaCountDown.lua +++ b/Modules/ArenaCountDown.lua @@ -47,13 +47,22 @@ function ACDFrame:Initialize() ACDNumOne:SetPoint("CENTER", ACDNumFrame, "CENTER", 0, 0) self.ACDNumOne = ACDNumOne - self:RegisterMessage("JOINED_ARENA") - self:RegisterMessage("ENEMY_SPOTTED") - self:RegisterMessage("UNIT_SPEC") + if Gladdy.db.countdown then + self:RegisterMessage("JOINED_ARENA") + self:RegisterMessage("ENEMY_SPOTTED") + self:RegisterMessage("UNIT_SPEC") + end self.faction = UnitFactionGroup("player") end function ACDFrame:UpdateFrameOnce() + if Gladdy.db.countdown then + self:RegisterMessage("JOINED_ARENA") + self:RegisterMessage("ENEMY_SPOTTED") + self:RegisterMessage("UNIT_SPEC") + else + self:UnregisterAllMessages() + end self.ACDNumFrame:SetFrameStrata(Gladdy.db.arenaCountdownFrameStrata) self.ACDNumFrame:SetFrameLevel(Gladdy.db.arenaCountdownFrameLevel) end @@ -189,6 +198,7 @@ function ACDFrame:GetOptions() max = 512, step = 16, width = "full", + disabled = function() return not Gladdy.db.countdown end, }), headerAuraLevel = { type = "header", @@ -201,6 +211,7 @@ function ACDFrame:GetOptions() order = 6, values = Gladdy.frameStrata, sorting = Gladdy.frameStrataSorting, + disabled = function() return not Gladdy.db.countdown end, }), arenaCountdownFrameLevel = Gladdy:option({ type = "range", @@ -210,6 +221,7 @@ function ACDFrame:GetOptions() step = 1, order = 7, width = "full", + disabled = function() return not Gladdy.db.countdown end, }), } end diff --git a/Modules/BuffsDebuffs.lua b/Modules/BuffsDebuffs.lua index 1574c54..a61fb95 100644 --- a/Modules/BuffsDebuffs.lua +++ b/Modules/BuffsDebuffs.lua @@ -76,13 +76,16 @@ function BuffsDebuffs:Initialize() self.icons = {} self.trackedCC = {} self.framePool = {} - self:RegisterMessage("JOINED_ARENA") - self:RegisterMessage("UNIT_DESTROYED") - self:RegisterMessage("UNIT_DEATH") - self:RegisterMessage("AURA_FADE") - self:RegisterMessage("AURA_GAIN") - self:RegisterMessage("AURA_GAIN_LIMIT") - self:SetScript("OnEvent", BuffsDebuffs.OnEvent) + if Gladdy.db.buffsEnabled then + self:RegisterMessages( + "JOINED_ARENA", + "UNIT_DESTROYED", + "UNIT_DEATH", + "AURA_FADE", + "AURA_GAIN", + "AURA_GAIN_LIMIT") + self:SetScript("OnEvent", BuffsDebuffs.OnEvent) + end spellSchoolToOptionValueTable = { curse = Gladdy.db.buffsBorderColorCurse, magic = Gladdy.db.buffsBorderColorMagic, @@ -290,6 +293,22 @@ local function styleIcon(aura, auraType) aura.stacks:SetTextColor(Gladdy.db.buffsFontColor.r, Gladdy.db.buffsFontColor.g, Gladdy.db.buffsFontColor.b, 1) end +function BuffsDebuffs:UpdateFrameOnce() + if Gladdy.db.buffsEnabled then + self:RegisterMessages( + "JOINED_ARENA", + "UNIT_DESTROYED", + "UNIT_DEATH", + "AURA_FADE", + "AURA_GAIN", + "AURA_GAIN_LIMIT") + self:SetScript("OnEvent", BuffsDebuffs.OnEvent) + else + self:UnregisterAllMessages() + self:SetScript("OnEvent", nil) + end +end + function BuffsDebuffs:UpdateFrame(unit) --DEBUFFS self.frames[unit].debuffFrame:SetHeight(Gladdy.db.buffsIconSize) @@ -485,12 +504,14 @@ function BuffsDebuffs:GetOptions() name = L["Show CC"], desc = L["Shows all debuffs, which are displayed on the ClassIcon as well"], order = 4, + disabled = function() return not Gladdy.db.buffsEnabled end, }), group = { type = "group", childGroups = "tree", name = L["Frame"], order = 5, + disabled = function() return not Gladdy.db.buffsEnabled end, args = { buffs = { type = "group", @@ -919,6 +940,7 @@ function BuffsDebuffs:GetOptions() name = L["Debuff Lists"], type = "group", order = 11, + disabled = function() return not Gladdy.db.buffsEnabled end, childGroups = "tree", args = select(1, Gladdy:GetAuras(AURA_TYPE_DEBUFF)), set = function(info, state) @@ -934,6 +956,7 @@ function BuffsDebuffs:GetOptions() name = L["Buff Lists"], type = "group", order = 12, + disabled = function() return not Gladdy.db.buffsEnabled end, childGroups = "tree", args = select(1, Gladdy:GetAuras(AURA_TYPE_BUFF)), set = function(info, state) diff --git a/Modules/Castbar.lua b/Modules/Castbar.lua index 38f0ff0..24fc6a7 100644 --- a/Modules/Castbar.lua +++ b/Modules/Castbar.lua @@ -48,8 +48,10 @@ local Castbar = Gladdy:NewModule("Cast Bar", 70, { function Castbar:Initialize() self.frames = {} - self:RegisterMessage("UNIT_DEATH") - self:RegisterMessage("JOINED_ARENA") + if Gladdy.db.castBarEnabled then + self:RegisterMessage("UNIT_DEATH") + self:RegisterMessage("JOINED_ARENA") + end end --------------------------- @@ -133,6 +135,15 @@ function Castbar:CreateFrame(unit) self:ResetUnit(unit) end +function Castbar:UpdateFrameOnce() + if Gladdy.db.castBarEnabled then + self:RegisterMessage("UNIT_DEATH") + self:RegisterMessage("JOINED_ARENA") + else + self:UnregisterAllMessages() + end +end + function Castbar:UpdateFrame(unit) local castBar = self.frames[unit] if (not castBar) then @@ -584,6 +595,7 @@ function Castbar:GetOptions() childGroups = "tree", name = L["Frame"], order = 4, + disabled = function() return not Gladdy.db.castBarEnabled end, args = { barFrame = { type = "group", diff --git a/Modules/Classicon.lua b/Modules/Classicon.lua index c419ab8..e20ce46 100644 --- a/Modules/Classicon.lua +++ b/Modules/Classicon.lua @@ -82,9 +82,21 @@ local specIcons = { function Classicon:Initialize() self.frames = {} - self:RegisterMessage("ENEMY_SPOTTED") - self:RegisterMessage("UNIT_DEATH") - self:RegisterMessage("UNIT_SPEC") + if Gladdy.db.classIconEnabled then + self:RegisterMessage("ENEMY_SPOTTED") + self:RegisterMessage("UNIT_DEATH") + self:RegisterMessage("UNIT_SPEC") + end +end + +function Classicon:UpdateFrameOnce() + if Gladdy.db.classIconEnabled then + self:RegisterMessage("ENEMY_SPOTTED") + self:RegisterMessage("UNIT_DEATH") + self:RegisterMessage("UNIT_SPEC") + else + self:UnregisterAllMessages() + end end function Classicon:CreateFrame(unit) @@ -191,6 +203,7 @@ function Classicon:GetOptions() name = L["Show Spec Icon"], desc = L["Shows Spec Icon once spec is detected"], order = 4, + disabled = function() return not Gladdy.db.classIconEnabled end, get = function() return Gladdy.db.classIconSpecIcon end, set = function(_, value) Gladdy.db.classIconSpecIcon = value @@ -210,6 +223,7 @@ function Classicon:GetOptions() childGroups = "tree", name = L["Frame"], order = 4, + disabled = function() return not Gladdy.db.classIconEnabled end, args = { size = { type = "group", diff --git a/Modules/CombatIndicator.lua b/Modules/CombatIndicator.lua index 4ac51ee..276bcaf 100644 --- a/Modules/CombatIndicator.lua +++ b/Modules/CombatIndicator.lua @@ -20,7 +20,9 @@ local CombatIndicator = Gladdy:NewModule("Combat Indicator", nil, { function CombatIndicator:Initialize() self.frames = {} - self:RegisterMessage("JOINED_ARENA") + if Gladdy.db.ciEnabled then + self:RegisterMessage("JOINED_ARENA") + end self.updateInterval = 0.05 self.combatIndicatorIcon = select(3, GetSpellInfo(674)) end @@ -57,6 +59,14 @@ function CombatIndicator:CreateFrame(unit) button.ciFrame = ciFrame end +function CombatIndicator:UpdateFrameOnce() + if Gladdy.db.ciEnabled then + self:RegisterMessage("JOINED_ARENA") + else + self:UnregisterAllMessages() + end +end + function CombatIndicator:UpdateFrame(unit) local button = Gladdy.buttons[unit] local ciFrame = self.frames[unit] @@ -133,6 +143,7 @@ function CombatIndicator:GetOptions() childGroups = "tree", name = L["Frame"], order = 4, + disabled = function() return not Gladdy.db.ciEnabled end, args = { general = { type = "group", diff --git a/Modules/Diminishings.lua b/Modules/Diminishings.lua index a9836bd..32337ef 100644 --- a/Modules/Diminishings.lua +++ b/Modules/Diminishings.lua @@ -79,7 +79,7 @@ end function Diminishings:Initialize() self.frames = {} - self:RegisterMessage("UNIT_DEATH", "ResetUnit", "AURA_FADE", "UNIT_DESTROYED") + self:RegisterMessage("UNIT_DESTROYED") end function Diminishings:CreateFrame(unit) @@ -434,6 +434,7 @@ function Diminishings:GetOptions() name = L["DR Duration"], desc = L["Change the DR Duration in seconds (DR is dynamic between 15-20s)"], order = 4, + disabled = function() return not Gladdy.db.drEnabled end, min = 15, max = 20, step = .1, @@ -443,6 +444,7 @@ function Diminishings:GetOptions() childGroups = "tree", name = L["Frame"], order = 5, + disabled = function() return not Gladdy.db.drEnabled end, args = { icon = { type = "group", @@ -781,6 +783,7 @@ function Diminishings:GetOptions() type = "group", name = L["Categories"], order = 6, + disabled = function() return not Gladdy.db.drEnabled end, args = Diminishings:CategoryOptions(), }, } diff --git a/Modules/Pets.lua b/Modules/Pets.lua index fc703b0..5a7eca1 100644 --- a/Modules/Pets.lua +++ b/Modules/Pets.lua @@ -31,11 +31,25 @@ local Pets = Gladdy:NewModule("Pets", nil, { function Pets:Initialize() self.frames = {} - self:RegisterMessage("JOINED_ARENA") - self:RegisterMessage("PET_SPOTTED") - self:RegisterMessage("PET_DESTROYED") - self:RegisterMessage("PET_STEALTH") - self:RegisterMessage("ENEMY_SPOTTED") + if Gladdy.db.petEnabled then + self:RegisterMessage("JOINED_ARENA") + self:RegisterMessage("PET_SPOTTED") + self:RegisterMessage("PET_DESTROYED") + self:RegisterMessage("PET_STEALTH") + self:RegisterMessage("ENEMY_SPOTTED") + end +end + +function Pets:UpdateFrameOnce() + if Gladdy.db.petEnabled then + self:RegisterMessage("JOINED_ARENA") + self:RegisterMessage("PET_SPOTTED") + self:RegisterMessage("PET_DESTROYED") + self:RegisterMessage("PET_STEALTH") + self:RegisterMessage("ENEMY_SPOTTED") + else + self:UnregisterAllMessages() + end end function Pets:JOINED_ARENA() @@ -380,6 +394,7 @@ function Pets:GetOptions() childGroups = "tree", name = L["Frame"], order = 3, + disabled = function() return not Gladdy.db.petEnabled end, args = { general = { type = "group", diff --git a/Modules/Powerbar.lua b/Modules/Powerbar.lua index 4e99810..5f48021 100644 --- a/Modules/Powerbar.lua +++ b/Modules/Powerbar.lua @@ -29,10 +29,23 @@ local Powerbar = Gladdy:NewModule("Power Bar", 90, { function Powerbar:Initialize() self.frames = {} - self:RegisterMessage("ENEMY_SPOTTED") - self:RegisterMessage("UNIT_SPEC") - self:RegisterMessage("UNIT_DEATH") - self:RegisterMessage("UNIT_DESTROYED") + if Gladdy.db.powerBarEnabled then + self:RegisterMessage("ENEMY_SPOTTED") + self:RegisterMessage("UNIT_SPEC") + self:RegisterMessage("UNIT_DEATH") + self:RegisterMessage("UNIT_DESTROYED") + end +end + +function Powerbar:UpdateFrameOnce() + if Gladdy.db.powerBarEnabled then + self:RegisterMessage("ENEMY_SPOTTED") + self:RegisterMessage("UNIT_SPEC") + self:RegisterMessage("UNIT_DEATH") + self:RegisterMessage("UNIT_DESTROYED") + else + self:UnregisterAllMessages() + end end function Powerbar:CreateFrame(unit) @@ -147,8 +160,16 @@ function Powerbar:UpdateFrame(unit) if not Gladdy.db.powerBarEnabled then powerBar:Hide() + powerBar:UnregisterEvent("UNIT_POWER_UPDATE") + powerBar:UnregisterEvent("UNIT_MAXPOWER") + powerBar:UnregisterEvent("UNIT_DISPLAYPOWER") + powerBar:SetScript("OnEvent", nil) return else + powerBar:RegisterUnitEvent("UNIT_POWER_UPDATE", unit) + powerBar:RegisterUnitEvent("UNIT_MAXPOWER", unit) + powerBar:RegisterUnitEvent("UNIT_DISPLAYPOWER", unit) + powerBar:SetScript("OnEvent", Powerbar.OnEvent) powerBar:Show() end powerBar.bg:SetTexture(Gladdy:SMFetch("statusbar", "powerBarTexture")) @@ -351,6 +372,7 @@ function Powerbar:GetOptions() childGroups = "tree", name = L["Frame"], order = 4, + disabled = function() return not Gladdy.db.powerBarEnabled end, args = { general = { type = "group", diff --git a/Modules/Racial.lua b/Modules/Racial.lua index ec5e237..e9dff61 100644 --- a/Modules/Racial.lua +++ b/Modules/Racial.lua @@ -26,9 +26,21 @@ local Racial = Gladdy:NewModule("Racial", 79, { function Racial:Initialize() self.frames = {} - self:RegisterMessage("JOINED_ARENA") - self:RegisterMessage("ENEMY_SPOTTED") - self:RegisterMessage("RACIAL_USED") + if Gladdy.db.racialEnabled then + self:RegisterMessage("JOINED_ARENA") + self:RegisterMessage("ENEMY_SPOTTED") + self:RegisterMessage("RACIAL_USED") + end +end + +function Racial:UpdateFrameOnce() + if Gladdy.db.racialEnabled then + self:RegisterMessage("JOINED_ARENA") + self:RegisterMessage("ENEMY_SPOTTED") + self:RegisterMessage("RACIAL_USED") + else + self:UnregisterAllMessages() + end end local function iconTimer(self,elapsed) @@ -235,6 +247,7 @@ function Racial:GetOptions() childGroups = "tree", name = L["Frame"], order = 4, + disabled = function() return not Gladdy.db.racialEnabled end, args = { general = { type = "group", diff --git a/Modules/RangeCheck.lua b/Modules/RangeCheck.lua index 3e95600..36cdcfc 100644 --- a/Modules/RangeCheck.lua +++ b/Modules/RangeCheck.lua @@ -52,12 +52,24 @@ local RangeCheck = Gladdy:NewModule("Range Check", nil, { }) function RangeCheck:Initialize() - self:RegisterMessage("JOINED_ARENA") - self:RegisterMessage("ENEMY_STEALTH") - self:RegisterMessage("ENEMY_SPOTTED") + if Gladdy.db.rangeCheckEnabled then + self:RegisterMessage("JOINED_ARENA") + self:RegisterMessage("ENEMY_STEALTH") + self:RegisterMessage("ENEMY_SPOTTED") + end self.playerClass = select(2, UnitClass("player")) end +function RangeCheck:UpdateFrameOnce() + if Gladdy.db.rangeCheckEnabled then + self:RegisterMessage("JOINED_ARENA") + self:RegisterMessage("ENEMY_STEALTH") + self:RegisterMessage("ENEMY_SPOTTED") + else + self:UnregisterAllMessages() + end +end + function RangeCheck:Reset() self.test = nil end @@ -268,6 +280,7 @@ function RangeCheck:GetOptions() childGroups = "tree", name = L["General"], order = 5, + disabled = function() return not Gladdy.db.rangeCheckEnabled end, args = { general = { type = "group", @@ -340,6 +353,7 @@ function RangeCheck:GetOptions() childGroups = "tree", name = L["Spells"], order = 5, + disabled = function() return not Gladdy.db.rangeCheckEnabled end, args = RangeCheck:GetSpells(), }, } diff --git a/Modules/ShadowsightTimer.lua b/Modules/ShadowsightTimer.lua index 8843cc2..9606f86 100644 --- a/Modules/ShadowsightTimer.lua +++ b/Modules/ShadowsightTimer.lua @@ -34,8 +34,10 @@ end function ShadowsightTimer:Initialize() self.locale = Gladdy:GetArenaTimer() - self:RegisterMessage("JOINED_ARENA") self:CreateAnchor() + if Gladdy.db.shadowsightTimerEnabled then + self:RegisterMessage("JOINED_ARENA") + end end function ShadowsightTimer:Reset() @@ -106,6 +108,12 @@ function ShadowsightTimer:CreateAnchor() end function ShadowsightTimer:UpdateFrameOnce() + if Gladdy.db.shadowsightTimerEnabled then + self:RegisterMessage("JOINED_ARENA") + else + self:UnregisterAllMessages() + end + self.anchor:EnableMouse(not Gladdy.db.shadowsightTimerLocked) self.anchor:SetFrameStrata(Gladdy.db.shadowsightTimerFrameStrata) @@ -299,23 +307,27 @@ function ShadowsightTimer:GetOptions() name = L["Locked"], --desc = L["Turns countdown before the start of an arena match on/off."], order = 4, + disabled = function() return not Gladdy.db.shadowsightTimerEnabled end, }), shadowsightTimerShowTwoTimer = Gladdy:option({ type = "toggle", name = L["Show two timers"], order = 5, + disabled = function() return not Gladdy.db.shadowsightTimerEnabled end, }), shadowsightAnnounce = Gladdy:option({ type = "toggle", name = L["Announce"], --desc = L["Turns countdown before the start of an arena match on/off."], order = 6, + disabled = function() return not Gladdy.db.shadowsightTimerEnabled end, }), group = { type = "group", childGroups = "tree", name = L["Frame"], order = 7, + disabled = function() return not Gladdy.db.shadowsightTimerEnabled end, args = { general = { type = "group", diff --git a/Modules/Trinket.lua b/Modules/Trinket.lua index 0c316e1..13f7f49 100644 --- a/Modules/Trinket.lua +++ b/Modules/Trinket.lua @@ -29,8 +29,17 @@ local Trinket = Gladdy:NewModule("Trinket", 80, { function Trinket:Initialize() self.frames = {} + if Gladdy.db.trinketEnabled then + self:RegisterMessage("JOINED_ARENA") + end +end - self:RegisterMessage("JOINED_ARENA") +function Trinket:UpdateFrameOnce() + if Gladdy.db.trinketEnabled then + self:RegisterMessage("JOINED_ARENA") + else + self:UnregisterAllMessages() + end end local function iconTimer(self, elapsed) @@ -272,6 +281,7 @@ function Trinket:GetOptions() name = L["Colored trinket"], desc = L["Shows a solid colored icon when off/off CD."], order = 4, + disabled = function() return not Gladdy.db.trinketEnabled end, }), trinketColoredCd = Gladdy:colorOption({ type = "color", @@ -279,9 +289,7 @@ function Trinket:GetOptions() desc = L["Color of the border"], order = 5, hasAlpha = true, - disabled = function() - return not Gladdy.db.trinketColored - end, + disabled = function() return not Gladdy.db.trinketEnabled end, }), trinketColoredNoCd = Gladdy:colorOption({ type = "color", @@ -289,15 +297,14 @@ function Trinket:GetOptions() desc = L["Color of the border"], order = 6, hasAlpha = true, - disabled = function() - return not Gladdy.db.trinketColored - end, + disabled = function() return not Gladdy.db.trinketEnabled end, }), group = { type = "group", childGroups = "tree", name = L["Frame"], order = 5, + disabled = function() return not Gladdy.db.trinketEnabled end, args = { general = { type = "group", From 051571f4efd33241e4be7c9b7ef3391fa9b471a9 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Tue, 15 Feb 2022 23:17:51 +0100 Subject: [PATCH 24/51] change identifying totems by name to identifying by guid (npcId) - faster and localization independent --- Constants.lua | 342 +++++++++++++++++++++++++++++++++++++++- Modules/TotemPlates.lua | 281 +++++++++++++++++---------------- 2 files changed, 484 insertions(+), 139 deletions(-) diff --git a/Constants.lua b/Constants.lua index 0a5704e..8df815c 100644 --- a/Constants.lua +++ b/Constants.lua @@ -1,4 +1,4 @@ -local tbl_sort, select = table.sort, select +local tbl_sort, select, string_lower = table.sort, select, string.lower local GetSpellInfo = GetSpellInfo local GetItemInfo = GetItemInfo @@ -1259,4 +1259,342 @@ Gladdy.frameStrataSorting = { [6] = "FULLSCREEN", [7] = "FULLSCREEN_DIALOG", [8] = "TOOLTIP", -} \ No newline at end of file +} + + +--------------------- +-- TOTEM STUFF +--------------------- + +local totemData = { + -- Fire + [string_lower("Searing Totem")] = {id = 3599,texture = select(3, GetSpellInfo(3599)), color = {r = 0, g = 0, b = 0, a = 1}}, + [string_lower("Flametongue Totem")] = {id = 8227,texture = select(3, GetSpellInfo(8227)), color = {r = 0, g = 0, b = 0, a = 1}}, + [string_lower("Magma Totem")] = {id = 8190,texture = select(3, GetSpellInfo(8190)), color = {r = 0, g = 0, b = 0, a = 1}, pulse = 2}, + [string_lower("Fire Nova Totem")] = {id = 1535,texture = select(3, GetSpellInfo(1535)), color = {r = 0, g = 0, b = 0, a = 1}, pulse = { cd = 4, once = true }}, + [string_lower("Totem of Wrath")] = {id = 30706,texture = select(3, GetSpellInfo(30706)), color = {r = 0, g = 0, b = 0, a = 1}}, + [string_lower("Fire Elemental Totem")] = {id = 32982,texture = select(3, GetSpellInfo(32982)), color = {r = 0, g = 0, b = 0, a = 1}}, + [string_lower("Frost Resistance Totem")] = {id = 8181,texture = select(3, GetSpellInfo(8181)), color = {r = 0, g = 0, b = 0, a = 1}}, + -- Water + [string_lower("Fire Resistance Totem")] = {id = 8184,texture = select(3, GetSpellInfo(8184)), color = {r = 0, g = 0, b = 0, a = 1}}, + [string_lower("Poison Cleansing Totem")] = {id = 8166,texture = select(3, GetSpellInfo(8166)), color = {r = 0, g = 0, b = 0, a = 1}, pulse = 4}, + [string_lower("Disease Cleansing Totem")] = {id = 8170,texture = select(3, GetSpellInfo(8170)), color = {r = 0, g = 0, b = 0, a = 1}, pulse = 4}, + [string_lower("Healing Stream Totem")] = {id = 5394,texture = select(3, GetSpellInfo(5394)), color = {r = 0, g = 0, b = 0, a = 1}, pulse = 2}, + [string_lower("Mana Tide Totem")] = {id = 16190,texture = select(3, GetSpellInfo(16190)), color = {r = 0.078, g = 0.9, b = 0.16, a = 1}}, + [string_lower("Mana Spring Totem")] = {id = 5675,texture = select(3, GetSpellInfo(5675)), color = {r = 0, g = 0, b = 0, a = 1}, pulse = 2}, + -- Earth + [string_lower("Earthbind Totem")] = {id = 2484,texture = select(3, GetSpellInfo(2484)), color = {r = 0.5, g = 0.5, b = 0.5, a = 1}, pulse = 3}, + [string_lower("Stoneclaw Totem")] = {id = 5730,texture = select(3, GetSpellInfo(5730)), color = {r = 0, g = 0, b = 0, a = 1}, pulse = 2}, + [string_lower("Stoneskin Totem")] = {id = 8071,texture = select(3, GetSpellInfo(8071)), color = {r = 0, g = 0, b = 0, a = 1}}, + [string_lower("Strength of Earth Totem")] = {id = 8075,texture = select(3, GetSpellInfo(8075)), color = {r = 0, g = 0, b = 0, a = 1}}, + [string_lower("Earth Elemental Totem")] = {id = 33663,texture = select(3, GetSpellInfo(33663)), color = {r = 0, g = 0, b = 0, a = 1}}, + [string_lower("Tremor Totem")] = {id = 8143,texture = select(3, GetSpellInfo(8143)), color = {r = 1, g = 0.9, b = 0.1, a = 1}, pulse = 3}, + -- Air + [string_lower("Grounding Totem")] = {id = 8177,texture = select(3, GetSpellInfo(8177)), color = {r = 0, g = 0.53, b = 0.92, a = 1}}, + [string_lower("Grace of Air Totem")] = {id = 8835,texture = select(3, GetSpellInfo(8835)), color = {r = 0, g = 0, b = 0, a = 1}}, + [string_lower("Nature Resistance Totem")] = {id = 10595,texture = select(3, GetSpellInfo(10595)), color = {r = 0, g = 0, b = 0, a = 1}}, + [string_lower("Windfury Totem")] = {id = 8512,texture = select(3, GetSpellInfo(8512)), color = {r = 0.96, g = 0, b = 0.07, a = 1}}, + [string_lower("Sentry Totem")] = {id = 6495, texture = select(3, GetSpellInfo(6495)), color = {r = 0, g = 0, b = 0, a = 1}}, + [string_lower("Windwall Totem")] = {id = 15107,texture = select(3, GetSpellInfo(15107)), color = {r = 0, g = 0, b = 0, a = 1}}, + [string_lower("Wrath of Air Totem")] = {id = 3738,texture = select(3, GetSpellInfo(3738)), color = {r = 0, g = 0, b = 0, a = 1}}, + [string_lower("Tranquil Air Totem")] = {id = 25908,texture = select(3, GetSpellInfo(25908)), color = {r = 0, g = 0, b = 0, a = 1}}, +} + +local totemSpellIdToPulse = { + [GetSpellInfo(totemData[string_lower("Earthbind Totem")].id)] = totemData[string_lower("Earthbind Totem")].pulse, + [2484] = totemData[string_lower("Earthbind Totem")].pulse, + [GetSpellInfo(totemData[string_lower("Tremor Totem")].id)] = totemData[string_lower("Tremor Totem")].pulse, + [8143] = totemData[string_lower("Tremor Totem")].pulse, + [GetSpellInfo(totemData[string_lower("Poison Cleansing Totem")].id)] = totemData[string_lower("Poison Cleansing Totem")].pulse, + [8166] = totemData[string_lower("Poison Cleansing Totem")].pulse, + [GetSpellInfo(totemData[string_lower("Disease Cleansing Totem")].id)] = totemData[string_lower("Disease Cleansing Totem")].pulse, + [8170] = totemData[string_lower("Disease Cleansing Totem")].pulse, + [GetSpellInfo(totemData[string_lower("Fire Nova Totem")].id)] = totemData[string_lower("Fire Nova Totem")].pulse, + [1535] = totemData[string_lower("Fire Nova Totem")].pulse, -- Rank 1 + [8498] = totemData[string_lower("Fire Nova Totem")].pulse, -- Rank 2 + [8499] = totemData[string_lower("Fire Nova Totem")].pulse, -- Rank 3 + [11314] = totemData[string_lower("Fire Nova Totem")].pulse, -- Rank 4 + [11315] = totemData[string_lower("Fire Nova Totem")].pulse, -- Rank 5 + [25546] = totemData[string_lower("Fire Nova Totem")].pulse, -- Rank 6 + [25547] = totemData[string_lower("Fire Nova Totem")].pulse, -- Rank 7 + [GetSpellInfo(totemData[string_lower("Magma Totem")].id)] = totemData[string_lower("Magma Totem")].pulse, + [8190] = totemData[string_lower("Magma Totem")].pulse, -- Rank 1 + [10585] = totemData[string_lower("Magma Totem")].pulse, -- Rank 2 + [10586] = totemData[string_lower("Magma Totem")].pulse, -- Rank 3 + [10587] = totemData[string_lower("Magma Totem")].pulse, -- Rank 4 + [25552] = totemData[string_lower("Magma Totem")].pulse, -- Rank 5 + [GetSpellInfo(totemData[string_lower("Healing Stream Totem")].id)] = totemData[string_lower("Healing Stream Totem")].pulse, + [5394] = totemData[string_lower("Healing Stream Totem")].pulse, -- Rank 1 + [6375] = totemData[string_lower("Healing Stream Totem")].pulse, -- Rank 2 + [6377] = totemData[string_lower("Healing Stream Totem")].pulse, -- Rank 3 + [10462] = totemData[string_lower("Healing Stream Totem")].pulse, -- Rank 4 + [10463] = totemData[string_lower("Healing Stream Totem")].pulse, -- Rank 5 + [25567] = totemData[string_lower("Healing Stream Totem")].pulse, -- Rank 6 + [GetSpellInfo(totemData[string_lower("Mana Spring Totem")].id)] = totemData[string_lower("Mana Spring Totem")].pulse, + [5675] = totemData[string_lower("Mana Spring Totem")].pulse, -- Rank 1 + [10495] = totemData[string_lower("Mana Spring Totem")].pulse, -- Rank 2 + [10496] = totemData[string_lower("Mana Spring Totem")].pulse, -- Rank 3 + [10497] = totemData[string_lower("Mana Spring Totem")].pulse, -- Rank 4 + [25570] = totemData[string_lower("Mana Spring Totem")].pulse, -- Rank 5 + [GetSpellInfo(totemData[string_lower("Stoneclaw Totem")].id)] = totemData[string_lower("Stoneclaw Totem")].pulse, + [5730] = totemData[string_lower("Stoneclaw Totem")].pulse, -- Rank 1 + [6390] = totemData[string_lower("Stoneclaw Totem")].pulse, -- Rank 2 + [6391] = totemData[string_lower("Stoneclaw Totem")].pulse, -- Rank 3 + [6392] = totemData[string_lower("Stoneclaw Totem")].pulse, -- Rank 4 + [10427] = totemData[string_lower("Stoneclaw Totem")].pulse, -- Rank 5 + [10428] = totemData[string_lower("Stoneclaw Totem")].pulse, -- Rank 6 + [25525] = totemData[string_lower("Stoneclaw Totem")].pulse, -- Rank 7 +} + +local totemNpcIdsToTotemData = { + --fire + [2523] = totemData[string_lower("Searing Totem")], + [3902] = totemData[string_lower("Searing Totem")], + [3903] = totemData[string_lower("Searing Totem")], + [3904] = totemData[string_lower("Searing Totem")], + [7400] = totemData[string_lower("Searing Totem")], + [7402] = totemData[string_lower("Searing Totem")], + [15480] = totemData[string_lower("Searing Totem")], + [31162] = totemData[string_lower("Searing Totem")], + [31164] = totemData[string_lower("Searing Totem")], + [31165] = totemData[string_lower("Searing Totem")], + [21995] = totemData[string_lower("Searing Totem")], + [22209] = totemData[string_lower("Searing Totem")], + [22895] = totemData[string_lower("Searing Totem")], + [22896] = totemData[string_lower("Searing Totem")], + [34687] = totemData[string_lower("Searing Totem")], + [36532] = totemData[string_lower("Searing Totem")], + [43423] = totemData[string_lower("Searing Totem")], + [67380] = totemData[string_lower("Searing Totem")], + [73477] = totemData[string_lower("Searing Totem")], + [79238] = totemData[string_lower("Searing Totem")], + [22896] = totemData[string_lower("Searing Totem")], + [84519] = totemData[string_lower("Searing Totem")], + [110730] = totemData[string_lower("Searing Totem")], + [132178] = totemData[string_lower("Searing Totem")], + + [5950] = totemData[string_lower("Flametongue Totem")], + [6012] = totemData[string_lower("Flametongue Totem")], + [7423] = totemData[string_lower("Flametongue Totem")], + [10557] = totemData[string_lower("Flametongue Totem")], + [15485] = totemData[string_lower("Flametongue Totem")], + [31132] = totemData[string_lower("Flametongue Totem")], + [31133] = totemData[string_lower("Flametongue Totem")], + [31158] = totemData[string_lower("Flametongue Totem")], + [42605] = totemData[string_lower("Flametongue Totem")], + + [5929] = totemData[string_lower("Magma Totem")], + [7464] = totemData[string_lower("Magma Totem")], + [7465] = totemData[string_lower("Magma Totem")], + [7466] = totemData[string_lower("Magma Totem")], + [15484] = totemData[string_lower("Magma Totem")], + [31166] = totemData[string_lower("Magma Totem")], + [31167] = totemData[string_lower("Magma Totem")], + [32887] = totemData[string_lower("Magma Totem")], + [42211] = totemData[string_lower("Magma Totem")], + [71335] = totemData[string_lower("Magma Totem")], + [71925] = totemData[string_lower("Magma Totem")], + [73085] = totemData[string_lower("Magma Totem")], + [73093] = totemData[string_lower("Magma Totem")], + [73268] = totemData[string_lower("Magma Totem")], + [88971] = totemData[string_lower("Magma Totem")], + [97369] = totemData[string_lower("Magma Totem")], + [98676] = totemData[string_lower("Magma Totem")], + + [5879] = totemData[string_lower("Fire Nova Totem")], + [6110] = totemData[string_lower("Fire Nova Totem")], + [6111] = totemData[string_lower("Fire Nova Totem")], + [7844] = totemData[string_lower("Fire Nova Totem")], + [7845] = totemData[string_lower("Fire Nova Totem")], + [14662] = totemData[string_lower("Fire Nova Totem")], + [15482] = totemData[string_lower("Fire Nova Totem")], + [15483] = totemData[string_lower("Fire Nova Totem")], + [24320] = totemData[string_lower("Fire Nova Totem")], + [32775] = totemData[string_lower("Fire Nova Totem")], + [32776] = totemData[string_lower("Fire Nova Totem")], + + [17539] = totemData[string_lower("Totem of Wrath")], + [22970] = totemData[string_lower("Totem of Wrath")], + [22971] = totemData[string_lower("Totem of Wrath")], + [30652] = totemData[string_lower("Totem of Wrath")], + [30653] = totemData[string_lower("Totem of Wrath")], + [30654] = totemData[string_lower("Totem of Wrath")], + + [15439] = totemData[string_lower("Fire Elemental Totem")], + [40830] = totemData[string_lower("Fire Elemental Totem")], + [41337] = totemData[string_lower("Fire Elemental Totem")], + [41346] = totemData[string_lower("Fire Elemental Totem")], + [72301] = totemData[string_lower("Fire Elemental Totem")], + + [5926] = totemData[string_lower("Frost Resistance Totem")], + [7412] = totemData[string_lower("Frost Resistance Totem")], + [7413] = totemData[string_lower("Frost Resistance Totem")], + [15486] = totemData[string_lower("Frost Resistance Totem")], + [31171] = totemData[string_lower("Frost Resistance Totem")], + [31172] = totemData[string_lower("Frost Resistance Totem")], + + -- Water + [5927] = totemData[string_lower("Fire Resistance Totem")], + [7424] = totemData[string_lower("Fire Resistance Totem")], + [7425] = totemData[string_lower("Fire Resistance Totem")], + [15487] = totemData[string_lower("Fire Resistance Totem")], + [31169] = totemData[string_lower("Fire Resistance Totem")], + [31170] = totemData[string_lower("Fire Resistance Totem")], + + [5923] = totemData[string_lower("Poison Cleansing Totem")], + [22487] = totemData[string_lower("Poison Cleansing Totem")], + + [5924] = totemData[string_lower("Disease Cleansing Totem")], + + [3527] = totemData[string_lower("Healing Stream Totem")], + [3906] = totemData[string_lower("Healing Stream Totem")], + [3907] = totemData[string_lower("Healing Stream Totem")], + [3908] = totemData[string_lower("Healing Stream Totem")], + [3909] = totemData[string_lower("Healing Stream Totem")], + [14664] = totemData[string_lower("Healing Stream Totem")], + [15488] = totemData[string_lower("Healing Stream Totem")], + [18235] = totemData[string_lower("Healing Stream Totem")], + [31181] = totemData[string_lower("Healing Stream Totem")], + [31182] = totemData[string_lower("Healing Stream Totem")], + [31185] = totemData[string_lower("Healing Stream Totem")], + [34686] = totemData[string_lower("Healing Stream Totem")], + [36542] = totemData[string_lower("Healing Stream Totem")], + [37810] = totemData[string_lower("Healing Stream Totem")], + [38428] = totemData[string_lower("Healing Stream Totem")], + [47077] = totemData[string_lower("Healing Stream Totem")], + [72309] = totemData[string_lower("Healing Stream Totem")], + [72457] = totemData[string_lower("Healing Stream Totem")], + [73890] = totemData[string_lower("Healing Stream Totem")], + [74433] = totemData[string_lower("Healing Stream Totem")], + [97508] = totemData[string_lower("Healing Stream Totem")], + [112567] = totemData[string_lower("Healing Stream Totem")], + [120357] = totemData[string_lower("Healing Stream Totem")], + [128539] = totemData[string_lower("Healing Stream Totem")], + [132049] = totemData[string_lower("Healing Stream Totem")], + + [10467] = totemData[string_lower("Mana Tide Totem")], + [11100] = totemData[string_lower("Mana Tide Totem")], + [11101] = totemData[string_lower("Mana Tide Totem")], + [17061] = totemData[string_lower("Mana Tide Totem")], + + [3573] = totemData[string_lower("Mana Spring Totem")], + [7414] = totemData[string_lower("Mana Spring Totem")], + [7415] = totemData[string_lower("Mana Spring Totem")], + [7416] = totemData[string_lower("Mana Spring Totem")], + [15304] = totemData[string_lower("Mana Spring Totem")], + [15489] = totemData[string_lower("Mana Spring Totem")], + [31186] = totemData[string_lower("Mana Spring Totem")], + [31189] = totemData[string_lower("Mana Spring Totem")], + [31190] = totemData[string_lower("Mana Spring Totem")], + + -- Earth + [2630] = totemData[string_lower("Earthbind Totem")], + [22486] = totemData[string_lower("Earthbind Totem")], + [40233] = totemData[string_lower("Earthbind Totem")], + [74737] = totemData[string_lower("Earthbind Totem")], + [79155] = totemData[string_lower("Earthbind Totem")], + + [3579] = totemData[string_lower("Stoneclaw Totem")], + [3911] = totemData[string_lower("Stoneclaw Totem")], + [3912] = totemData[string_lower("Stoneclaw Totem")], + [3913] = totemData[string_lower("Stoneclaw Totem")], + [7398] = totemData[string_lower("Stoneclaw Totem")], + [7399] = totemData[string_lower("Stoneclaw Totem")], + [14870] = totemData[string_lower("Stoneclaw Totem")], + [15478] = totemData[string_lower("Stoneclaw Totem")], + [31120] = totemData[string_lower("Stoneclaw Totem")], + [31121] = totemData[string_lower("Stoneclaw Totem")], + [31122] = totemData[string_lower("Stoneclaw Totem")], + [40258] = totemData[string_lower("Stoneclaw Totem")], + [102402] = totemData[string_lower("Stoneclaw Totem")], + + [5873] = totemData[string_lower("Stoneskin Totem")], + [5919] = totemData[string_lower("Stoneskin Totem")], + [5920] = totemData[string_lower("Stoneskin Totem")], + [7366] = totemData[string_lower("Stoneskin Totem")], + [7367] = totemData[string_lower("Stoneskin Totem")], + [7368] = totemData[string_lower("Stoneskin Totem")], + [14663] = totemData[string_lower("Stoneskin Totem")], + [15470] = totemData[string_lower("Stoneskin Totem")], + [15474] = totemData[string_lower("Stoneskin Totem")], + [18177] = totemData[string_lower("Stoneskin Totem")], + [21994] = totemData[string_lower("Stoneskin Totem")], + [31175] = totemData[string_lower("Stoneskin Totem")], + [31176] = totemData[string_lower("Stoneskin Totem")], + [36550] = totemData[string_lower("Stoneskin Totem")], + [40267] = totemData[string_lower("Stoneskin Totem")], + [41967] = totemData[string_lower("Stoneskin Totem")], + + [5874] = totemData[string_lower("Strength of Earth Totem")], + [5921] = totemData[string_lower("Strength of Earth Totem")], + [5922] = totemData[string_lower("Strength of Earth Totem")], + [7403] = totemData[string_lower("Strength of Earth Totem")], + [15464] = totemData[string_lower("Strength of Earth Totem")], + [15479] = totemData[string_lower("Strength of Earth Totem")], + [21992] = totemData[string_lower("Strength of Earth Totem")], + [30647] = totemData[string_lower("Strength of Earth Totem")], + [31129] = totemData[string_lower("Strength of Earth Totem")], + [40266] = totemData[string_lower("Strength of Earth Totem")], + + [15430] = totemData[string_lower("Earth Elemental Totem")], + [24649] = totemData[string_lower("Earth Elemental Totem")], + [39387] = totemData[string_lower("Earth Elemental Totem")], + [40247] = totemData[string_lower("Earth Elemental Totem")], + [72307] = totemData[string_lower("Earth Elemental Totem")], + + [5913] = totemData[string_lower("Tremor Totem")], + [41938] = totemData[string_lower("Tremor Totem")], + [41939] = totemData[string_lower("Tremor Totem")], + + -- Air + [5925] = totemData[string_lower("Grounding Totem")], + [128537] = totemData[string_lower("Grounding Totem")], + [136251] = totemData[string_lower("Grounding Totem")], + + [7486] = totemData[string_lower("Grace of Air Totem")], + [7487] = totemData[string_lower("Grace of Air Totem")], + [15463] = totemData[string_lower("Grace of Air Totem")], + + [7467] = totemData[string_lower("Nature Resistance Totem")], + [7468] = totemData[string_lower("Nature Resistance Totem")], + [7469] = totemData[string_lower("Nature Resistance Totem")], + [15490] = totemData[string_lower("Nature Resistance Totem")], + [31173] = totemData[string_lower("Nature Resistance Totem")], + [31174] = totemData[string_lower("Nature Resistance Totem")], + + [6112] = totemData[string_lower("Windfury Totem")], + [7483] = totemData[string_lower("Windfury Totem")], + [7484] = totemData[string_lower("Windfury Totem")], + [14666] = totemData[string_lower("Windfury Totem")], + [15496] = totemData[string_lower("Windfury Totem")], + [15497] = totemData[string_lower("Windfury Totem")], + [22897] = totemData[string_lower("Windfury Totem")], + [41940] = totemData[string_lower("Windfury Totem")], + [41941] = totemData[string_lower("Windfury Totem")], + [80703] = totemData[string_lower("Windfury Totem")], + [105690] = totemData[string_lower("Windfury Totem")], + [133684] = totemData[string_lower("Windfury Totem")], + + [3968] = totemData[string_lower("Sentry Totem")], + [28938] = totemData[string_lower("Sentry Totem")], + [40187] = totemData[string_lower("Sentry Totem")], + [69505] = totemData[string_lower("Sentry Totem")], + [70413] = totemData[string_lower("Sentry Totem")], + [71145] = totemData[string_lower("Sentry Totem")], + [147410] = totemData[string_lower("Sentry Totem")], + + [9687] = totemData[string_lower("Windwall Totem")], + [9688] = totemData[string_lower("Windwall Totem")], + [9689] = totemData[string_lower("Windwall Totem")], + [15492] = totemData[string_lower("Windwall Totem")], + + [15447] = totemData[string_lower("Wrath of Air Totem")], + [36556] = totemData[string_lower("Wrath of Air Totem")], + + [15803] = totemData[string_lower("Tranquil Air Totem")], +} + +function Gladdy:GetTotemData() + return totemData, totemNpcIdsToTotemData, totemSpellIdToPulse +end + diff --git a/Modules/TotemPlates.lua b/Modules/TotemPlates.lua index 5570b97..8c1a0ee 100644 --- a/Modules/TotemPlates.lua +++ b/Modules/TotemPlates.lua @@ -1,103 +1,29 @@ -local select, pairs, string_lower, tremove, tinsert, format, string_gsub, ipairs = select, pairs, string.lower, tremove, tinsert, format, string.gsub, ipairs -local UnitExists, UnitIsUnit, UnitName, UnitIsEnemy = UnitExists, UnitIsUnit, UnitName, UnitIsEnemy +local select, pairs, tremove, tinsert, format, strsplit, tonumber, ipairs = select, pairs, tremove, tinsert, format, strsplit, tonumber, ipairs +local UnitExists, UnitIsUnit, UnitIsEnemy, UnitGUID = UnitExists, UnitIsUnit, UnitIsEnemy, UnitGUID local C_NamePlate = C_NamePlate local Gladdy = LibStub("Gladdy") local L = Gladdy.L local GetSpellInfo, CreateFrame = GetSpellInfo, CreateFrame +local totemData, npcIdToTotemData = Gladdy:GetTotemData() --------------------------------------------------- --- Constants +-- Option Helpers --------------------------------------------------- -local totemData = { - -- Fire - [string_lower("Searing Totem")] = {id = 3599,texture = select(3, GetSpellInfo(3599)), color = {r = 0, g = 0, b = 0, a = 1}, enabled = true, priority = 0}, -- Searing Totem - [string_lower("Flametongue Totem")] = {id = 8227,texture = select(3, GetSpellInfo(8227)), color = {r = 0, g = 0, b = 0, a = 1}, enabled = true, priority = 0}, -- Flametongue Totem - [string_lower("Magma Totem")] = {id = 8190,texture = select(3, GetSpellInfo(8190)), color = {r = 0, g = 0, b = 0, a = 1}, enabled = true, priority = 0}, -- Magma Totem - [string_lower("Fire Nova Totem")] = {id = 1535,texture = select(3, GetSpellInfo(1535)), color = {r = 0, g = 0, b = 0, a = 1}, enabled = true, priority = 0}, -- Fire Nova Totem - [string_lower("Totem of Wrath")] = {id = 30706,texture = select(3, GetSpellInfo(30706)), color = {r = 0, g = 0, b = 0, a = 1}, enabled = true, priority = 1}, -- Totem of Wrath - [string_lower("Fire Elemental Totem")] = {id = 32982,texture = select(3, GetSpellInfo(32982)), color = {r = 0, g = 0, b = 0, a = 1}, enabled = true, priority = 0}, -- Fire Elemental Totem - [string_lower("Frost Resistance Totem")] = {id = 8181,texture = select(3, GetSpellInfo(8181)), color = {r = 0, g = 0, b = 0, a = 1}, enabled = true, priority = 0}, -- Frost Resistance Totem - -- Water - [string_lower("Fire Resistance Totem")] = {id = 8184,texture = select(3, GetSpellInfo(8184)), color = {r = 0, g = 0, b = 0, a = 1}, enabled = true, priority = 0}, -- Fire Resistance Totem - [string_lower("Poison Cleansing Totem")] = {id = 8166,texture = select(3, GetSpellInfo(8166)), color = {r = 0, g = 0, b = 0, a = 1}, enabled = true, priority = 0}, -- Poison Cleansing Totem - [string_lower("Disease Cleansing Totem")] = {id = 8170,texture = select(3, GetSpellInfo(8170)), color = {r = 0, g = 0, b = 0, a = 1}, enabled = true, priority = 0}, -- Disease Cleansing Totem - [string_lower("Healing Stream Totem")] = {id = 5394,texture = select(3, GetSpellInfo(5394)), color = {r = 0, g = 0, b = 0, a = 1}, enabled = true, priority = 0}, -- Healing Stream Totem - [string_lower("Mana Tide Totem")] = {id = 16190,texture = select(3, GetSpellInfo(16190)), color = {r = 0.078, g = 0.9, b = 0.16, a = 1}, enabled = true, priority = 3}, -- Mana Tide Totem - [string_lower("Mana Spring Totem")] = {id = 5675,texture = select(3, GetSpellInfo(5675)), color = {r = 0, g = 0, b = 0, a = 1}, enabled = true, priority = 1}, -- Mana Spring Totem - -- Earth - [string_lower("Earthbind Totem")] = {id = 2484,texture = select(3, GetSpellInfo(2484)), color = {r = 0.5, g = 0.5, b = 0.5, a = 1}, enabled = true, priority = 1}, -- Earthbind Totem - [string_lower("Stoneclaw Totem")] = {id = 5730,texture = select(3, GetSpellInfo(5730)), color = {r = 0, g = 0, b = 0, a = 1}, enabled = true, priority = 0}, -- Stoneclaw Totem - [string_lower("Stoneskin Totem")] = {id = 8071,texture = select(3, GetSpellInfo(8071)), color = {r = 0, g = 0, b = 0, a = 1}, enabled = true, priority = 0}, -- Stoneskin Totem - [string_lower("Strength of Earth Totem")] = {id = 8075,texture = select(3, GetSpellInfo(8075)), color = {r = 0, g = 0, b = 0, a = 1}, enabled = true, priority = 0}, -- Strength of Earth Totem - [string_lower("Earth Elemental Totem")] = {id = 33663,texture = select(3, GetSpellInfo(33663)), color = {r = 0, g = 0, b = 0, a = 1}, enabled = true, priority = 0}, -- Earth Elemental Totem - [string_lower("Tremor Totem")] = {id = 8143,texture = select(3, GetSpellInfo(8143)), color = {r = 1, g = 0.9, b = 0.1, a = 1}, enabled = true, priority = 3}, -- Tremor Totem - -- Air - [string_lower("Grounding Totem")] = {id = 8177,texture = select(3, GetSpellInfo(8177)), color = {r = 0, g = 0.53, b = 0.92, a = 1}, enabled = true, priority = 3}, -- Grounding Totem - [string_lower("Grace of Air Totem")] = {id = 8835,texture = select(3, GetSpellInfo(8835)), color = {r = 0, g = 0, b = 0, a = 1}, enabled = true, priority = 0}, -- Grace of Air Totem - [string_lower("Nature Resistance Totem")] = {id = 10595,texture = select(3, GetSpellInfo(10595)), color = {r = 0, g = 0, b = 0, a = 1}, enabled = true, priority = 0}, -- Nature Resistance Totem - [string_lower("Windfury Totem")] = {id = 8512,texture = select(3, GetSpellInfo(8512)), color = {r = 0.96, g = 0, b = 0.07, a = 1}, enabled = true, priority = 2}, -- Windfury Totem - [string_lower("Sentry Totem")] = {id = 6495, texture = select(3, GetSpellInfo(6495)), color = {r = 0, g = 0, b = 0, a = 1}, enabled = true, priority = 0}, -- Sentry Totem - [string_lower("Windwall Totem")] = {id = 15107,texture = select(3, GetSpellInfo(15107)), color = {r = 0, g = 0, b = 0, a = 1}, enabled = true, priority = 0}, -- Windwall Totem - [string_lower("Wrath of Air Totem")] = {id = 3738,texture = select(3, GetSpellInfo(3738)), color = {r = 0, g = 0, b = 0, a = 1}, enabled = true, priority = 0}, -- Wrath of Air Totem - [string_lower("Tranquil Air Totem")] = {id = 25908,texture = select(3, GetSpellInfo(25908)), color = {r = 0, g = 0, b = 0, a = 1}, enabled = true, priority = 0}, -- Tranquil Air Totem -} -local localizedTotemData = { - ["default"] = { - [string_lower(select(1, GetSpellInfo(3599)))] = totemData[string_lower("Searing Totem")], -- Searing Totem - [string_lower(select(1, GetSpellInfo(8227)))] = totemData[string_lower("Flametongue Totem")], -- Flametongue Totem - [string_lower(select(1, GetSpellInfo(8190)))] = totemData[string_lower("Magma Totem")], -- Magma Totem - [string_lower(select(1, GetSpellInfo(1535)))] = totemData[string_lower("Fire Nova Totem")], -- Fire Nova Totem - [string_lower(select(1, GetSpellInfo(30706)))] = totemData[string_lower("Totem of Wrath")], -- Totem of Wrath - [string_lower(select(1, GetSpellInfo(32982)))] = totemData[string_lower("Fire Elemental Totem")], -- Fire Elemental Totem - [string_lower(select(1, GetSpellInfo(8181)))] = totemData[string_lower("Frost Resistance Totem")], -- Frost Resistance Totem - -- Water - [string_lower(select(1, GetSpellInfo(8184)))] = totemData[string_lower("Fire Resistance Totem")], -- Fire Resistance Totem - [string_lower(select(1, GetSpellInfo(8166)))] = totemData[string_lower("Poison Cleansing Totem")], -- Poison Cleansing Totem - [string_lower(select(1, GetSpellInfo(8170)))] = totemData[string_lower("Disease Cleansing Totem")], -- Disease Cleansing Totem - [string_lower(select(1, GetSpellInfo(5394)))] = totemData[string_lower("Healing Stream Totem")], -- Healing Stream Totem - [string_lower(select(1, GetSpellInfo(16190)))] = totemData[string_lower("Mana Tide Totem")], -- Mana Tide Totem - [string_lower(select(1, GetSpellInfo(5675)))] = totemData[string_lower("Mana Spring Totem")], -- Mana Spring Totem - -- Earth - [string_lower(select(1, GetSpellInfo(2484)))] = totemData[string_lower("Earthbind Totem")], -- Earthbind Totem - [string_lower(select(1, GetSpellInfo(5730)))] = totemData[string_lower("Stoneclaw Totem")], -- Stoneclaw Totem - [string_lower(select(1, GetSpellInfo(8071)))] = totemData[string_lower("Stoneskin Totem")], -- Stoneskin Totem - [string_lower(select(1, GetSpellInfo(8075)))] = totemData[string_lower("Strength of Earth Totem")], -- Strength of Earth Totem - [string_lower(select(1, GetSpellInfo(33663)))] = totemData[string_lower("Earth Elemental Totem")], -- Earth Elemental Totem - [string_lower(select(1, GetSpellInfo(8143)))] = totemData[string_lower("Tremor Totem")], -- Tremor Totem - -- Air - [string_lower(select(1, GetSpellInfo(8177)))] = totemData[string_lower("Grounding Totem")], -- Grounding Totem - [string_lower(select(1, GetSpellInfo(8835)))] = totemData[string_lower("Grace of Air Totem")], -- Grace of Air Totem - [string_lower(select(1, GetSpellInfo(10595)))] = totemData[string_lower("Nature Resistance Totem")], -- Nature Resistance Totem - [string_lower(select(1, GetSpellInfo(8512)))] = totemData[string_lower("Windfury Totem")], -- Windfury Totem - [string_lower(select(1, GetSpellInfo(6495)))] = totemData[string_lower("Sentry Totem")], -- Sentry Totem - [string_lower(select(1, GetSpellInfo(15107)))] = totemData[string_lower("Windwall Totem")], -- Windwall Totem - [string_lower(select(1, GetSpellInfo(3738)))] = totemData[string_lower("Wrath of Air Totem")], -- Wrath of Air Totem - [string_lower(select(1, GetSpellInfo(25908)))] = totemData[string_lower("Tranquil Air Totem")], -- Tranquil Air Totem - }, - ["frFR"] = { - [string_lower("Totem d'\195\169lementaire de terre")] = totemData[string_lower("Earth Elemental Totem")], -- Earth Elemental Totem - [string_lower("Totem d'\195\169lementaire de feu")] = totemData[string_lower("Fire Elemental Totem")], -- Fire Elemental Totem - }, - ["ruRU"] = { - [string_lower("")] = totemData[string_lower("Sentry Totem")], -- Sentry Totem - } -} - local function GetTotemColorDefaultOptions() local defaultDB = {} local options = {} local indexedList = {} for k,v in pairs(totemData) do - tinsert(indexedList, {name = k, id = v.id, color = v.color, texture = v.texture, enabled = v.enabled}) + tinsert(indexedList, {name = k, id = v.id, color = v.color, texture = v.texture}) end table.sort(indexedList, function (a, b) return a.name < b.name end) for i=1,#indexedList do - defaultDB["totem" .. indexedList[i].id] = {color = indexedList[i].color, enabled = indexedList[i].enabled, alpha = 0.6, customText = ""} + defaultDB["totem" .. indexedList[i].id] = {color = indexedList[i].color, enabled = true, alpha = 0.6, customText = ""} options["npTotemsHideDisabledTotems"] = { order = 1, name = L["Hide Disabled Totem Plates"], @@ -186,17 +112,13 @@ local function GetTotemColorDefaultOptions() return defaultDB, options, indexedList end -function Gladdy:GetTotemColors() - return GetTotemColorDefaultOptions() -end - --------------------------------------------------- -- Core --------------------------------------------------- -local TotemPlates = Gladdy:NewModule("Totem Plates", nil, { +local TotemPlates = Gladdy:NewModule("Totem Plates", 2, { npTotems = true, npTotemsShowFriendly = true, npTotemsShowEnemy = true, @@ -214,9 +136,6 @@ local TotemPlates = Gladdy:NewModule("Totem Plates", nil, { npTotemsHideDisabledTotems = false, }) -LibStub("AceHook-3.0"):Embed(TotemPlates) -LibStub("AceTimer-3.0"):Embed(TotemPlates) - function TotemPlates.OnEvent(self, event, ...) TotemPlates[event](self, ...) end @@ -225,19 +144,18 @@ function TotemPlates:Initialize() self.numChildren = 0 self.activeTotemNameplates = {} self.totemPlateCache = {} - self:RegisterEvent("PLAYER_ENTERING_WORLD") - self:RegisterEvent("NAME_PLATE_UNIT_ADDED") - self:RegisterEvent("NAME_PLATE_UNIT_REMOVED") - self:RegisterEvent("PLAYER_TARGET_CHANGED") - self:RegisterEvent("UNIT_NAME_UPDATE") - self:SetScript("OnEvent", TotemPlates.OnEvent) + if Gladdy.db.npTotems then + self:RegisterEvent("PLAYER_ENTERING_WORLD") + self:RegisterEvent("NAME_PLATE_UNIT_ADDED") + self:RegisterEvent("NAME_PLATE_UNIT_REMOVED") + self:RegisterEvent("PLAYER_TARGET_CHANGED") + self:SetScript("OnEvent", TotemPlates.OnEvent) + end if Gladdy.db.npTotems and Gladdy.db.npTotemsShowEnemy then - --GetCVar("nameplateShowEnemyTotems") - --SetCVar("nameplateShowEnemyTotems", true); + SetCVar("nameplateShowEnemyTotems", true); end if Gladdy.db.npTotems and Gladdy.db.npTotemsShowFriendly then - --GetCVar("nameplateShowFriendlyTotems") - --SetCVar("nameplateShowFriendlyTotems", true); + SetCVar("nameplateShowFriendlyTotems", true); end self.addon = "Blizzard" if (IsAddOnLoaded("Plater")) then @@ -261,17 +179,67 @@ function TotemPlates:Initialize() end end +--------------------------------------------------- + +-- Events + +--------------------------------------------------- + function TotemPlates:PLAYER_ENTERING_WORLD() self.numChildren = 0 self.activeTotemNameplates = {} end -function TotemPlates:Reset() - --self:CancelAllTimers() - --self:UnhookAll() +function TotemPlates:PLAYER_TARGET_CHANGED() + for k,nameplate in pairs(self.activeTotemNameplates) do + TotemPlates:SetTotemAlpha(nameplate.gladdyTotemFrame, k) + end end +function TotemPlates:NAME_PLATE_UNIT_ADDED(unitID) + self:OnUnitEvent(unitID) +end + +function TotemPlates:NAME_PLATE_UNIT_REMOVED(unitID) + local nameplate = C_NamePlate.GetNamePlateForUnit(unitID) + self.activeTotemNameplates[unitID] = nil + --self:ToggleAddon(nameplate, true) + if nameplate.gladdyTotemFrame then + nameplate.gladdyTotemFrame:Hide() + nameplate.gladdyTotemFrame:SetParent(nil) + tinsert(self.totemPlateCache, nameplate.gladdyTotemFrame) + nameplate.gladdyTotemFrame = nil + end +end + +--------------------------------------------------- + +-- Gladdy Call + +--------------------------------------------------- + function TotemPlates:UpdateFrameOnce() + if Gladdy.db.npTotems then + self:RegisterEvent("PLAYER_ENTERING_WORLD") + self:RegisterEvent("NAME_PLATE_UNIT_ADDED") + self:RegisterEvent("NAME_PLATE_UNIT_REMOVED") + self:RegisterEvent("PLAYER_TARGET_CHANGED") + self:SetScript("OnEvent", TotemPlates.OnEvent) + else + self:UnregisterEvent("PLAYER_ENTERING_WORLD") + self:UnregisterEvent("NAME_PLATE_UNIT_ADDED") + self:UnregisterEvent("NAME_PLATE_UNIT_REMOVED") + self:UnregisterEvent("PLAYER_TARGET_CHANGED") + self:SetScript("OnEvent", nil) + end + + if Gladdy.db.npTotems and Gladdy.db.npTotemsShowEnemy then + SetCVar("nameplateShowEnemyTotems", true); + end + if Gladdy.db.npTotems and Gladdy.db.npTotemsShowFriendly then + SetCVar("nameplateShowFriendlyTotems", true); + end + for k,nameplate in pairs(self.activeTotemNameplates) do local totemDataEntry = nameplate.gladdyTotemFrame.totemDataEntry nameplate.gladdyTotemFrame:SetWidth(Gladdy.db.npTotemPlatesSize * Gladdy.db.npTotemPlatesWidthFactor) @@ -398,11 +366,7 @@ function TotemPlates:GetAddonFrame(nameplate) end end -function TotemPlates:PLAYER_TARGET_CHANGED() - for k,nameplate in pairs(self.activeTotemNameplates) do - TotemPlates:SetTotemAlpha(nameplate.gladdyTotemFrame, k) - end -end + function TotemPlates:ToggleAddon(nameplate, show) local addonFrames = { self:GetAddonFrame(nameplate) } @@ -448,12 +412,14 @@ function TotemPlates:OnUnitEvent(unitID) self:ToggleAddon(nameplate, true) return end - local nameplateName = UnitName(unitID) - local totemName = string_gsub(nameplateName, "^%s+", "") --trim - totemName = string_gsub(totemName, "%s+$", "") --trim - totemName = string_gsub(totemName, "%s+[I,V,X]+$", "") --trim rank - totemName = string_lower(totemName) - local totemDataEntry = localizedTotemData["default"][totemName] or localizedTotemData["frFR"][totemName] or localizedTotemData["ruRU"][totemName] + local npcType, _, _, _, _, npcId = strsplit("-", UnitGUID(unitID)) + if npcType ~= "Creature" then + return + end + local totemDataEntry = npcIdToTotemData[tonumber(npcId)] + if not totemDataEntry then + return + end if totemDataEntry and Gladdy.db.npTotemColors["totem" .. totemDataEntry.id].enabled then-- modify this nameplates if #self.totemPlateCache > 0 then nameplate.gladdyTotemFrame = tremove(self.totemPlateCache, #self.totemPlateCache) @@ -490,27 +456,6 @@ function TotemPlates:OnUnitEvent(unitID) end end -function TotemPlates:NAME_PLATE_UNIT_ADDED(...) - self:OnUnitEvent(...) -end - -function TotemPlates:UNIT_NAME_UPDATE(...) - self:OnUnitEvent(...) -end - -function TotemPlates:NAME_PLATE_UNIT_REMOVED(...) - local unitID = ... - local nameplate = C_NamePlate.GetNamePlateForUnit(unitID) - self.activeTotemNameplates[unitID] = nil - --self:ToggleAddon(nameplate, true) - if nameplate.gladdyTotemFrame then - nameplate.gladdyTotemFrame:Hide() - nameplate.gladdyTotemFrame:SetParent(nil) - tinsert(self.totemPlateCache, nameplate.gladdyTotemFrame) - nameplate.gladdyTotemFrame = nil - end -end - function TotemPlates:SetTotemAlpha(gladdyTotemFrame, unitID) local targetExists = UnitExists("target") local totemDataEntry = gladdyTotemFrame.totemDataEntry @@ -535,6 +480,64 @@ end --------------------------------------------------- +-- Test + +--------------------------------------------------- + +function TotemPlates:TestOnce() + if not self.testFrame then + self.testFrame = CreateFrame("Frame", nil, UIParent) + self.testFrame:SetWidth(1) + self.testFrame:SetHeight(32) + self.testFrame:SetPoint("CENTER", UIParent, "CENTER", 0, -140) + end + local totemDataEntry = npcIdToTotemData[5913] + self.testFrame:Show() + if not self.testFrame.gladdyTotemFrame then + if #self.totemPlateCache > 0 then + self.testFrame.gladdyTotemFrame = tremove(self.totemPlateCache, #self.totemPlateCache) + else + self:CreateTotemFrame(self.testFrame) + self.testFrame.gladdyTotemFrame:SetScript("OnHide", nil) + self.testFrame.gladdyTotemFrame:SetScript("OnUpdate", nil) + end + end + if Gladdy.db.npTotems then + self.testFrame.gladdyTotemFrame.unitID = "player" + self.testFrame.gladdyTotemFrame.totemDataEntry = totemDataEntry + self.testFrame.gladdyTotemFrame.parent = self.testFrame + self.testFrame.gladdyTotemFrame:SetParent(self.testFrame) + self.testFrame.gladdyTotemFrame:ClearAllPoints() + self.testFrame.gladdyTotemFrame:SetPoint("CENTER", self.testFrame, "CENTER", 0, 0) + self.testFrame.gladdyTotemFrame.totemIcon:SetTexture(totemDataEntry.texture) + self.testFrame.gladdyTotemFrame.totemBorder:SetVertexColor(Gladdy.db.npTotemColors["totem" .. totemDataEntry.id].color.r, + Gladdy.db.npTotemColors["totem" .. totemDataEntry.id].color.g, + Gladdy.db.npTotemColors["totem" .. totemDataEntry.id].color.b, + Gladdy.db.npTotemColors["totem" .. totemDataEntry.id].color.a) + self.testFrame.gladdyTotemFrame.totemName:SetText(Gladdy.db.npTotemColors["totem" .. totemDataEntry.id].customText or "") + self.testFrame.gladdyTotemFrame.parent = self.testFrame + self.testFrame.gladdyTotemFrame:Show() + self.activeTotemNameplates["player"] = self.testFrame + else + self.testFrame.gladdyTotemFrame:Hide() + end +end + +function TotemPlates:Reset() + if self.testFrame then + if self.testFrame.gladdyTotemFrame then + self.testFrame.gladdyTotemFrame:Hide() + self.testFrame.gladdyTotemFrame:SetParent(nil) + tinsert(self.totemPlateCache, self.testFrame.gladdyTotemFrame) + self.testFrame.gladdyTotemFrame = nil + end + self.testFrame:Hide() + self.activeTotemNameplates["player"] = nil + end +end + +--------------------------------------------------- + -- Interface options --------------------------------------------------- @@ -549,21 +552,23 @@ function TotemPlates:GetOptions() npTotems = Gladdy:option({ type = "toggle", name = L["Enabled"], - desc = L["Turns totem icons instead of nameplates on or off. (Requires reload)"], + desc = L["Turns totem icons instead of nameplates on or off."], order = 3, width = 0.9, }), npTotemsShowFriendly = Gladdy:option({ type = "toggle", name = L["Show friendly"], - desc = L["Turns totem icons instead of nameplates on or off. (Requires reload)"], + desc = L["Turns totem icons instead of nameplates on or off."], + disabled = function() return not Gladdy.db.npTotems end, order = 4, width = 0.65, }), npTotemsShowEnemy = Gladdy:option({ type = "toggle", name = L["Show enemy"], - desc = L["Turns totem icons instead of nameplates on or off. (Requires reload)"], + desc = L["Turns totem icons instead of nameplates on or off."], + disabled = function() return not Gladdy.db.npTotems end, order = 5, width = 0.6, }), @@ -571,6 +576,7 @@ function TotemPlates:GetOptions() type = "group", childGroups = "tree", name = L["Frame"], + disabled = function() return not Gladdy.db.npTotems end, order = 4, args = { icon = { @@ -765,7 +771,8 @@ function TotemPlates:GetOptions() name = L["Customize Totems"], type = "group", childGroups = "tree", - args = select(2, Gladdy:GetTotemColors()) + disabled = function() return not Gladdy.db.npTotems end, + args = select(2, GetTotemColorDefaultOptions()) }, } end \ No newline at end of file From 27573b75306c789239dc7e92503866dbc205fc66 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Thu, 3 Mar 2022 23:37:42 +0100 Subject: [PATCH 25/51] cooldown refactor + positioning --- Constants.lua | 55 ++++++-- Images/downarrow.blp | Bin 0 -> 2564 bytes Images/uparrow.blp | Bin 0 -> 2564 bytes Modules/Cooldowns.lua | 307 ++++++++++++++++++++++++++++++------------ 4 files changed, 268 insertions(+), 94 deletions(-) create mode 100644 Images/downarrow.blp create mode 100644 Images/uparrow.blp diff --git a/Constants.lua b/Constants.lua index 8df815c..3f39ba3 100644 --- a/Constants.lua +++ b/Constants.lua @@ -13,6 +13,34 @@ tbl_sort(Gladdy.CLASSES) Gladdy.RACES = {"Scourge", "BloodElf", "Tauren", "Orc", "Troll", "NightElf", "Draenei", "Human", "Gnome", "Dwarf"} tbl_sort(Gladdy.RACES) +local RACE_ICON_TCOORDS = { + ["HUMAN_MALE"] = {0, 0.125, 0, 0.25}, + ["DWARF_MALE"] = {0.125, 0.25, 0, 0.25}, + ["GNOME_MALE"] = {0.25, 0.375, 0, 0.25}, + ["NIGHTELF_MALE"] = {0.375, 0.5, 0, 0.25}, + + ["TAUREN_MALE"] = {0, 0.125, 0.25, 0.5}, + ["SCOURGE_MALE"] = {0.125, 0.25, 0.25, 0.5}, + ["TROLL_MALE"] = {0.25, 0.375, 0.25, 0.5}, + ["ORC_MALE"] = {0.375, 0.5, 0.25, 0.5}, + + ["HUMAN_FEMALE"] = {0, 0.125, 0.5, 0.75}, + ["DWARF_FEMALE"] = {0.125, 0.25, 0.5, 0.75}, + ["GNOME_FEMALE"] = {0.25, 0.375, 0.5, 0.75}, + ["NIGHTELF_FEMALE"] = {0.375, 0.5, 0.5, 0.75}, + + ["TAUREN_FEMALE"] = {0, 0.125, 0.75, 1.0}, + ["SCOURGE_FEMALE"] = {0.125, 0.25, 0.75, 1.0}, + ["TROLL_FEMALE"] = {0.25, 0.375, 0.75, 1.0}, + ["ORC_FEMALE"] = {0.375, 0.5, 0.75, 1.0}, + + ["BLOODELF_MALE"] = {0.5, 0.625, 0.25, 0.5}, + ["BLOODELF_FEMALE"] = {0.5, 0.625, 0.75, 1.0}, + + ["DRAENEI_MALE"] = {0.5, 0.625, 0, 0.25}, + ["DRAENEI_FEMALE"] = {0.5, 0.625, 0.5, 0.75}, +} + local specBuffs = { -- DRUID [GetSpellInfo(45283)] = L["Restoration"], -- Natural Perfection @@ -958,23 +986,28 @@ local cooldownList = { [19503] = 30, -- Scatter Shot [14327] = 30, -- Scare Beast [19263] = 300, -- Deterrence; not on BM but can't do 2 specs - [14311] = { cd = 30, -- Freezing Trap - sharedCD = { - [13809] = true, -- Frost Trap - [34600] = true, -- Snake Trap - }, - }, + + [13809] = { cd = 30, -- Frost Trap sharedCD = { [14311] = true, -- Freezing Trap [34600] = true, -- Snake Trap }, + icon = select(3, GetSpellInfo(14311)), + }, + [14311] = { cd = 30, -- Freezing Trap + sharedCD = { + [13809] = true, -- Frost Trap + [34600] = true, -- Snake Trap + }, + icon = select(3, GetSpellInfo(14311)), }, [34600] = { cd = 30, -- Snake Trap sharedCD = { [14311] = true, -- Freezing Trap [13809] = true, -- Frost Trap }, + icon = select(3, GetSpellInfo(14311)), }, [34490] = { cd = 20, spec = L["Marksmanship"], }, -- Silencing Shot [19386] = { cd = 60, spec = L["Survival"], }, -- Wyvern Sting @@ -1024,19 +1057,19 @@ local cooldownList = { }, ["NightElf"] = { - [2651] = { cd = 180, spec = L["Discipline"], }, -- Elune's Grace - [10797] = { cd = 30, spec = L["Discipline"], }, -- Star Shards + [2651] = { cd = 180, spec = L["Discipline"], class = "PRIEST"}, -- Elune's Grace + [10797] = { cd = 30, spec = L["Discipline"], class = "PRIEST"}, -- Star Shards }, ["Draenei"] = { - [32548] = { cd = 300, spec = L["Discipline"], }, -- Hymn of Hope + [32548] = { cd = 300, spec = L["Discipline"], class = "PRIEST"}, -- Hymn of Hope }, ["Human"] = { - [13908] = { cd = 600, spec = L["Discipline"], }, -- Desperate Prayer + [13908] = { cd = 600, spec = L["Discipline"], class = "PRIEST"}, -- Desperate Prayer }, ["Gnome"] = { }, ["Dwarf"] = { - [13908] = { cd = 600, spec = L["Discipline"], }, -- Desperate Prayer + [13908] = { cd = 600, spec = L["Discipline"], class = "PRIEST"}, -- Desperate Prayer }, } function Gladdy:GetCooldownList() diff --git a/Images/downarrow.blp b/Images/downarrow.blp new file mode 100644 index 0000000000000000000000000000000000000000..464f90c425313603346b6165e22ea5d2adf9bdd7 GIT binary patch literal 2564 zcmbtVeM}Tb6n}SM1RKfGHfc;S?46#~s%b3RXqw7_B9eaab)(p50$8c?N84x{+8Tot zFnci-L}_npWR!Ddr%rMW*IX9CVdfb%%704^%j;)S6pZ=Ox>SvftO&t@tsdE5~bx?D!(xSheZpUL28a_R50j;E`b@9#F@6lSG z65LDn7S4!=tVw@>{+jFt!XDEemP$;%BxEn&7iD{GKS#hkmmY?H_JV$IeizmY}G}ruD^1StlQ-q74LR~Dj{4Bi!iiki@ z`6giWk$3M^QO}gSgQ8wmzE^X03w&W*=J~=GQ)4O;4Iy3{{*wMxX)CG2p#G}#t3UtD zP8;ILiD$+BZF64~?IFAO|B(LVOR^NFsORC=MSfOX<%1a_PI&tFB0r8ob+(`V*{r{; z`)vThd#XNH*n=4-&;7Q*Wl7RM8uvhwu!kjYjo-m|7LS$h10q6!Z=z6#4 z_x%fHA3Rtt{S`CsKPx{G_V@oD5O&Kwg<^HC+b8ySbV+{8ezC`OlXznJ!OSly#{T7U z>2ICSiQgbm53%7$dlaWVC4LSbjRy~71xlb=L0;tVD^`2-e4%gf8cuLOb^m`xEn(ust4zpgGvI^!EWJx1NHh& zrKg#<3^fOub`2md@FKq)ZCx(NMtM^H;&REao%410{63ZH!*A(2=MjF6cSJ@F1*Xkw zZ{$NfFw_+Axo;}48u^+uAD&E1dg`H^XJotRM=BthwlGgJDyo~tr?&or=5jDg9Xc9YD$PG)sa^=(ES(5It zd>CDEeCHXXeq*c=yT;`T1}_^M@!tW@!zDJxRz$H4=0U6N7pxCsYuD%X<$X(|YMBDH zSy@?{=2I^jzwtv|RSw1`615K1Z+yc8vj^=bl_LE{z{6ZAzo!56YUx7_19S_u7 zbiM=IJeZ+j z1Um^=EyH{fx7y~48#uI8#)ITzgJCT^R#IJ(z$P{_+RWaRGrLP1tn%ZJ!as%8 zVD;EF& literal 0 HcmV?d00001 diff --git a/Images/uparrow.blp b/Images/uparrow.blp new file mode 100644 index 0000000000000000000000000000000000000000..421372b7c810453a844e162cc1f536fff565be44 GIT binary patch literal 2564 zcmbtVe@xV67=P}-0GsTnwseE|-r13)t`)Y)nsA_qE{h-DE81*RC{+H)rfW2;@l*G` zRpKw|4w;xi^S)e`8!P2ZG{isbZnO?IOHYZAH63J2E4PEU=Xu}n7x0#4^Lh93-sgRO ze4gidpW|{@6+UMI0CT*_q~J;WKrHTf+z9~vxQB7y!W}ykmG>j)4;a*ehh^H1+~yqN zzYF>{dq_-Womf@`?;`XkqM`f{Y%#&o~%&;#l^U zhIykaV*0aRa7z6govGP7UXYpw5MBoje^wjxH?z%HHldoY(ihN4dO8=4Jh_R^ie&#@ zvNv!}EaXl31N1cH?<4Hc?P0OR}Lk%_2|x zN0)x#B7ceLlHwV0jJSrM<*KYBI-J2%Wf?nGy z>BkrDCq#dfZwE!cjC==Iz9;a-F`4J%AH+pBLD zi1*B%0$~q&oI?A{0+%OB|H-(A5`{fH|I*kkjA!r|`A!fK3S>z=%eG4BT! z$~lu>RUO`^u?=Dq8U-RF$#{1{!=e zV8FP@W$9N1=yOk8>u`K#7yzmgIL7hjlzSxg_e1T722Fm zXNTXV(u&VT1IC!YLseC`yX#yjfQDGp5Ub6TdhL?xrnP%Jz|*LYG>$h$aJBoakheTP zKL)vJP4*+2U$FC*!`l=4-8Qrz7#QHhO{=Zb2KgxW%fF#Q@@tWAk~=a`A-J{idVL?KwxZ)^YY5NQtU4dpv0Ax zrBV1u1&zm~zTCD$+Ve)fZnu58+2jM*xONRQC9d)$87go=y{R)@1j1U22Qk=Q{5rT(bVO`D?K#{%REIUD!QXq`>PaH~8hS3*Yx_ zrxKqq&KPeAe}>Rq7F6KPYR07ZX|v()7`3#66?;L$0kGuNadtXcO$j6 1) then + local current = Gladdy.db.cooldownCooldownsOrder[class][tostring(spellId)] + local next + for k,v in pairs(Gladdy.db.cooldownCooldownsOrder[class]) do + if v == current - 1 then + next = k + end + end + Gladdy.db.cooldownCooldownsOrder[class][tostring(spellId)] = Gladdy.db.cooldownCooldownsOrder[class][tostring(spellId)] - 1 + Gladdy.db.cooldownCooldownsOrder[class][next] = Gladdy.db.cooldownCooldownsOrder[class][next] + 1 + Gladdy.options.args["Cooldowns"].args.cooldowns.args[class].args[tostring(spellId)].order = Gladdy.db.cooldownCooldownsOrder[class][tostring(spellId)] + Gladdy.options.args["Cooldowns"].args.cooldowns.args[class].args[next].order = Gladdy.db.cooldownCooldownsOrder[class][next] + Gladdy:UpdateFrame() + end + end, + }, + downarrow = { + type = "execute", + name = "", + order = 3, + width = 0.1, + image = "Interface\\Addons\\Gladdy\\Images\\downarrow", + imageWidth = 20, + imageHeight = 20, + func = function() + if (Gladdy.db.cooldownCooldownsOrder[class][tostring(spellId)] < tblLength) then + local current = Gladdy.db.cooldownCooldownsOrder[class][tostring(spellId)] + local next + for k,v in pairs(Gladdy.db.cooldownCooldownsOrder[class]) do + if v == current + 1 then + next = k + end + end + Gladdy.db.cooldownCooldownsOrder[class][tostring(spellId)] = Gladdy.db.cooldownCooldownsOrder[class][tostring(spellId)] + 1 + Gladdy.db.cooldownCooldownsOrder[class][next] = Gladdy.db.cooldownCooldownsOrder[class][next] - 1 + Gladdy.options.args["Cooldowns"].args.cooldowns.args[class].args[tostring(spellId)].order = Gladdy.db.cooldownCooldownsOrder[class][tostring(spellId)] + Gladdy.options.args["Cooldowns"].args.cooldowns.args[class].args[next].order = Gladdy.db.cooldownCooldownsOrder[class][next] + Gladdy:UpdateFrame() + end + end, + } + } } - o = o + 1 end p = p + i end for i,race in ipairs(Gladdy.RACES) do - group[race] = { - type = "group", - name = L[race], - order = i + p, - icon = "Interface\\Glues\\CharacterCreate\\UI-CharacterCreate-Races", - iconCoords = RACE_ICON_TCOORDS[upper(race) .. "_FEMALE"], - args = {} - } - local o = 1 for spellId,cooldown in pairs(Gladdy:GetCooldownList()[race]) do - group[race].args[tostring(spellId)] = { - type = "toggle", - name = select(1, GetSpellInfo(spellId)) .. (type(cooldown) == "table" and cooldown.spec and (" - " .. cooldown.spec) or ""), - order = o, - width = "full", - image = select(3, GetSpellInfo(spellId)), - get = function() - return Gladdy.db.cooldownCooldowns[tostring(spellId)] - end, - set = function(_, value) - Gladdy.db.cooldownCooldowns[tostring(spellId)] = value - Gladdy:UpdateFrame() - end + local tblLength = tableLength(Gladdy.db.cooldownCooldownsOrder[cooldown.class]) + local class = cooldown.class + group[class].args[tostring(spellId)] = { + name = "", + type = "group", + inline = true, + order = Gladdy.db.cooldownCooldownsOrder[class][tostring(spellId)], + args = { + toggle = { + type = "toggle", + name = select(1, GetSpellInfo(spellId)) .. (type(cooldown) == "table" and cooldown.spec and (" - " .. cooldown.spec) or ""), + order = 1, + width = 1.1, + image = select(3, GetSpellInfo(spellId)), + get = function() + return Gladdy.db.cooldownCooldowns[tostring(spellId)] + end, + set = function(_, value) + Gladdy.db.cooldownCooldowns[tostring(spellId)] = value + Gladdy:UpdateFrame() + end + }, + uparrow = { + type = "execute", + name = "", + order = 2, + width = 0.1, + image = "Interface\\Addons\\Gladdy\\Images\\uparrow", + imageWidth = 20, + imageHeight = 20, + func = function() + if (Gladdy.db.cooldownCooldownsOrder[class][tostring(spellId)] > 1) then + local current = Gladdy.db.cooldownCooldownsOrder[class][tostring(spellId)] + local next + for k,v in pairs(Gladdy.db.cooldownCooldownsOrder[class]) do + if v == current - 1 then + next = k + end + end + Gladdy.db.cooldownCooldownsOrder[class][tostring(spellId)] = Gladdy.db.cooldownCooldownsOrder[class][tostring(spellId)] - 1 + Gladdy.db.cooldownCooldownsOrder[class][next] = Gladdy.db.cooldownCooldownsOrder[class][next] + 1 + Gladdy.options.args["Cooldowns"].args.cooldowns.args[class].args[tostring(spellId)].order = Gladdy.db.cooldownCooldownsOrder[class][tostring(spellId)] + Gladdy.options.args["Cooldowns"].args.cooldowns.args[class].args[next].order = Gladdy.db.cooldownCooldownsOrder[class][next] + Gladdy:UpdateFrame() + end + end, + }, + downarrow = { + type = "execute", + name = "", + order = 3, + width = 0.1, + image = "Interface\\Addons\\Gladdy\\Images\\downarrow", + imageWidth = 20, + imageHeight = 20, + func = function() + if (Gladdy.db.cooldownCooldownsOrder[class][tostring(spellId)] < tblLength) then + local current = Gladdy.db.cooldownCooldownsOrder[class][tostring(spellId)] + local next + for k,v in pairs(Gladdy.db.cooldownCooldownsOrder[class]) do + if v == current + 1 then + next = k + end + end + Gladdy.db.cooldownCooldownsOrder[class][tostring(spellId)] = Gladdy.db.cooldownCooldownsOrder[class][tostring(spellId)] + 1 + Gladdy.db.cooldownCooldownsOrder[class][next] = Gladdy.db.cooldownCooldownsOrder[class][next] - 1 + Gladdy.options.args["Cooldowns"].args.cooldowns.args[class].args[tostring(spellId)].order = Gladdy.db.cooldownCooldownsOrder[class][tostring(spellId)] + Gladdy.options.args["Cooldowns"].args.cooldowns.args[class].args[next].order = Gladdy.db.cooldownCooldownsOrder[class][next] + Gladdy:UpdateFrame() + end + end, + } + } } - o = o + 1 end end return group From 907c64a864f33b97e0ff1648d2dec5da134f58ba Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Thu, 3 Mar 2022 23:38:05 +0100 Subject: [PATCH 26/51] grouping first step --- Modules/Classicon.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Modules/Classicon.lua b/Modules/Classicon.lua index e20ce46..d9c476a 100644 --- a/Modules/Classicon.lua +++ b/Modules/Classicon.lua @@ -15,6 +15,8 @@ local Classicon = Gladdy:NewModule("Class Icon", 81, { classIconYOffset = 0, classIconFrameStrata = "MEDIUM", classIconFrameLevel = 5, + classIconGroup = false, + classIconGroupDirection = "RIGHT" }) local classIconPath = "Interface\\Addons\\Gladdy\\Images\\Classes\\" @@ -133,6 +135,14 @@ function Classicon:UpdateFrame(unit) Gladdy:SetPosition(classIcon, unit, "classIconXOffset", "classIconYOffset", Classicon:LegacySetPosition(classIcon, unit), Classicon) + if (Gladdy.db.classIconGroup) then + if (unit ~= "arena1") then + local previousUnit = "arena" .. string.gsub(unit, "arena", "") - 1 + self.frames[unit]:ClearAllPoints() + self.frames[unit]:SetPoint("LEFT", self.frames[previousUnit], "RIGHT", 0, 0) + end + end + if (unit == "arena1") then Gladdy:CreateMover(classIcon, "classIconXOffset", "classIconYOffset", L["Class Icon"], {"TOPLEFT", "TOPLEFT"}, From b14406f75f2ac3d9674f63ac25c5f9437db18e7c Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Thu, 3 Mar 2022 23:38:28 +0100 Subject: [PATCH 27/51] totempulse --- Modules/TotemPulse.lua | 641 +++++++++++++++++++++++++++++++---------- 1 file changed, 489 insertions(+), 152 deletions(-) diff --git a/Modules/TotemPulse.lua b/Modules/TotemPulse.lua index a2a49a9..6cc6c5e 100644 --- a/Modules/TotemPulse.lua +++ b/Modules/TotemPulse.lua @@ -1,57 +1,120 @@ +local select, pairs, tremove, tinsert, format, strsplit, tonumber = select, pairs, tremove, tinsert, format, strsplit, tonumber local C_NamePlate = C_NamePlate local Gladdy = LibStub("Gladdy") local L = Gladdy.L -local tremove, tinsert = tremove, tinsert local GetSpellInfo, CreateFrame = GetSpellInfo, CreateFrame -local GetTime, GetPlayerInfoByGUID, UnitIsEnemy, UnitGUID = GetTime, GetPlayerInfoByGUID, UnitIsEnemy, UnitGUID +local GetTime, UnitIsEnemy, UnitGUID = GetTime, UnitIsEnemy, UnitGUID local CombatLogGetCurrentEventInfo = CombatLogGetCurrentEventInfo -local cooldowns = { - [2484] = 3, --Earthbind - [8143] = 4, -- Tremor - [8166] = 4, -- Poison Cleansing - [8170] = 4, -- Disease Cleansing - [1535] = { cd = 4, once = true }, -- Fire Nova 1 - [8498] = { cd = 4, once = true }, -- Fire Nova 2 - [8499] = { cd = 4, once = true }, -- Fire Nova 3 - [11314] = { cd = 4, once = true }, -- Fire Nova 4 - [11315] = { cd = 4, once = true }, -- Fire Nova 5 - [25546] = { cd = 4, once = true }, -- Fire Nova 6 - [25547] = { cd = 4, once = true }, -- Fire Nova 7 - [8190] = 2, -- Magma 1 - [10585] = 2, -- Magma 2 - [10586] = 2, -- Magma 3 - [10587] = 2, -- Magma 4 - [25552] = 2, -- Magma 5 - [5394] = 2, -- Healing Stream 1 - [6375] = 2, -- Healing Stream 2 - [6377] = 2, -- Healing Stream 3 - [10462] = 2, -- Healing Stream 4 - [10463] = 2, -- Healing Stream 5 - [25567] = 2, -- Healing Stream 6 - [5675] = 2, -- Mana Spring 1 - [10495] = 2, -- Mana Spring 2 - [10496] = 2, -- Mana Spring 3 - [10497] = 2, -- Mana Spring 4 - [25570] = 2, -- Mana Spring 5 -} +--------------------------------------------------- +-- Helper + +--------------------------------------------------- + +local totemData, npcIdToTotemData, cooldowns = Gladdy:GetTotemData() local ninetyDegreeInRad = 90 * math.pi / 180 +local function TotemOptions() + local defaultDB = {} + local options = {} + local indexedList = {} + for k,v in pairs(totemData) do + if v.pulse then + tinsert(indexedList, {name = k, id = v.id, color = v.color, texture = v.texture}) + end + end + table.sort(indexedList, function (a, b) + return a.name < b.name + end) + for i=1,#indexedList do + defaultDB["totem" .. indexedList[i].id] = {enabled = true, attachToGladdyTotemFrame = true, style = "COOLDOWN", reverse = false} + options["totem" .. indexedList[i].id] = { + order = i+1, + name = select(1, GetSpellInfo(indexedList[i].id)), + --inline = true, + width = "3.0", + type = "group", + icon = indexedList[i].texture, + args = { + headerTotemConfig = { + type = "header", + name = format("|T%s:20|t %s", indexedList[i].texture, select(1, GetSpellInfo(indexedList[i].id))), + order = 1, + }, + enabled = { + order = 2, + name = L["Enabled"], + desc = "Enable " .. format("|T%s:20|t %s", indexedList[i].texture, select(1, GetSpellInfo(indexedList[i].id))), + type = "toggle", + width = "full", + get = function() return Gladdy.dbi.profile.totemPulseTotems["totem" .. indexedList[i].id].enabled end, + set = function(_, value) + Gladdy.dbi.profile.totemPulseTotems["totem" .. indexedList[i].id].enabled = value + Gladdy:UpdateFrame() + end + }, + attachToGladdyTotemFrame = { + order = 3, + disabled = function() return not Gladdy.dbi.profile.totemPulseTotems["totem" .. indexedList[i].id].enabled end, + name = L["Attach To TotemPlate"], + desc = "Attach " .. format("|T%s:20|t %s", indexedList[i].texture, select(1, GetSpellInfo(indexedList[i].id))) .. " To TotemPlate", + type = "toggle", + width = "full", + get = function() return Gladdy.dbi.profile.totemPulseTotems["totem" .. indexedList[i].id].attachToGladdyTotemFrame end, + set = function(_, value) + Gladdy.dbi.profile.totemPulseTotems["totem" .. indexedList[i].id].attachToGladdyTotemFrame = value + Gladdy:UpdateFrame() + end + }, + style = { + type = "select", + name = L["Style"], + order = 4, + values = { + COOLDOWN = L["Cooldown"], + Vertical = L["Bar vertical"], + Horizontal = L["Bar horizontal"] + }, + get = function() return Gladdy.dbi.profile.totemPulseTotems["totem" .. indexedList[i].id].style end, + set = function(_, value) + Gladdy.dbi.profile.totemPulseTotems["totem" .. indexedList[i].id].style = value + Gladdy:UpdateFrame() + end + }, + reverse = { + order = 5, + disabled = function() return not Gladdy.dbi.profile.totemPulseTotems["totem" .. indexedList[i].id].enabled end, + name = L["Reverse"], + type = "toggle", + width = "full", + get = function() return Gladdy.dbi.profile.totemPulseTotems["totem" .. indexedList[i].id].reverse end, + set = function(_, value) + Gladdy.dbi.profile.totemPulseTotems["totem" .. indexedList[i].id].reverse = value + Gladdy:UpdateFrame() + end + }, + } + } + end + return options,defaultDB +end + --------------------------------------------------- -- Core --------------------------------------------------- - -local TotemPulse = Gladdy:NewModule("Totem Pulse", nil, { +local TotemPulse = Gladdy:NewModule("Totem Pulse", 1, { totemPulseEnabled = true, totemPulseEnabledShowFriendly = true, totemPulseEnabledShowEnemy = true, - totemPulseAttachToTotemPlate = true, totemPulseStyle = "", -- "COOLDOWN", "COOLDOWNREVERSE", "BARVERTICAL", "BARHORIZONTAL" - totemPulseTextColor = { r = 1, g = 1, b = 1, a = 0 }, + --text + totemPulseTextColor = { r = 1, g = 1, b = 1, a = 1 }, + totemPulseTextSize = 14, + totemPulseTextFont = "DorisPP", --bar totemPulseBarWidth = 40, totemPulseBarHeight = 20, @@ -60,9 +123,15 @@ local TotemPulse = Gladdy:NewModule("Totem Pulse", nil, { totemPulseBarBorderColor = { r = 0, g = 0, b = 0, a = 1 }, totemPulseBarBorderSize = 5, totemPulseBarBorderStyle = "Gladdy Tooltip squared", - totemPulseBarTexture = "Smooth", + totemPulseBarTexture = "Flat", + totemPulseBarReverse = false, --cooldown + totemPulseCooldownWidth = 40, + totemPulseCooldownHeight = 20, totemPulseCooldownAlpha = 1, + totemPulseCooldownReverse = true, + --totems + totemPulseTotems = select(2, TotemOptions()) }) function TotemPulse.OnEvent(self, event, ...) @@ -70,16 +139,18 @@ function TotemPulse.OnEvent(self, event, ...) end function TotemPulse:Initialize() - self.cooldowns = cooldowns self.timeStamps = {} self.cooldownCache = {} self.barCache = {} self.activeFrames = { bars = {}, cooldowns = {} } - self:SetScript("OnEvent", self.OnEvent) - self:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED") - self:RegisterEvent("NAME_PLATE_UNIT_REMOVED") - self:RegisterEvent("NAME_PLATE_UNIT_ADDED") - self:RegisterEvent("UNIT_NAME_UPDATE") + if Gladdy.db.totemPulseEnabled then + self:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED") + self:RegisterEvent("NAME_PLATE_UNIT_REMOVED") + self:RegisterEvent("NAME_PLATE_UNIT_ADDED") + self:RegisterEvent("UNIT_NAME_UPDATE") + self:SetScript("OnEvent", self.OnEvent) + end + self:RegisterEvent("PLAYER_ENTERING_WORLD") end --------------------------------------------------- @@ -88,23 +159,46 @@ end --------------------------------------------------- +function TotemPulse:PLAYER_ENTERING_WORLD() + self.timeStamps = {} +end + function TotemPulse:COMBAT_LOG_EVENT_UNFILTERED() - local _,eventType,_,sourceGUID,_,_,_,destGUID,_,_,_,spellID,spellName,spellSchool,extraSpellId,extraSpellName,extraSpellSchool = CombatLogGetCurrentEventInfo() - print(eventType, spellName, spellID, destGUID) - if eventType == "SPELL_SUMMON" then - if cooldowns[spellID] then - print(eventType, spellName, spellID, GetPlayerInfoByGUID(sourceGUID)) - self.timeStamps[destGUID] = { timeStamp = GetTime(), spellID = spellID } - end - elseif eventType == "UNIT_DESTROYED" then + local _,eventType,_,sourceGUID,_,_,_,destGUID,_,_,_,spellID,spellName = CombatLogGetCurrentEventInfo() + local pulse = cooldowns[spellID] or cooldowns[spellName] + local npcId = tonumber(select(6, strsplit("-", destGUID)), 10) + if eventType == "UNIT_DESTROYED" and self.timeStamps[destGUID] then self.timeStamps[destGUID] = nil end + if (eventType == "SWING_DAMAGE" or eventType == "SPELL_DAMAGE") and self.timeStamps[destGUID] and npcIdToTotemData[npcId] then + self.timeStamps[destGUID] = nil + end + if not pulse then + return + end + if eventType == "SPELL_CAST_SUCCESS" then + self.timeStamps[sourceGUID] = { timeStamp = GetTime(), pulse = pulse } + end + if eventType == "SPELL_SUMMON" then + if not npcIdToTotemData[npcId] then + return + end + if not Gladdy.dbi.profile.totemPulseTotems["totem" .. npcIdToTotemData[npcId].id].enabled then + return + end + if self.timeStamps[sourceGUID] then + self.timeStamps[destGUID] = self.timeStamps[sourceGUID] + self.timeStamps[destGUID].id = npcIdToTotemData[npcId].id + self.timeStamps[sourceGUID] = nil + else + self.timeStamps[destGUID] = { timeStamp = GetTime(), pulse = pulse, id = npcIdToTotemData[npcId].id } + end + end end function TotemPulse:NAME_PLATE_UNIT_REMOVED(unitId) local nameplate = C_NamePlate.GetNamePlateForUnit(unitId) if nameplate.totemTick then - print("NAME_PLATE_UNIT_REMOVED", nameplate.totemTick) nameplate.totemTick:SetScript("OnUpdate", nil) nameplate.totemTick:Hide() nameplate.totemTick:SetParent(nil) @@ -123,16 +217,18 @@ function TotemPulse:UNIT_NAME_UPDATE(unitId) self:OnUnitAdded(unitId, "UNIT_NAME_UPDATE") end -function TotemPulse:OnUnitAdded(unitId, event) +function TotemPulse:OnUnitAdded(unitId) local isEnemy = UnitIsEnemy("player", unitId) local guid = UnitGUID(unitId) + if strsplit("-", guid) ~= "Creature" then + return + end local nameplate = C_NamePlate.GetNamePlateForUnit(unitId) - if nameplate then - print(event, self.timeStamps[guid], nameplate.totemTick) - if self.timeStamps[guid] then - self:AddTimerFrame(nameplate, self.timeStamps[guid], Gladdy.db.totemPulseAttachToTotemPlate and nameplate.gladdyTotemFrame) + if nameplate and (isEnemy and Gladdy.db.totemPulseEnabledShowEnemy or not isEnemy and Gladdy.db.totemPulseEnabledShowFriendly) then + if self.timeStamps[guid] and strsplit("-", guid) then + self:AddTimerFrame(nameplate, self.timeStamps[guid]) else if nameplate.totemTick then nameplate.totemTick:SetScript("OnUpdate", nil) @@ -153,35 +249,41 @@ end --------------------------------------------------- -function TotemPulse:CreateCooldownFrame(gladdyTotemFrame) +function TotemPulse:CreateCooldownFrame(style) local totemTick - if gladdyTotemFrame then + if style == "COOLDOWN" then if #self.cooldownCache > 0 then totemTick = tremove(self.cooldownCache, #self.cooldownCache) else - Gladdy:Print("TotemPulse:CreateCooldownFrame()", "CreateCooldown") - totemTick = CreateFrame("Cooldown", nil, nil, "CooldownFrameTemplate") - totemTick.noCooldownCount = true + totemTick = CreateFrame("Frame") + totemTick:SetWidth(Gladdy.db.totemPulseCooldownWidth) + totemTick:SetHeight(Gladdy.db.totemPulseCooldownHeight) + totemTick.cd = CreateFrame("Cooldown", nil, totemTick, "CooldownFrameTemplate") + totemTick.cd:SetAllPoints(totemTick) + totemTick.cd.noCooldownCount = true totemTick:SetFrameStrata("MEDIUM") totemTick:SetFrameLevel(4) - totemTick:SetReverse(true) - totemTick:SetHideCountdownNumbers(true) - totemTick:SetAlpha(Gladdy.db.totemPulseCooldownAlpha) + totemTick.cd:SetReverse(Gladdy.db.totemPulseCooldownReverse) + totemTick.cd:SetHideCountdownNumbers(true) + totemTick.cd:SetAlpha(Gladdy.db.totemPulseCooldownAlpha) - totemTick.text = totemTick:CreateFontString(nil, "OVERLAY") - totemTick.text:SetPoint("LEFT", totemTick, "LEFT", 4, 0) - totemTick.text:SetFont("Fonts\\FRIZQT__.TTF", 16, "OUTLINE") - totemTick.text:SetJustifyH("LEFT") + totemTick.textFrame = CreateFrame("Frame", nil, totemTick) + totemTick.textFrame:SetAllPoints(totemTick) + totemTick.text = totemTick.textFrame:CreateFontString(nil, "OVERLAY") + totemTick.text:SetPoint("CENTER", totemTick.textFrame, "CENTER") + totemTick.text:SetFont(Gladdy:SMFetch("font", "totemPulseTextFont"), Gladdy.db.totemPulseTextSize, "OUTLINE") + totemTick.text:SetJustifyH("CENTER") totemTick.text:SetShadowOffset(1, -1) totemTick.text:SetTextColor(Gladdy:SetColor(Gladdy.db.totemPulseTextColor)) end else if #self.barCache > 0 then - Gladdy:Print("TotemPulse:CreateCooldownFrame()", #self.barCache) totemTick = tremove(self.barCache, #self.barCache) + totemTick.bar:SetOrientation(style) + totemTick.spark:SetRotation(style == "Vertical" and ninetyDegreeInRad or 0) + totemTick.spark:SetHeight(style == "Vertical" and Gladdy.db.totemPulseBarWidth or Gladdy.db.totemPulseBarHeight) else - Gladdy:Print("TotemPulse:CreateCooldownFrame()", "CreateBar") totemTick = CreateFrame("Frame", nil) totemTick:SetWidth(Gladdy.db.totemPulseBarWidth) @@ -193,24 +295,21 @@ function TotemPulse:CreateCooldownFrame(gladdyTotemFrame) edgeSize = Gladdy.db.totemPulseBarBorderSize }) totemTick.backdrop:SetBackdropBorderColor(Gladdy:SetColor(Gladdy.db.totemPulseBarBorderColor)) totemTick.backdrop:SetFrameLevel(1) - --totemTick.backdrop:SetFrameStrata(Gladdy.db.castBarFrameStrata) - --totemTick.backdrop:SetFrameLevel(Gladdy.db.castBarFrameLevel - 1) totemTick.bar = CreateFrame("StatusBar", nil, totemTick) totemTick.bar:SetStatusBarTexture(Gladdy:SMFetch("statusbar", "totemPulseBarTexture")) totemTick.bar:SetStatusBarColor(Gladdy:SetColor(Gladdy.db.totemPulseBarColor)) - totemTick.bar:SetOrientation("Vertical") + totemTick.bar:SetOrientation(style) totemTick.bar:SetFrameLevel(0) - totemTick.bar:SetPoint("TOPLEFT", totemTick, "TOPLEFT", (Gladdy.db.totemPulseBarBorderSize/Gladdy.db.statusbarBorderOffset), -(Gladdy.db.totemPulseBarBorderSize/Gladdy.db.statusbarBorderOffset)) - totemTick.bar:SetPoint("BOTTOMRIGHT", totemTick, "BOTTOMRIGHT", -(Gladdy.db.totemPulseBarBorderSize/Gladdy.db.statusbarBorderOffset), (Gladdy.db.totemPulseBarBorderSize/Gladdy.db.statusbarBorderOffset)) + totemTick.bar:SetAllPoints(totemTick) totemTick.spark = totemTick.bar:CreateTexture(nil, "OVERLAY") totemTick.spark:SetTexture("Interface\\CastingBar\\UI-CastingBar-Spark") totemTick.spark:SetBlendMode("ADD") totemTick.spark:SetWidth(8) - totemTick.spark:SetHeight(40) + totemTick.spark:SetHeight(style == "Vertical" and Gladdy.db.totemPulseBarWidth or Gladdy.db.totemPulseBarHeight) totemTick.spark.position = 0 - totemTick.spark:SetRotation(ninetyDegreeInRad) + totemTick.spark:SetRotation(style == "Vertical" and ninetyDegreeInRad or 0) totemTick.bg = totemTick.bar:CreateTexture(nil, "BACKGROUND") totemTick.bg:SetTexture(Gladdy:SMFetch("statusbar", "totemPulseBarTexture")) @@ -218,9 +317,9 @@ function TotemPulse:CreateCooldownFrame(gladdyTotemFrame) totemTick.bg:SetVertexColor(Gladdy:SetColor(Gladdy.db.totemPulseBarBgColor)) totemTick.text = totemTick.bar:CreateFontString(nil, "OVERLAY") - totemTick.text:SetPoint("LEFT", totemTick, "LEFT", 4, 0) - totemTick.text:SetFont("Fonts\\FRIZQT__.TTF", 16, "OUTLINE") - totemTick.text:SetJustifyH("LEFT") + totemTick.text:SetPoint("CENTER", totemTick, "CENTER", 0, 0) + totemTick.text:SetFont(Gladdy:SMFetch("font", "totemPulseTextFont"), Gladdy.db.totemPulseTextSize, "OUTLINE") + totemTick.text:SetJustifyH("CENTER") totemTick.text:SetShadowOffset(1, -1) totemTick.text:SetTextColor(Gladdy:SetColor(Gladdy.db.totemPulseTextColor)) end @@ -228,64 +327,52 @@ function TotemPulse:CreateCooldownFrame(gladdyTotemFrame) return totemTick end -function TotemPulse:AddTimerFrame(nameplate, timestamp, gladdyTotemFrame) - if nameplate:IsShown() and cooldowns[timestamp.spellID] then +function TotemPulse:AddTimerFrame(nameplate, timestamp, test) + if (nameplate:IsShown() or test) and timestamp then + local gladdyTotemFrame = Gladdy.db.totemPulseTotems["totem" .. timestamp.id].attachToGladdyTotemFrame and nameplate.gladdyTotemFrame if not nameplate.totemTick then - nameplate.totemTick = TotemPulse:CreateCooldownFrame(gladdyTotemFrame) + nameplate.totemTick = TotemPulse:CreateCooldownFrame(Gladdy.db.totemPulseTotems["totem" .. timestamp.id].style) end - nameplate.totemTick:SetParent(nameplate) - nameplate.totemTick:ClearAllPoints() - if gladdyTotemFrame then + nameplate.totemTick:SetParent(nameplate.gladdyTotemFrame or nameplate) + --nameplate.totemTick:ClearAllPoints() + --[[if gladdyTotemFrame then nameplate.totemTick:SetPoint("TOPLEFT", gladdyTotemFrame, "TOPLEFT", Gladdy.db.npTotemPlatesSize/16, -Gladdy.db.npTotemPlatesSize/16) nameplate.totemTick:SetPoint("BOTTOMRIGHT", gladdyTotemFrame, "BOTTOMRIGHT", -Gladdy.db.npTotemPlatesSize/16, Gladdy.db.npTotemPlatesSize/16) + if nameplate.totemTick.bar then + nameplate.totemTick.spark:SetHeight(Gladdy.db.totemPulseTotems["totem" .. timestamp.id].style == "Vertical" and gladdyTotemFrame:GetWidth() or gladdyTotemFrame:GetHeight()) + end else - nameplate.totemTick:SetPoint("TOP", nameplate, "BOTTOM") - end + nameplate.totemTick:SetPoint("TOP", nameplate.gladdyTotemFrame, "BOTTOM", 0, -5) + if nameplate.totemTick.bar then + nameplate.totemTick.spark:SetHeight(Gladdy.db.totemPulseTotems["totem" .. timestamp.id].style == "Vertical" and Gladdy.db.totemPulseBarWidth or Gladdy.db.totemPulseBarHeight) + end + end--]] - local cd = type(cooldowns[timestamp.spellID]) == "table" and cooldowns[timestamp.spellID].cd or cooldowns[timestamp.spellID] - local once = type(cooldowns[timestamp.spellID]) == "table" + local cd = type(timestamp.pulse) == "table" and timestamp.pulse.cd or timestamp.pulse + local once = type(timestamp.pulse) == "table" local cooldown = (timestamp.timeStamp - GetTime()) % cd - if not gladdyTotemFrame then - nameplate.totemTick.bar:SetMinMaxValues(0, cd) - nameplate.totemTick.bar:SetValue(cooldown) - self.activeFrames.bars[nameplate.totemTick] = nameplate.totemTick - else - self.activeFrames.cooldowns[nameplate.totemTick] = nameplate.totemTick - end - nameplate.totemTick.timestamp = timestamp.timeStamp nameplate.totemTick.maxValue = cd nameplate.totemTick.value = cooldown nameplate.totemTick.once = once + nameplate.totemTick.id = timestamp.id + + if nameplate.totemTick.bar then + self:UpdateBarPartial(nameplate.totemTick) + nameplate.totemTick.bar:SetMinMaxValues(0, cd) + nameplate.totemTick.bar:SetValue(cooldown) + self.activeFrames.bars[nameplate.totemTick] = nameplate.totemTick + else + self:UpdateCooldown(nameplate.totemTick) + self.activeFrames.cooldowns[nameplate.totemTick] = nameplate.totemTick + end - print("once", once, " - totemTick.once", nameplate.totemTick.once, " - cd off", math.abs(timestamp.timeStamp - GetTime()) > cd) if once and GetTime() - timestamp.timeStamp > cd then nameplate.totemTick:SetScript("OnUpdate", nil) nameplate.totemTick:Hide() - print("nameplate.totemTick:Hide()") else - nameplate.totemTick:SetScript("OnUpdate", function(totemTick, elapsed) - totemTick.now = GetTime() - totemTick.value = (totemTick.timestamp - totemTick.now) % totemTick.maxValue - if totemTick.once and totemTick.now - totemTick.timestamp >= totemTick.maxValue then - totemTick:SetScript("OnUpdate", nil) - print("OnUpdate totemTick:Hide()") - totemTick:Hide() - end - if not totemTick.bar and not (totemTick.once and totemTick.now - totemTick.timestamp >= totemTick.maxValue) then - totemTick:SetCooldown(totemTick.now - totemTick.value, totemTick.maxValue) - elseif totemTick.bar then - totemTick.spark.position = (totemTick.value / totemTick.maxValue) * totemTick.bar:GetHeight() - if ( totemTick.spark.position < 0 ) then - totemTick.spark.position = 0 - end - totemTick.spark:SetPoint("CENTER", totemTick.bar, "BOTTOM", 0, totemTick.spark.position) - totemTick.bar:SetValue(totemTick.value) - end - totemTick.text:SetFormattedText("%.1f", totemTick.value) - end) - print("nameplate.totemTick:Show()") + nameplate.totemTick:SetScript("OnUpdate", TotemPulse.TotemPulseOnUpdate) nameplate.totemTick:Show() end else @@ -301,39 +388,175 @@ function TotemPulse:AddTimerFrame(nameplate, timestamp, gladdyTotemFrame) end end -function TotemPulse:UpdateBar(bar) +function TotemPulse:SetSparkPosition(totemTick, referenceSize, vertical) + if not Gladdy.db.totemPulseTotems["totem" .. totemTick.id].reverse then + totemTick.bar:SetValue(totemTick.maxValue - totemTick.value) + totemTick.spark.position = referenceSize / 2 - (totemTick.value / totemTick.maxValue) * referenceSize + if ( totemTick.spark.position < -referenceSize / 2 ) then + totemTick.spark.position = -referenceSize / 2 + end + else + totemTick.bar:SetValue(totemTick.value) + totemTick.spark.position = referenceSize / 2 - ((totemTick.maxValue - totemTick.value) / totemTick.maxValue) * referenceSize + if ( totemTick.spark.position > referenceSize / 2 ) then + totemTick.spark.position = referenceSize / 2 + end + end + totemTick.spark:SetPoint("CENTER", totemTick.bar, "CENTER", vertical and 0 or totemTick.spark.position, vertical and totemTick.spark.position or 0) +end + +function TotemPulse.TotemPulseOnUpdate(totemTick) + totemTick.now = GetTime() + totemTick.value = (totemTick.timestamp - totemTick.now) % totemTick.maxValue + if totemTick.once and totemTick.now - totemTick.timestamp >= totemTick.maxValue then + totemTick:SetScript("OnUpdate", nil) + totemTick:Hide() + end + if not totemTick.bar and not (totemTick.once and totemTick.now - totemTick.timestamp >= totemTick.maxValue) then + if Gladdy.db.totemPulseTotems["totem" .. totemTick.id].reverse then + totemTick.cd:SetCooldown(totemTick.now - totemTick.value, totemTick.maxValue) + else + totemTick.cd:SetCooldown(totemTick.now - (totemTick.maxValue - totemTick.value), totemTick.maxValue) + end + elseif totemTick.bar then + if Gladdy.db.totemPulseTotems["totem" .. totemTick.id].style == "Vertical" then + TotemPulse:SetSparkPosition(totemTick, totemTick.bar:GetHeight(), true) + else + TotemPulse:SetSparkPosition(totemTick, totemTick.bar:GetWidth(), false) + end + end + totemTick.text:SetFormattedText("%.1f", totemTick.value) +end + +--------------------------------------------------- + +-- Update Styles + +--------------------------------------------------- + +function TotemPulse:UpdateBarPartial(bar) + local style = bar.id and Gladdy.db.totemPulseTotems["totem" .. bar.id].style + bar:SetWidth(Gladdy.db.totemPulseBarWidth) bar:SetHeight(Gladdy.db.totemPulseBarHeight) + bar.spark:SetWidth(8) + bar.spark:SetHeight(style == "Vertical" and Gladdy.db.totemPulseBarWidth or Gladdy.db.totemPulseBarHeight) + bar.spark:SetRotation(style == "Vertical" and ninetyDegreeInRad or 0) + + if (bar:GetParent()) then + if bar:GetParent().gladdyTotemFrame then + bar:SetParent(bar:GetParent().gladdyTotemFrame) + else + bar:SetParent(bar:GetParent()) + end + --[[if bar.id and Gladdy.db.totemPulseTotems["totem" .. bar.id].attachToGladdyTotemFrame then + if not bar:GetParent().totemIcon and bar:GetParent().gladdyTotemFrame then + bar:SetParent(bar:GetParent().gladdyTotemFrame) + end + elseif bar.id and not Gladdy.db.totemPulseTotems["totem" .. bar.id].attachToGladdyTotemFrame then + if bar:GetParent().totemIcon then + bar:SetParent(bar:GetParent():GetParent()) + end + end--]] + bar:ClearAllPoints() + if (bar.id and bar:GetParent().totemIcon and Gladdy.db.totemPulseTotems["totem" .. bar.id].attachToGladdyTotemFrame) then + bar:SetPoint("TOPLEFT", bar:GetParent(), "TOPLEFT", Gladdy.db.npTotemPlatesSize/16, -Gladdy.db.npTotemPlatesSize/16) + bar:SetPoint("BOTTOMRIGHT", bar:GetParent(), "BOTTOMRIGHT", -Gladdy.db.npTotemPlatesSize/16, Gladdy.db.npTotemPlatesSize/16) + if style then + bar.spark:SetHeight(style == "Vertical" and bar:GetParent():GetWidth() or bar:GetParent():GetHeight()) + end + else + bar:SetPoint("TOP", bar:GetParent(), "BOTTOM", 0, 0) + end + end + bar.bar:SetOrientation(style ~= "COOLDOWN" and style or bar.bar:GetOrientation()) +end + +function TotemPulse:UpdateBar(bar) + self:UpdateBarPartial(bar) + bar.backdrop:SetBackdrop({ edgeFile = Gladdy:SMFetch("border", "totemPulseBarBorderStyle"), edgeSize = Gladdy.db.totemPulseBarBorderSize }) bar.backdrop:SetBackdropBorderColor(Gladdy:SetColor(Gladdy.db.totemPulseBarBorderColor)) bar.bar:SetStatusBarTexture(Gladdy:SMFetch("statusbar", "totemPulseBarTexture")) bar.bar:SetStatusBarColor(Gladdy:SetColor(Gladdy.db.totemPulseBarColor)) - bar.bar:SetOrientation("Vertical") - bar.bar:SetPoint("TOPLEFT", bar, "TOPLEFT", (Gladdy.db.totemPulseBarBorderSize/Gladdy.db.statusbarBorderOffset), -(Gladdy.db.totemPulseBarBorderSize/Gladdy.db.statusbarBorderOffset)) - bar.bar:SetPoint("BOTTOMRIGHT", bar, "BOTTOMRIGHT", -(Gladdy.db.totemPulseBarBorderSize/Gladdy.db.statusbarBorderOffset), (Gladdy.db.totemPulseBarBorderSize/Gladdy.db.statusbarBorderOffset)) - - bar.spark:SetWidth(8) - bar.spark:SetHeight(40) - bar.spark:SetRotation(ninetyDegreeInRad) + bar.bar:SetAllPoints(bar) bar.bg:SetTexture(Gladdy:SMFetch("statusbar", "totemPulseBarTexture")) bar.bg:SetVertexColor(Gladdy:SetColor(Gladdy.db.totemPulseBarBgColor)) - bar.text:SetFont("Fonts\\FRIZQT__.TTF", 16, "OUTLINE") + bar.text:SetFont(Gladdy:SMFetch("font", "totemPulseTextFont"), Gladdy.db.totemPulseTextSize, "OUTLINE") bar.text:SetTextColor(Gladdy:SetColor(Gladdy.db.totemPulseTextColor)) end function TotemPulse:UpdateCooldown(cooldown) - cooldown:SetReverse(true) - cooldown:SetAlpha(Gladdy.db.totemPulseCooldownAlpha) - cooldown.text:SetFont("Fonts\\FRIZQT__.TTF", 16, "OUTLINE") + cooldown:SetWidth(Gladdy.db.totemPulseCooldownWidth) + cooldown:SetHeight(Gladdy.db.totemPulseCooldownHeight) + + if cooldown:GetParent() then + --[[if cooldown.id and Gladdy.db.totemPulseTotems["totem" .. cooldown.id].attachToGladdyTotemFrame then + if not cooldown:GetParent().totemIcon and cooldown:GetParent().gladdyTotemFrame then + cooldown:SetParent(cooldown:GetParent().gladdyTotemFrame) + end + elseif cooldown.id and not Gladdy.db.totemPulseTotems["totem" .. cooldown.id].attachToGladdyTotemFrame then + if cooldown:GetParent().totemIcon then + cooldown:SetParent(cooldown:GetParent():GetParent()) + end + end--]] + if cooldown:GetParent().gladdyTotemFrame then + cooldown:SetParent(cooldown:GetParent().gladdyTotemFrame) + else + cooldown:SetParent(cooldown:GetParent()) + end + cooldown:ClearAllPoints() + if cooldown.id and Gladdy.db.totemPulseTotems["totem" .. cooldown.id].attachToGladdyTotemFrame and cooldown:GetParent().totemIcon then + cooldown:SetPoint("TOPLEFT", cooldown:GetParent(), "TOPLEFT", Gladdy.db.npTotemPlatesSize/16, -Gladdy.db.npTotemPlatesSize/16) + cooldown:SetPoint("BOTTOMRIGHT", cooldown:GetParent(), "BOTTOMRIGHT", -Gladdy.db.npTotemPlatesSize/16, Gladdy.db.npTotemPlatesSize/16) + else + cooldown:SetPoint("TOP", cooldown:GetParent(), "BOTTOM", 0, -0.5) + end + end + + cooldown.cd:SetCooldown(0,0) + cooldown.cd:SetReverse(Gladdy.db.totemPulseCooldownReverse) + cooldown.cd:SetAlpha(Gladdy.db.totemPulseCooldownAlpha) + cooldown.text:SetFont(Gladdy:SMFetch("font", "totemPulseTextFont"), Gladdy.db.totemPulseTextSize, "OUTLINE") cooldown.text:SetTextColor(Gladdy:SetColor(Gladdy.db.totemPulseTextColor)) end function TotemPulse:UpdateFrameOnce() + if Gladdy.frame.testing then + TotemPulse:TestOnce() + end + if Gladdy.db.totemPulseEnabled then + self:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED") + self:RegisterEvent("NAME_PLATE_UNIT_REMOVED") + self:RegisterEvent("NAME_PLATE_UNIT_ADDED") + self:RegisterEvent("UNIT_NAME_UPDATE") + self:SetScript("OnEvent", self.OnEvent) + else + for _,bar in pairs(self.activeFrames.bars) do + bar:SetScript("OnUpdate", nil) + bar:Hide() + bar:SetParent(nil) + tinsert(self.barCache, bar) + self.activeFrames.bars[bar] = nil + end + for _,cooldown in pairs(self.activeFrames.cooldowns) do + cooldown:SetScript("OnUpdate", nil) + cooldown:Hide() + cooldown:SetParent(nil) + tinsert(self.cooldownCache, cooldown) + self.activeFrames.cooldowns[cooldown] = nil + end + self:UnregisterEvent("COMBAT_LOG_EVENT_UNFILTERED") + self:UnregisterEvent("NAME_PLATE_UNIT_REMOVED") + self:UnregisterEvent("NAME_PLATE_UNIT_ADDED") + self:UnregisterEvent("UNIT_NAME_UPDATE") + self:SetScript("OnEvent", nil) + end for _,bar in pairs(self.activeFrames.bars) do self:UpdateBar(bar) end @@ -354,6 +577,40 @@ end --------------------------------------------------- +function TotemPulse:TestOnce() + local totemPlatesTestFrame = Gladdy.modules["Totem Plates"].testFrame + if totemPlatesTestFrame then + if totemPlatesTestFrame.totemTick + and (Gladdy.db.totemPulseTotems["totem" .. npcIdToTotemData[5913].id].style == "COOLDOWN" and totemPlatesTestFrame.totemTick.bar + or Gladdy.db.totemPulseTotems["totem" .. npcIdToTotemData[5913].id].style ~= "COOLDOWN" and not totemPlatesTestFrame.totemTick.bar) then + totemPlatesTestFrame.totemTick:SetScript("OnUpdate", nil) + totemPlatesTestFrame.totemTick:Hide() + totemPlatesTestFrame.totemTick:SetParent(nil) + totemPlatesTestFrame.totemTick.id = nil + tinsert(totemPlatesTestFrame.totemTick.bar and self.barCache or self.cooldownCache, totemPlatesTestFrame.totemTick) + self.activeFrames.bars[totemPlatesTestFrame.totemTick] = nil + self.activeFrames.cooldowns[totemPlatesTestFrame.totemTick] = nil + totemPlatesTestFrame.totemTick = nil + end + + local timestamp = { timeStamp = GetTime(), pulse = npcIdToTotemData[5913].pulse, id = npcIdToTotemData[5913].id } + TotemPulse:AddTimerFrame(totemPlatesTestFrame, timestamp, true) + self.testFrame = totemPlatesTestFrame.totemTick + end +end + +function TotemPulse:Reset() + if self.testFrame then + self.testFrame:SetScript("OnUpdate", nil) + self.testFrame:Hide() + self.testFrame:SetParent(nil) + tinsert(self.testFrame.bar and self.barCache or self.cooldownCache, self.testFrame) + self.activeFrames.bars[self.testFrame] = nil + self.activeFrames.cooldowns[self.testFrame] = nil + self.testFrame = nil + Gladdy.modules["Totem Plates"].testFrame.totemTick = nil + end +end --------------------------------------------------- @@ -373,32 +630,28 @@ function TotemPulse:GetOptions() name = L["Totem Pulse Enabled"], order = 3, }), - totemPulseAttachToTotemPlate = Gladdy:option({ - type = "toggle", - name = L["Attach to Totem Plates"], - order = 4, - }), group = { type = "group", childGroups = "tree", name = L["Frame"], order = 4, + disabled = function() return not Gladdy.db.totemPulseEnabled end, args = { barFrame = { type = "group", name = L["Bar"], - order = 1, + order = 2, args = { headerSize = { type = "header", - name = L["Bar Size"], - order = 1, + name = L["Size"], + order = 10, }, totemPulseBarHeight = Gladdy:option({ type = "range", name = L["Bar height"], desc = L["Height of the bar"], - order = 3, + order = 11, min = 0.1, max = 200, step = .1, @@ -407,8 +660,8 @@ function TotemPulse:GetOptions() totemPulseBarWidth = Gladdy:option({ type = "range", name = L["Bar width"], - desc = L["Width of the bars"], - order = 4, + desc = L["Width of the bar"], + order = 12, min = 0.1, max = 600, step = .1, @@ -417,13 +670,13 @@ function TotemPulse:GetOptions() headerTexture = { type = "header", name = L["Texture"], - order = 5, + order = 20, }, totemPulseBarTexture = Gladdy:option({ type = "select", name = L["Bar texture"], desc = L["Texture of the bar"], - order = 9, + order = 21, dialogControl = "LSM30_Statusbar", values = AceGUIWidgetLSMlists.statusbar, }), @@ -431,25 +684,25 @@ function TotemPulse:GetOptions() type = "color", name = L["Bar color"], desc = L["Color of the cast bar"], - order = 10, + order = 22, hasAlpha = true, }), totemPulseBarBgColor = Gladdy:colorOption({ type = "color", name = L["Background color"], desc = L["Color of the cast bar background"], - order = 11, + order = 23, hasAlpha = true, }), headerBorder = { type = "header", name = L["Border"], - order = 12, + order = 30, }, totemPulseBarBorderSize = Gladdy:option({ type = "range", name = L["Border size"], - order = 13, + order = 31, min = 0.5, max = Gladdy.db.castBarHeight/2, step = 0.5, @@ -458,19 +711,103 @@ function TotemPulse:GetOptions() totemPulseBarBorderStyle = Gladdy:option({ type = "select", name = L["Status Bar border"], - order = 51, + order = 32, dialogControl = "LSM30_Border", values = AceGUIWidgetLSMlists.border, }), totemPulseBarBorderColor = Gladdy:colorOption({ type = "color", name = L["Status Bar border color"], - order = 52, + order = 33, + hasAlpha = true, + }), + }, + }, + cooldownFrame = { + type = "group", + name = L["Cooldown"], + order = 3, + args = { + headerSize = { + type = "header", + name = L["Frame"], + order = 10, + }, + totemPulseCooldownHeight = Gladdy:option({ + type = "range", + name = L["Height"], + order = 11, + min = 0.1, + max = 200, + step = .1, + width = "full", + }), + totemPulseCooldownWidth = Gladdy:option({ + type = "range", + name = L["Width"], + order = 12, + min = 0.1, + max = 600, + step = .1, + width = "full", + }), + totemPulseCooldownAlpha = Gladdy:option({ + type = "range", + name = L["Alpha"], + order = 21, + min = 0.1, + max = 1, + step = .1, + width = "full", + }), + + }, + }, + text = { + type = "group", + name = L["Text"], + order = 4, + args = { + headerSize = { + type = "header", + name = L["Text"], + order = 10, + }, + totemPulseTextSize = Gladdy:option({ + type = "range", + name = L["Size"], + order = 11, + min = 0.5, + max = 30, + step = 0.5, + width = "full", + }), + totemPulseTextFont = Gladdy:option({ + type = "select", + name = L["Font"], + desc = L["Font of the bar"], + order = 12, + dialogControl = "LSM30_Font", + values = AceGUIWidgetLSMlists.font, + }), + totemPulseTextColor = Gladdy:colorOption({ + type = "color", + name = L["Font color"], + desc = L["Color of the text"], + order = 13, hasAlpha = true, }), }, }, }, }, + customizeTotems = { + order = 50, + name = L["Customize Totems"], + type = "group", + childGroups = "tree", + disabled = function() return not Gladdy.db.totemPulseEnabled end, + args = select(1, TotemOptions()) + }, } end \ No newline at end of file From ad4ba087f52c900b1d4da1e3102e8a070d630164 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Thu, 3 Mar 2022 23:38:50 +0100 Subject: [PATCH 28/51] config frame totemplate ignore parent scale --- Modules/TotemPlates.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/Modules/TotemPlates.lua b/Modules/TotemPlates.lua index 8c1a0ee..690c2d5 100644 --- a/Modules/TotemPlates.lua +++ b/Modules/TotemPlates.lua @@ -490,6 +490,7 @@ function TotemPlates:TestOnce() self.testFrame:SetWidth(1) self.testFrame:SetHeight(32) self.testFrame:SetPoint("CENTER", UIParent, "CENTER", 0, -140) + self.testFrame:SetIgnoreParentScale(true) end local totemDataEntry = npcIdToTotemData[5913] self.testFrame:Show() From 34b0a18d9a4842e81e531cd212320503a3a54b6d Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Thu, 3 Mar 2022 23:39:03 +0100 Subject: [PATCH 29/51] Util --- Gladdy.toc | 1 + Util.lua | 143 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 144 insertions(+) create mode 100644 Util.lua diff --git a/Gladdy.toc b/Gladdy.toc index 5dfaf9b..9fe7adc 100644 --- a/Gladdy.toc +++ b/Gladdy.toc @@ -15,6 +15,7 @@ Frame.lua Options.lua Constants.lua ImportStrings.lua +Util.lua Modules\Announcements.lua Modules\Healthbar.lua diff --git a/Util.lua b/Util.lua new file mode 100644 index 0000000..204e9d0 --- /dev/null +++ b/Util.lua @@ -0,0 +1,143 @@ +local pairs, ipairs = pairs, ipairs +local floor = math.floor +local str_find, str_gsub, str_sub, tinsert = string.find, string.gsub, string.sub, table.insert +local Gladdy = LibStub("Gladdy") +local L = Gladdy.L + +--------------------------- + +-- TAGS + +--------------------------- + +local tags = { + ["current"] = true, + ["max"] = true, + ["percent"] = true, + ["race"] = "race", + ["class"] = "class", + ["arena"] = true, + ["name"] = "name", + ["status"] = true, + ["spec"] = "spec", +} + +local function str_extract(s, pattern) + local t = {} -- table to store the indices + local i, j = 0,0 + while true do + i, j = str_find(s, pattern, i+1) -- find 'next' occurrence + if i == nil then break end + tinsert(t, str_sub(s, i, j)) + end + return t +end + +--TODO optimize this function as it's being called often! +local function getTagText(unit, tag, current, max, status) + local button = Gladdy.buttons[unit] + if not button then + return + end + + if str_find(tag, "percent") then + return current and max and floor(current * 100 / max) .. "%%" or "" + elseif str_find(tag, "current") then + return current or "" + elseif str_find(tag, "max") then + return max or "" + elseif str_find(tag, "status") then + if str_find(tag, "%|") and status == nil then + return nil + else + return status or "" + end + elseif str_find(tag, "name") then + return button.name or "" + elseif str_find(tag, "class") then + return button.classLoc or "" + elseif str_find(tag, "race") then + return button.raceLoc or "" + elseif str_find(tag, "arena") then + return str_gsub(unit, "arena", "") + elseif str_find(tag, "spec") then + if str_find(tag, "%|") and button.spec == nil then + return nil + else + return button.spec or "" + end + end +end + +function Gladdy:SetTag(unit, tagOption, current, max, status) + local button = self.buttons[unit] + if not button then + return + end + + local returnStr = tagOption + + local t = str_extract(returnStr, "%[[^%[].-%]") + for _, tag in ipairs(t) do + local replace + if str_find(tag, "|") then -- or operator + local indicators = str_extract(tag, "[%[|%|]%a+[%||%]]") + local replaces = {} + for _, indicator in ipairs(indicators) do + tinsert(replaces, getTagText(unit, indicator, current, max, status)) + end + replace = replaces[#replaces] + else + replace = getTagText(unit, tag, current, max, status) + end + + if replace then + local find = str_gsub(tag, "%[", "%%[") + find = str_gsub(find, "%]", "%%]") + find = str_gsub(find, "%|", "%%|") + returnStr = str_gsub(returnStr, find, replace) + end + end + return returnStr +end + +function Gladdy:GetTagOption(name, order, enabledOption, func, toggle) + if toggle then + return func({ + type = "toggle", + name = name, + order = order, + width = "full", + desc = L["Custom Tags:\n".. + "\n|cff1ac742[current]|r - Shows current\n" .. + "\n|cff1ac742[max]|r - Shows max\n" .. + "\n|cff1ac742[percent]|r - Shows percent\n" .. + "\n|cff1ac742[name]|r - Shows name\n" .. + "\n|cff1ac742[arena]|r - Shows arena number\n" .. + "\n|cff1ac742[status]|r - Shows status (eg DEATH)\n" .. + "\n|cff1ac742[race]|r - Shows race\n" .. + "\n|cff1ac742[class]|r - Shows class\n" .. + "\n|cff1ac742[spec]|r - Shows spec\n\n" .. + "Can be combined with OR operator like |cff1ac742[percent|status]|r. The last valid option will be used.\n"], + }) + else + return func({ + type = "input", + name = name, + order = order, + width = "full", + disabled = function() return not Gladdy.db[enabledOption] end, + desc = L["Custom Tags:\n".. + "\n|cff1ac742[current]|r - Shows current\n" .. + "\n|cff1ac742[max]|r - Shows max\n" .. + "\n|cff1ac742[percent]|r - Shows percent\n" .. + "\n|cff1ac742[name]|r - Shows name\n" .. + "\n|cff1ac742[arena]|r - Shows arena number\n" .. + "\n|cff1ac742[status]|r - Shows status (eg DEATH)\n" .. + "\n|cff1ac742[race]|r - Shows race\n" .. + "\n|cff1ac742[class]|r - Shows class\n" .. + "\n|cff1ac742[spec]|r - Shows spec\n\n" .. + "Can be combined with OR operator like |cff1ac742[percent|status]|r. The last valid option will be used.\n"], + }) + end +end \ No newline at end of file From d23d749f1ec4e65cd1c4dc2461d786866603b98f Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Thu, 3 Mar 2022 23:39:20 +0100 Subject: [PATCH 30/51] add disarm riposte to dr data --- Libs/DRData-1.0/DRData-1.0.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/Libs/DRData-1.0/DRData-1.0.lua b/Libs/DRData-1.0/DRData-1.0.lua index a3a3c8d..4bfc95c 100644 --- a/Libs/DRData-1.0/DRData-1.0.lua +++ b/Libs/DRData-1.0/DRData-1.0.lua @@ -254,6 +254,7 @@ Data.spells = { -- Disarm [676] = "disarm", + [14251] = "disarm", } -- DR Category names From 3c82edc441f63ad6cd3fdedbc5abf657a9aab6e5 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Thu, 3 Mar 2022 23:40:00 +0100 Subject: [PATCH 31/51] detect certain racials and spells when used in stealth --- EventListener.lua | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/EventListener.lua b/EventListener.lua index 75cbba1..e98ae44 100644 --- a/EventListener.lua +++ b/EventListener.lua @@ -15,7 +15,7 @@ local L = Gladdy.L local Cooldowns = Gladdy.modules["Cooldowns"] local Diminishings = Gladdy.modules["Diminishings"] -local EventListener = Gladdy:NewModule("EventListener", 10, { +local EventListener = Gladdy:NewModule("EventListener", 101, { test = true, }) @@ -76,13 +76,13 @@ function Gladdy:SpotEnemy(unit, auraScan) if Gladdy.cooldownBuffs[spellName] and unitCaster then -- Check for auras that detect used CDs (like Fear Ward) for arenaUnit,v in pairs(self.buttons) do if (UnitIsUnit(arenaUnit, unitCaster)) then - Cooldowns:CooldownUsed(arenaUnit, v.class, Gladdy.cooldownBuffs[spellName].spellId, expirationTime - GetTime()) + Cooldowns:CooldownUsed(arenaUnit, v.class, Gladdy.cooldownBuffs[spellName].spellId, Gladdy.cooldownBuffs[spellName].cd(expirationTime - GetTime())) -- /run LibStub("Gladdy").modules["Cooldowns"]:CooldownUsed("arena5", "PRIEST", 6346, 10) end end end - if Gladdy.cooldownBuffs.racials[spellName] then - Gladdy:SendMessage("RACIAL_USED", unit, expirationTime, spellName) + if Gladdy.cooldownBuffs.racials[spellName] and Gladdy.cooldownBuffs.racials[spellName] then + Gladdy:SendMessage("RACIAL_USED", unit, spellName, Gladdy.cooldownBuffs.racials[spellName].cd(expirationTime - GetTime()), spellName) end if Gladdy.specBuffs[spellName] and unitCaster then -- Check for auras that detect a spec local unitPet = string_gsub(unit, "%d$", "pet%1") @@ -213,10 +213,22 @@ Gladdy.exceptionNames = { -- TODO MOVE ME TO CLASSBUFFS LIB } Gladdy.cooldownBuffs = { - [GetSpellInfo(6346)] = { cd = 180, spellId = 6346 }, -- Fear Ward - -- TODO sprint, shadowstep + [GetSpellInfo(6346)] = { cd = function(expTime) -- 180s uptime == cd + return expTime + end, spellId = 6346 }, -- Fear Ward + [GetSpellInfo(11305)] = { cd = function(expTime) -- 15s uptime + return 180 - (15 - expTime) + end, spellId = 11305 }, -- Sprint + [GetSpellInfo(36554)] = { cd = function(expTime) -- 3s uptime + return 30 - (3 - expTime) + end, spellId = 36554 }, -- Shadowstep + [GetSpellInfo(26889)] = { cd = function(expTime) -- 3s uptime + return 180 - (10 - expTime) + end, spellId = 26889 }, -- Vanish racials = { - [GetSpellInfo(20600)] = { cd = 180, spellId = 20600 }, -- Perception + [GetSpellInfo(20600)] = { cd = function(expTime) -- 20s uptime + return GetTime() - (20 - expTime) + end, spellId = 20600 }, -- Perception } } @@ -241,12 +253,12 @@ function EventListener:UNIT_AURA(unit) if Gladdy.cooldownBuffs[spellName] and unitCaster then -- Check for auras that hint used CDs (like Fear Ward) for arenaUnit,v in pairs(Gladdy.buttons) do if (UnitIsUnit(arenaUnit, unitCaster)) then - Cooldowns:CooldownUsed(arenaUnit, v.class, Gladdy.cooldownBuffs[spellName].spellId, expirationTime - GetTime()) + Cooldowns:CooldownUsed(arenaUnit, v.class, Gladdy.cooldownBuffs[spellName].spellId, Gladdy.cooldownBuffs[spellName].cd(expirationTime - GetTime())) end end end - if Gladdy.cooldownBuffs.racials[spellName] then - Gladdy:SendMessage("RACIAL_USED", unit, spellName, expirationTime, spellName) + if Gladdy.cooldownBuffs.racials[spellName] and Gladdy.cooldownBuffs.racials[spellName] then + Gladdy:SendMessage("RACIAL_USED", unit, spellName, Gladdy.cooldownBuffs.racials[spellName].cd(expirationTime - GetTime()), spellName) end if not button.spec and Gladdy.specBuffs[spellName] and unitCaster then local unitPet = string_gsub(unit, "%d$", "pet%1") From 8fa481affe46f3674d6c599fc08da97fa05dea80 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Thu, 3 Mar 2022 23:40:23 +0100 Subject: [PATCH 32/51] racial cleanup --- Modules/Racial.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Modules/Racial.lua b/Modules/Racial.lua index e9dff61..ac8bc50 100644 --- a/Modules/Racial.lua +++ b/Modules/Racial.lua @@ -169,7 +169,6 @@ function Racial:UpdateFrame(unit) end function Racial:JOINED_ARENA() - self:RegisterEvent("ARENA_COOLDOWNS_UPDATE") self:SetScript("OnEvent", function(self, event, ...) if self[event] then self[event](self, ...) @@ -186,7 +185,7 @@ function Racial:RACIAL_USED(unit, expirationTime, spellName) if expirationTime and Gladdy:Racials()[button.race].spellName ~= spellName then return end - local startTime = (expirationTime and expirationTime - Gladdy:Racials()[button.race].duration) or GetTime() + local startTime = expirationTime or GetTime() Racial:Used(unit, startTime, Gladdy:Racials()[button.race].duration) end From 26241d73d626fb3be2862271535136daf2f16960 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Thu, 3 Mar 2022 23:40:47 +0100 Subject: [PATCH 33/51] add test once and adjust testdata --- Gladdy.lua | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Gladdy.lua b/Gladdy.lua index 63c5d17..808b2c3 100644 --- a/Gladdy.lua +++ b/Gladdy.lua @@ -289,11 +289,11 @@ function Gladdy:OnInitialize() L = self.L self.testData = { - ["arena1"] = { name = "Swift", raceLoc = L["NightElf"], classLoc = L["Warrior"], class = "WARRIOR", health = 9635, healthMax = 14207, power = 76, powerMax = 100, powerType = 1, testSpec = L["Arms"], race = "NightElf" }, - ["arena2"] = { name = "Vilden", raceLoc = L["Undead"], classLoc = L["Mage"], class = "MAGE", health = 10969, healthMax = 11023, power = 7833, powerMax = 10460, powerType = 0, testSpec = L["Frost"], race = "Scourge" }, - ["arena3"] = { name = "Krymu", raceLoc = L["Human"], classLoc = L["Rogue"], class = "ROGUE", health = 1592, healthMax = 11740, power = 45, powerMax = 110, powerType = 3, testSpec = L["Subtlety"], race = "Human" }, - ["arena4"] = { name = "Talmon", raceLoc = L["Human"], classLoc = L["Warlock"], class = "WARLOCK", health = 10221, healthMax = 14960, power = 9855, powerMax = 9855, powerType = 0, testSpec = L["Demonology"], race = "Human" }, - ["arena5"] = { name = "Hydra", raceLoc = L["Undead"], classLoc = L["Priest"], class = "PRIEST", health = 11960, healthMax = 11960, power = 2515, powerMax = 10240, powerType = 0, testSpec = L["Discipline"], race = "Human" }, + ["arena1"] = { name = "Swift", raceLoc = L["NightElf"], classLoc = L["Hunter"], class = "HUNTER", health = 67, healthMax = 100, power = 76, powerMax = 100, powerType = 1, testSpec = L["Marksmanship"], race = "NightElf" }, + ["arena2"] = { name = "Vilden", raceLoc = L["Undead"], classLoc = L["Mage"], class = "MAGE", health = 99, healthMax = 100, power = 7833, powerMax = 10460, powerType = 0, testSpec = L["Frost"], race = "Scourge" }, + ["arena3"] = { name = "Krymu", raceLoc = L["Human"], classLoc = L["Rogue"], class = "ROGUE", health = 13, healthMax = 100, power = 45, powerMax = 110, powerType = 3, testSpec = L["Subtlety"], race = "Human" }, + ["arena4"] = { name = "Talmon", raceLoc = L["Human"], classLoc = L["Warlock"], class = "WARLOCK", health = 68, healthMax = 100, power = 9855, powerMax = 9855, powerType = 0, testSpec = L["Demonology"], race = "Human" }, + ["arena5"] = { name = "Hydra", raceLoc = L["Undead"], classLoc = L["Priest"], class = "PRIEST", health = 100, healthMax = 100, power = 2515, powerMax = 10240, powerType = 0, testSpec = L["Discipline"], race = "Human" }, } self.cooldownSpellIds = {} @@ -407,6 +407,9 @@ function Gladdy:Test() button:SetAlpha(1) end + for _, module in self:IterModules() do + self:Call(module, "TestOnce") + end end end From d6351dbe883a80289340a202bc9c47250ac4eb07 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Thu, 3 Mar 2022 23:41:25 +0100 Subject: [PATCH 34/51] add riposte, disarm, will of the forsaken to auras --- Constants.lua | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/Constants.lua b/Constants.lua index 3f39ba3..eecf7f6 100644 --- a/Constants.lua +++ b/Constants.lua @@ -579,7 +579,13 @@ local importantAuras = { priority = 10, spellID = 26669, }, - + -- Riposte + [GetSpellInfo(14251)] = { + track = AURA_TYPE_DEBUFF, + duration = 6, + priority = 20, + spellID = 14251, + }, -- Fear [GetSpellInfo(5782)] = { @@ -708,6 +714,13 @@ local importantAuras = { spellSchool = "magic", spellID = 12292, }, + --Disarm + [GetSpellInfo(676)] = { + track = AURA_TYPE_DEBUFF, + duration = 10, + priority = 20, + spellID = 676, + }, -- Grounding Totem Effect [GetSpellInfo(8178)] = { @@ -805,6 +818,13 @@ local importantAuras = { spellID = 5024, altName = select(1, GetSpellInfo(5024)) .. " - " .. (select(1, GetItemInfo(4984)) or "Skull of Impending Doom"), }, + -- Will of the Forsaken + [GetSpellInfo(7744)] = { + track = AURA_TYPE_BUFF, + duration = 5, + priority = 15, + spellID = 7744, + }, } function Gladdy:GetImportantAuras() return importantAuras From 24bb84663fef9ac0e0198a80b2d903592164fec7 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Thu, 3 Mar 2022 23:41:54 +0100 Subject: [PATCH 35/51] configurable health bar text by tags --- Modules/Healthbar.lua | 218 +++++++++++++++++++++++++++++------------- 1 file changed, 154 insertions(+), 64 deletions(-) diff --git a/Modules/Healthbar.lua b/Modules/Healthbar.lua index 4d88014..1bc2e5a 100644 --- a/Modules/Healthbar.lua +++ b/Modules/Healthbar.lua @@ -1,5 +1,6 @@ -local pairs = pairs +local pairs, ipairs = pairs, ipairs local floor = math.floor +local str_find, str_gsub, str_sub, tinsert = string.find, string.gsub, string.sub, table.insert local UnitHealth, UnitHealthMax, UnitName, UnitExists, UnitIsDeadOrGhost = UnitHealth, UnitHealthMax, UnitName, UnitExists, UnitIsDeadOrGhost local CreateFrame = CreateFrame @@ -26,12 +27,23 @@ local Healthbar = Gladdy:NewModule("Health Bar", 100, { healthPercentage = true, healthFrameStrata = "MEDIUM", healthFrameLevel = 1, + healthCustomTagsEnabled = false, + healthTextRight = "[percent|status]", + healthTextLeft = "[name]", + healthTextRight = "[percent|status]", + healthTextLeftOutline = false, + healthTextRightOutline = false, + healthTextLeftVOffset = 0, + healthTextLeftHOffset = 5, + healthTextRightVOffset = 0, + healthTextRightHOffset = -5, }) function Healthbar:Initialize() self.frames = {} self:RegisterMessage("JOINED_ARENA") self:RegisterMessage("ENEMY_SPOTTED") + self:RegisterMessage("UNIT_SPEC") self:RegisterMessage("UNIT_DESTROYED") self:RegisterMessage("UNIT_DEATH") end @@ -65,28 +77,28 @@ function Healthbar:CreateFrame(unit) healthBar.nameText:SetFont(Gladdy:SMFetch("font", "healthBarNameFont"), 1) healthBar.nameText:Hide() else - healthBar.nameText:SetFont(Gladdy:SMFetch("font", "healthBarFont"), Gladdy.db.healthBarNameFontSize) + healthBar.nameText:SetFont(Gladdy:SMFetch("font", "healthBarFont"), Gladdy.db.healthBarNameFontSize, Gladdy.db.healthTextLeftOutline and "OUTLINE") healthBar.nameText:Show() end healthBar.nameText:SetTextColor(Gladdy:SetColor(Gladdy.db.healthBarFontColor)) healthBar.nameText:SetShadowOffset(1, -1) healthBar.nameText:SetShadowColor(0, 0, 0, 1) healthBar.nameText:SetJustifyH("CENTER") - healthBar.nameText:SetPoint("LEFT", 5, 0) + healthBar.nameText:SetPoint("LEFT", Gladdy.db.healthTextLeftHOffset, Gladdy.db.healthTextLeftVOffset) healthBar.healthText = healthBar:CreateFontString(nil, "LOW") if (Gladdy.db.healthBarHealthFontSize < 1) then healthBar.healthText:SetFont(Gladdy:SMFetch("font", "healthBarFont"), 1) healthBar.healthText:Hide() else - healthBar.healthText:SetFont(Gladdy:SMFetch("font", "healthBarFont"), Gladdy.db.healthBarHealthFontSize) + healthBar.healthText:SetFont(Gladdy:SMFetch("font", "healthBarFont"), Gladdy.db.healthBarHealthFontSize, Gladdy.db.healthTextRightOutline and "OUTLINE") healthBar.healthText:Hide() end healthBar.healthText:SetTextColor(Gladdy:SetColor(Gladdy.db.healthBarFontColor)) healthBar.healthText:SetShadowOffset(1, -1) healthBar.healthText:SetShadowColor(0, 0, 0, 1) healthBar.healthText:SetJustifyH("CENTER") - healthBar.healthText:SetPoint("RIGHT", -5, 0) + healthBar.healthText:SetPoint("RIGHT", Gladdy.db.healthTextRightHOffset, Gladdy.db.healthTextRightVOffset) healthBar.unit = unit self.frames[unit] = healthBar @@ -100,17 +112,7 @@ end function Healthbar.OnEvent(self, event, unit) local isDead = UnitExists(unit) and UnitIsDeadOrGhost(unit) - if event == "UNIT_HEALTH" then - if isDead then - Gladdy:SendMessage("UNIT_DEATH", unit) - return - end - local health = UnitHealth(unit) - local healthMax = UnitHealthMax(unit) - self.hp:SetMinMaxValues(0, healthMax) - self.hp:SetValue(UnitHealth(unit)) - Healthbar:SetHealthText(self, health, healthMax) - elseif event == "UNIT_MAXHEALTH" then + if event == "UNIT_HEALTH" or event == "UNIT_MAXHEALTH" then if isDead then Gladdy:SendMessage("UNIT_DEATH", unit) return @@ -119,13 +121,13 @@ function Healthbar.OnEvent(self, event, unit) local healthMax = UnitHealthMax(unit) self.hp:SetMinMaxValues(0, healthMax) self.hp:SetValue(health) - Healthbar:SetHealthText(self, health, healthMax) + self.hp.current = health + Healthbar:SetText(unit, health, healthMax) + --Healthbar:SetHealthText(self, health, healthMax) elseif event == "UNIT_NAME_UPDATE" then local name = UnitName(unit) Gladdy.buttons[unit].name = name - if Gladdy.db.healthName and not Gladdy.db.healthNameToArenaId then - self.nameText:SetText(name) - end + Healthbar:SetText(unit, self.hp.current, 100) end if not Gladdy.buttons[unit].class then Gladdy:SpotEnemy(unit, true) @@ -134,20 +136,42 @@ end function Healthbar:SetHealthText(healthBar, health, healthMax) local healthText = "" - local healthPercentage = floor(health * 100 / healthMax) + local healthPercentage = health and healthMax and floor(health * 100 / healthMax) if health == 0 and UnitExists(healthBar.unit) and UnitIsDeadOrGhost(healthBar.unit) then self:UNIT_DEATH(healthBar.unit) return end - - if (Gladdy.db.healthPercentage) then + if (Gladdy.db.healthPercentage and healthPercentage) then healthText = ("%d%%"):format(healthPercentage) end - healthBar.healthText:SetText(healthText) end +function Healthbar:SetText(unit, health, healthMax, status) + local button = Gladdy.buttons[unit] + if not Gladdy.buttons[unit] then + return + end + if Gladdy.db.healthCustomTagsEnabled then + button.healthBar.nameText:SetText(Gladdy:SetTag(unit, Gladdy.db.healthTextLeft, health, healthMax, status)) + button.healthBar.healthText:SetText(Gladdy:SetTag(unit, Gladdy.db.healthTextRight, health, healthMax, status)) + else + if Gladdy.db.healthName then + if Gladdy.db.healthNameToArenaId then + button.healthBar.nameText:SetText(str_gsub(unit, "arena", "")) + else + button.healthBar.nameText:SetText(Gladdy.buttons[unit].name) + end + end + if status then + button.healthBar.healthText:SetText(status) + else + Healthbar:SetHealthText(button.healthBar, health, healthMax) + end + end +end + function Healthbar:UpdateFrame(unit) local healthBar = self.frames[unit] if (not healthBar) then @@ -178,14 +202,14 @@ function Healthbar:UpdateFrame(unit) healthBar.healthText:SetFont(Gladdy:SMFetch("font", "healthBarFont"), 1) healthBar.healthText:Hide() else - healthBar.healthText:SetFont(Gladdy:SMFetch("font", "healthBarFont"), Gladdy.db.healthBarHealthFontSize) + healthBar.healthText:SetFont(Gladdy:SMFetch("font", "healthBarFont"), Gladdy.db.healthBarHealthFontSize, Gladdy.db.healthTextRightOutline and "OUTLINE") healthBar.healthText:Show() end if (Gladdy.db.healthBarNameFontSize < 1) then healthBar.nameText:SetFont(Gladdy:SMFetch("font", "healthBarNameFont"), 1) healthBar.nameText:Hide() else - healthBar.nameText:SetFont(Gladdy:SMFetch("font", "healthBarFont"), Gladdy.db.healthBarNameFontSize) + healthBar.nameText:SetFont(Gladdy:SMFetch("font", "healthBarFont"), Gladdy.db.healthBarNameFontSize, Gladdy.db.healthTextLeftOutline and "OUTLINE") if Gladdy.db.healthName then healthBar.nameText:Show() else @@ -194,6 +218,8 @@ function Healthbar:UpdateFrame(unit) end healthBar.nameText:SetTextColor(Gladdy:SetColor(Gladdy.db.healthBarFontColor)) healthBar.healthText:SetTextColor(Gladdy:SetColor(Gladdy.db.healthBarFontColor)) + healthBar.nameText:SetPoint("LEFT", Gladdy.db.healthTextLeftHOffset, Gladdy.db.healthTextLeftVOffset) + healthBar.healthText:SetPoint("RIGHT", Gladdy.db.healthTextRightHOffset, Gladdy.db.healthTextRightVOffset) end function Healthbar:ResetUnit(unit) @@ -206,6 +232,7 @@ function Healthbar:ResetUnit(unit) healthBar.nameText:SetText("") healthBar.healthText:SetText("") healthBar.hp:SetValue(0) + healthBar.hp.current = 0 end function Healthbar:Test(unit) @@ -215,17 +242,30 @@ function Healthbar:Test(unit) return end - self:JOINED_ARENA() + --self:JOINED_ARENA() + Gladdy:SendMessage("UNIT_HEALTH", unit, button.health, button.healthMax) + healthBar.hp.current = button.health self:ENEMY_SPOTTED(unit) - self:UNIT_HEALTH(unit, button.health, button.healthMax) + self:SetText(unit, button.health, button.healthMax) + healthBar.hp:SetValue(button.health) + if unit == "arena1" then + self:UNIT_DEATH(unit) + --self:SetText(unit, button.health, button.healthMax, L["DEAD"]) + end +end + +function Healthbar:UNIT_SPEC(unit) + local button = Gladdy.buttons[unit] + if not button then + return + end + self:SetText(unit, button.healthBar.hp.current, 100) + --button.healthBar.nameText:SetText(Gladdy:SetTag(unit, Gladdy.db.healthTextLeft, button.health, button.healthMax)) end function Healthbar:JOINED_ARENA() - if Gladdy.db.healthNameToArenaId and Gladdy.db.healthName then - for i=1,Gladdy.curBracket do - local healthBar = self.frames["arena" .. i] - healthBar.nameText:SetText(i) - end + for i=1,Gladdy.curBracket do + self:SetText("arena" .. i, nil, nil) end end @@ -241,10 +281,9 @@ function Healthbar:ENEMY_SPOTTED(unit) local healthMax = UnitHealthMax(unit) healthBar.hp:SetMinMaxValues(0, healthMax) healthBar.hp:SetValue(health) - Healthbar:SetHealthText(healthBar, health, healthMax) - end - if button.name and Gladdy.db.healthName and not Gladdy.db.healthNameToArenaId then - healthBar.nameText:SetText(button.name) + healthBar.hp.current = health + Healthbar:SetText(unit, health, healthMax) + --Healthbar:SetHealthText(healthBar, health, healthMax) end if button.class then @@ -252,27 +291,6 @@ function Healthbar:ENEMY_SPOTTED(unit) end end -function Healthbar:UNIT_HEALTH(unit, health, healthMax) - local healthBar = self.frames[unit] - if (not healthBar) then - return - end - if not Gladdy.buttons[unit].class then - Gladdy:SpotEnemy(unit, true) - end - Gladdy:SendMessage("UNIT_HEALTH", unit, health, healthMax) - - local healthPercentage = floor(health * 100 / healthMax) - local healthText = "" - - if (Gladdy.db.healthPercentage) then - healthText = ("%d%%"):format(healthPercentage) - end - - healthBar.healthText:SetText(healthText) - healthBar.hp:SetValue(healthPercentage) -end - function Healthbar:UNIT_DEATH(unit) local healthBar = self.frames[unit] if (not healthBar) then @@ -280,7 +298,8 @@ function Healthbar:UNIT_DEATH(unit) end healthBar.hp:SetValue(0) - healthBar.healthText:SetText(L["DEAD"]) + healthBar.hp.current = 0 + Healthbar:SetText(unit, 0, 100, L["DEAD"]) end function Healthbar:UNIT_DESTROYED(unit) @@ -290,6 +309,7 @@ function Healthbar:UNIT_DESTROYED(unit) end healthBar.hp:SetValue(0) + healthBar.hp.current = 0 healthBar.healthText:SetText(L["LEAVE"]) healthBar.nameText:SetText("") end @@ -307,8 +327,10 @@ local function option(params) if Gladdy.db.healthBarBorderSize > Gladdy.db.healthBarHeight/2 then Gladdy.db.healthBarBorderSize = Gladdy.db.healthBarHeight/2 end - for i=1,Gladdy.curBracket do - Healthbar:Test("arena" .. i) + if Gladdy.frame.testing then + for i=1,Gladdy.curBracket do + Healthbar:Test("arena" .. i) + end end Gladdy:UpdateFrame() end, @@ -396,11 +418,28 @@ function Healthbar:GetOptions() order = 12, hasAlpha = true, }), + healthTextLeftOutline = option({ + type = "toggle", + name = L["Left Font Outline"], + order = 13, + width = "full", + }), + healthTextRightOutline = option({ + type = "toggle", + name = L["Right Font Outline"], + order = 14, + width = "full", + }), + headerSize = { + type = "header", + name = L["Size"], + order = 20, + }, healthBarNameFontSize = option({ type = "range", name = L["Name font size"], desc = L["Size of the name text"], - order = 13, + order = 21, step = 0.1, min = 0, max = 20, @@ -410,12 +449,53 @@ function Healthbar:GetOptions() type = "range", name = L["Health font size"], desc = L["Size of the health text"], - order = 14, + order = 22, step = 0.1, min = 0, max = 20, width = "full", }), + headerLeftText = { + type = "header", + name = L["Offsets"], + order = 30, + }, + healthTextLeftVOffset = option({ + type = "range", + name = L["Left Text Vertical Offset"], + order = 31, + step = 0.1, + min = -200, + max = 200, + width = "full", + }), + healthTextLeftHOffset = option({ + type = "range", + name = L["Left Text Horizontal Offset"], + order = 32, + step = 0.1, + min = -200, + max = 200, + width = "full", + }), + healthTextRightVOffset = option({ + type = "range", + name = L["Right Text Vertical Offset"], + order = 33, + step = 0.1, + min = -200, + max = 200, + width = "full", + }), + healthTextRightHOffset = option({ + type = "range", + name = L["Right Text Horizontal Offset"], + order = 34, + step = 0.1, + min = -200, + max = 200, + width = "full", + }), }, }, border = { @@ -499,6 +579,7 @@ function Healthbar:GetOptions() desc = L["Show the units name"], order = 2, width = "full", + disabled = function() return Gladdy.db.healthCustomTagsEnabled end, }), healthNameToArenaId = option({ type = "toggle", @@ -506,7 +587,7 @@ function Healthbar:GetOptions() desc = L["Show 1-5 as name instead"], order = 3, width = "full", - disabled = function() return not Gladdy.db.healthName end + disabled = function() return not Gladdy.db.healthName or Gladdy.db.healthCustomTagsEnabled end, }), healthPercentage = option({ type = "toggle", @@ -514,7 +595,16 @@ function Healthbar:GetOptions() desc = L["Show health percentage on the health bar"], order = 6, width = "full", + disabled = function() return Gladdy.db.healthCustomTagsEnabled end, }), + header = { + type = "header", + name = L["Custom Tags"], + order = 10, + }, + healthCustomTagsEnabled = Gladdy:GetTagOption(L["Custom Tags Enabled"], 11, nil, option, true), + healthTextLeft = Gladdy:GetTagOption(L["Left Text"], 12, "healthCustomTagsEnabled", option), + healthTextRight = Gladdy:GetTagOption(L["Right Text"], 13, "healthCustomTagsEnabled", option), }, }, }, From 2f20d305b677b5514a2401e60f1afafcc1711721 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Thu, 3 Mar 2022 23:42:35 +0100 Subject: [PATCH 36/51] unified lang commented out --- Lang.lua | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/Lang.lua b/Lang.lua index 3ae287d..caf2d58 100644 --- a/Lang.lua +++ b/Lang.lua @@ -28,6 +28,34 @@ L["Troll"] = C_CreatureInfo.GetRaceInfo(8).raceName L["Blood Elf"] = C_CreatureInfo.GetRaceInfo(10).raceName L["Draenei"] = C_CreatureInfo.GetRaceInfo(11).raceName +--Specs +--[[ +L["Balance"] = BALANCE +L["Combat"] = COMBAT_LABEL +L["Fire"] = STRING_SCHOOL_FIRE +L["Arcane"] = STRING_SCHOOL_ARCANE +L["Shadow"] = STRING_SCHOOL_SHADOW +L["Holy"] = STRING_SCHOOL_HOLY +L["Elemental"] = STRING_SCHOOL_ELEMENTAL + + +--Modules +--L["Announcements"] = CHAT_ANNOUNCE +L["Auras"] = COMBAT_TEXT_SHOW_AURAS_TEXT +L["Cast Bar"] = SHOW_ENEMY_CAST +L["Buffs and Debuffs"] = BUFFOPTIONS_LABEL +--L["Class Icon"] = CLASS .. " " .. EMBLEM_SYMBOL +--L["Clicks"] = +L["Cooldowns"] = CAPACITANCE_SHIPMENT_COOLDOWN:gsub(": %%s", "") +--L["Export Import"] = +--L["Healthbar"] +L["Highlight"] = HIGHLIGHTING:gsub(":", "") +L["Pet"] = PET_TYPE_PET +--L["Racial"] = RACE .. " " .. ABILITIES +--L["Range Check"] = +L["Trinket"] = TRINKET0SLOT +--]] + if (GetLocale() == "ruRU") then -- Specs L["Balance"] = "Баланс" From d348b87ddf4b56b783c952f7c8b144af101573ef Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Thu, 24 Mar 2022 20:23:50 +0100 Subject: [PATCH 37/51] switch UNIT_HEALTH to UNIT_HEALTH_FREQUENT --- Modules/Healthbar.lua | 2 +- Modules/Pets.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Modules/Healthbar.lua b/Modules/Healthbar.lua index 1bc2e5a..4523a87 100644 --- a/Modules/Healthbar.lua +++ b/Modules/Healthbar.lua @@ -104,7 +104,7 @@ function Healthbar:CreateFrame(unit) self.frames[unit] = healthBar button.healthBar = healthBar self:ResetUnit(unit) - healthBar:RegisterUnitEvent("UNIT_HEALTH", unit) + healthBar:RegisterUnitEvent("UNIT_HEALTH_FREQUENT", unit) healthBar:RegisterUnitEvent("UNIT_MAXHEALTH", unit) healthBar:RegisterUnitEvent("UNIT_NAME_UPDATE", unit) healthBar:SetScript("OnEvent", Healthbar.OnEvent) diff --git a/Modules/Pets.lua b/Modules/Pets.lua index 5a7eca1..d54ceab 100644 --- a/Modules/Pets.lua +++ b/Modules/Pets.lua @@ -233,7 +233,7 @@ function Pets:CreateFrame(unitId) healthBar.unit = unit button.healthBar = healthBar - healthBar:RegisterUnitEvent("UNIT_HEALTH", unit) + healthBar:RegisterUnitEvent("UNIT_HEALTH_FREQUENT", unit) healthBar:RegisterUnitEvent("UNIT_MAXHEALTH", unit) healthBar:RegisterUnitEvent("UNIT_PORTRAIT_UPDATE", unit) healthBar:RegisterUnitEvent("UNIT_NAME_UPDATE", unit) From 1a8cd81f7a81888b63ffcb477b7a9374793834df Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Fri, 25 Mar 2022 00:00:44 +0100 Subject: [PATCH 38/51] fix totemtick set parent and SetPoint --- Modules/TotemPlates.lua | 1 + Modules/TotemPulse.lua | 94 ++++++++++++++--------------------------- 2 files changed, 33 insertions(+), 62 deletions(-) diff --git a/Modules/TotemPlates.lua b/Modules/TotemPlates.lua index 690c2d5..942115d 100644 --- a/Modules/TotemPlates.lua +++ b/Modules/TotemPlates.lua @@ -306,6 +306,7 @@ end function TotemPlates:CreateTotemFrame(nameplate) nameplate.gladdyTotemFrame = CreateFrame("Frame") + nameplate.gladdyTotemFrame:SetFrameLevel(1) nameplate.gladdyTotemFrame:SetIgnoreParentAlpha(true) nameplate.gladdyTotemFrame:SetWidth(Gladdy.db.npTotemPlatesSize * Gladdy.db.npTotemPlatesWidthFactor) nameplate.gladdyTotemFrame:SetHeight(Gladdy.db.npTotemPlatesSize) diff --git a/Modules/TotemPulse.lua b/Modules/TotemPulse.lua index 6cc6c5e..cd2fd2d 100644 --- a/Modules/TotemPulse.lua +++ b/Modules/TotemPulse.lua @@ -1,10 +1,12 @@ local select, pairs, tremove, tinsert, format, strsplit, tonumber = select, pairs, tremove, tinsert, format, strsplit, tonumber +local type = type local C_NamePlate = C_NamePlate local Gladdy = LibStub("Gladdy") local L = Gladdy.L local GetSpellInfo, CreateFrame = GetSpellInfo, CreateFrame local GetTime, UnitIsEnemy, UnitGUID = GetTime, UnitIsEnemy, UnitGUID local CombatLogGetCurrentEventInfo = CombatLogGetCurrentEventInfo +local UIParent = UIParent --------------------------------------------------- @@ -118,10 +120,10 @@ local TotemPulse = Gladdy:NewModule("Totem Pulse", 1, { --bar totemPulseBarWidth = 40, totemPulseBarHeight = 20, - totemPulseBarColor = { r = 1, g = 0, b = 0, a = 1 }, - totemPulseBarBgColor = { r = 0, g = 1, b = 0, a = 1 }, + totemPulseBarColor = { r = 1, g = 0, b = 0, a = .5 }, + totemPulseBarBgColor = { r = 0, g = 1, b = 0, a = .5 }, totemPulseBarBorderColor = { r = 0, g = 0, b = 0, a = 1 }, - totemPulseBarBorderSize = 5, + totemPulseBarBorderSize = 4, totemPulseBarBorderStyle = "Gladdy Tooltip squared", totemPulseBarTexture = "Flat", totemPulseBarReverse = false, @@ -329,24 +331,10 @@ end function TotemPulse:AddTimerFrame(nameplate, timestamp, test) if (nameplate:IsShown() or test) and timestamp then - local gladdyTotemFrame = Gladdy.db.totemPulseTotems["totem" .. timestamp.id].attachToGladdyTotemFrame and nameplate.gladdyTotemFrame if not nameplate.totemTick then nameplate.totemTick = TotemPulse:CreateCooldownFrame(Gladdy.db.totemPulseTotems["totem" .. timestamp.id].style) end - nameplate.totemTick:SetParent(nameplate.gladdyTotemFrame or nameplate) - --nameplate.totemTick:ClearAllPoints() - --[[if gladdyTotemFrame then - nameplate.totemTick:SetPoint("TOPLEFT", gladdyTotemFrame, "TOPLEFT", Gladdy.db.npTotemPlatesSize/16, -Gladdy.db.npTotemPlatesSize/16) - nameplate.totemTick:SetPoint("BOTTOMRIGHT", gladdyTotemFrame, "BOTTOMRIGHT", -Gladdy.db.npTotemPlatesSize/16, Gladdy.db.npTotemPlatesSize/16) - if nameplate.totemTick.bar then - nameplate.totemTick.spark:SetHeight(Gladdy.db.totemPulseTotems["totem" .. timestamp.id].style == "Vertical" and gladdyTotemFrame:GetWidth() or gladdyTotemFrame:GetHeight()) - end - else - nameplate.totemTick:SetPoint("TOP", nameplate.gladdyTotemFrame, "BOTTOM", 0, -5) - if nameplate.totemTick.bar then - nameplate.totemTick.spark:SetHeight(Gladdy.db.totemPulseTotems["totem" .. timestamp.id].style == "Vertical" and Gladdy.db.totemPulseBarWidth or Gladdy.db.totemPulseBarHeight) - end - end--]] + nameplate.totemTick:SetParent(nameplate) local cd = type(timestamp.pulse) == "table" and timestamp.pulse.cd or timestamp.pulse local once = type(timestamp.pulse) == "table" @@ -444,30 +432,21 @@ function TotemPulse:UpdateBarPartial(bar) bar.spark:SetHeight(style == "Vertical" and Gladdy.db.totemPulseBarWidth or Gladdy.db.totemPulseBarHeight) bar.spark:SetRotation(style == "Vertical" and ninetyDegreeInRad or 0) - if (bar:GetParent()) then - if bar:GetParent().gladdyTotemFrame then - bar:SetParent(bar:GetParent().gladdyTotemFrame) - else - bar:SetParent(bar:GetParent()) - end - --[[if bar.id and Gladdy.db.totemPulseTotems["totem" .. bar.id].attachToGladdyTotemFrame then - if not bar:GetParent().totemIcon and bar:GetParent().gladdyTotemFrame then - bar:SetParent(bar:GetParent().gladdyTotemFrame) - end - elseif bar.id and not Gladdy.db.totemPulseTotems["totem" .. bar.id].attachToGladdyTotemFrame then - if bar:GetParent().totemIcon then - bar:SetParent(bar:GetParent():GetParent()) - end - end--]] + + if bar:GetParent() and bar:GetParent() ~= UIParent then + local gladdyTotemFrame = bar:GetParent().gladdyTotemFrame and bar:GetParent().gladdyTotemFrame + local nameplate = bar:GetParent() bar:ClearAllPoints() - if (bar.id and bar:GetParent().totemIcon and Gladdy.db.totemPulseTotems["totem" .. bar.id].attachToGladdyTotemFrame) then - bar:SetPoint("TOPLEFT", bar:GetParent(), "TOPLEFT", Gladdy.db.npTotemPlatesSize/16, -Gladdy.db.npTotemPlatesSize/16) - bar:SetPoint("BOTTOMRIGHT", bar:GetParent(), "BOTTOMRIGHT", -Gladdy.db.npTotemPlatesSize/16, Gladdy.db.npTotemPlatesSize/16) + if bar.id and gladdyTotemFrame and gladdyTotemFrame:IsShown() and Gladdy.db.totemPulseTotems["totem" .. bar.id].attachToGladdyTotemFrame then + bar:SetPoint("TOPLEFT", gladdyTotemFrame, "TOPLEFT", Gladdy.db.npTotemPlatesSize/16, -Gladdy.db.npTotemPlatesSize/16) + bar:SetPoint("BOTTOMRIGHT", gladdyTotemFrame, "BOTTOMRIGHT", -Gladdy.db.npTotemPlatesSize/16, Gladdy.db.npTotemPlatesSize/16) if style then - bar.spark:SetHeight(style == "Vertical" and bar:GetParent():GetWidth() or bar:GetParent():GetHeight()) + bar.spark:SetHeight(style == "Vertical" and gladdyTotemFrame:GetWidth() or gladdyTotemFrame:GetHeight()) end + elseif bar.id and gladdyTotemFrame and gladdyTotemFrame:IsShown() and not Gladdy.db.totemPulseTotems["totem" .. bar.id].attachToGladdyTotemFrame then + bar:SetPoint("TOP", gladdyTotemFrame, "BOTTOM", 0, -0.5) else - bar:SetPoint("TOP", bar:GetParent(), "BOTTOM", 0, 0) + bar:SetPoint("TOP", nameplate, "BOTTOM", 0, -0.5) end end bar.bar:SetOrientation(style ~= "COOLDOWN" and style or bar.bar:GetOrientation()) @@ -495,35 +474,26 @@ function TotemPulse:UpdateCooldown(cooldown) cooldown:SetWidth(Gladdy.db.totemPulseCooldownWidth) cooldown:SetHeight(Gladdy.db.totemPulseCooldownHeight) - if cooldown:GetParent() then - --[[if cooldown.id and Gladdy.db.totemPulseTotems["totem" .. cooldown.id].attachToGladdyTotemFrame then - if not cooldown:GetParent().totemIcon and cooldown:GetParent().gladdyTotemFrame then - cooldown:SetParent(cooldown:GetParent().gladdyTotemFrame) - end - elseif cooldown.id and not Gladdy.db.totemPulseTotems["totem" .. cooldown.id].attachToGladdyTotemFrame then - if cooldown:GetParent().totemIcon then - cooldown:SetParent(cooldown:GetParent():GetParent()) - end - end--]] - if cooldown:GetParent().gladdyTotemFrame then - cooldown:SetParent(cooldown:GetParent().gladdyTotemFrame) - else - cooldown:SetParent(cooldown:GetParent()) - end - cooldown:ClearAllPoints() - if cooldown.id and Gladdy.db.totemPulseTotems["totem" .. cooldown.id].attachToGladdyTotemFrame and cooldown:GetParent().totemIcon then - cooldown:SetPoint("TOPLEFT", cooldown:GetParent(), "TOPLEFT", Gladdy.db.npTotemPlatesSize/16, -Gladdy.db.npTotemPlatesSize/16) - cooldown:SetPoint("BOTTOMRIGHT", cooldown:GetParent(), "BOTTOMRIGHT", -Gladdy.db.npTotemPlatesSize/16, Gladdy.db.npTotemPlatesSize/16) - else - cooldown:SetPoint("TOP", cooldown:GetParent(), "BOTTOM", 0, -0.5) - end - end - cooldown.cd:SetCooldown(0,0) cooldown.cd:SetReverse(Gladdy.db.totemPulseCooldownReverse) cooldown.cd:SetAlpha(Gladdy.db.totemPulseCooldownAlpha) + cooldown.text:SetFont(Gladdy:SMFetch("font", "totemPulseTextFont"), Gladdy.db.totemPulseTextSize, "OUTLINE") cooldown.text:SetTextColor(Gladdy:SetColor(Gladdy.db.totemPulseTextColor)) + + if cooldown:GetParent() and cooldown:GetParent() ~= UIParent then + local gladdyTotemFrame = cooldown:GetParent().gladdyTotemFrame and cooldown:GetParent().gladdyTotemFrame + local nameplate = cooldown:GetParent() + cooldown:ClearAllPoints() + if cooldown.id and gladdyTotemFrame and gladdyTotemFrame:IsShown() and Gladdy.db.totemPulseTotems["totem" .. cooldown.id].attachToGladdyTotemFrame then + cooldown:SetPoint("TOPLEFT", gladdyTotemFrame, "TOPLEFT", Gladdy.db.npTotemPlatesSize/16, -Gladdy.db.npTotemPlatesSize/16) + cooldown:SetPoint("BOTTOMRIGHT", gladdyTotemFrame, "BOTTOMRIGHT", -Gladdy.db.npTotemPlatesSize/16, Gladdy.db.npTotemPlatesSize/16) + elseif cooldown.id and gladdyTotemFrame and gladdyTotemFrame:IsShown() and not Gladdy.db.totemPulseTotems["totem" .. cooldown.id].attachToGladdyTotemFrame then + cooldown:SetPoint("TOP", gladdyTotemFrame, "BOTTOM", 0, -0.5) + else + cooldown:SetPoint("TOP", nameplate, "BOTTOM", 0, -0.5) + end + end end function TotemPulse:UpdateFrameOnce() From c6c3d230742f634377cb5035e14d8c571f4444ba Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Fri, 25 Mar 2022 00:01:18 +0100 Subject: [PATCH 39/51] add custom tags to PowerBar --- Modules/ExportImport.lua | 1 + Modules/Healthbar.lua | 13 +- Modules/Powerbar.lua | 331 ++++++++++++++++++++++++--------------- Util.lua | 11 +- 4 files changed, 217 insertions(+), 139 deletions(-) diff --git a/Modules/ExportImport.lua b/Modules/ExportImport.lua index 3cc5676..d049d48 100644 --- a/Modules/ExportImport.lua +++ b/Modules/ExportImport.lua @@ -111,6 +111,7 @@ local deletedOptions = { -- backwards compatibility trinketPos = true, padding = true, growUp = true, + powerBarFontSize = true, } local function checkIsDeletedOption(k, str, msg, errorFound, errorMsg) diff --git a/Modules/Healthbar.lua b/Modules/Healthbar.lua index 4523a87..2e91cba 100644 --- a/Modules/Healthbar.lua +++ b/Modules/Healthbar.lua @@ -28,7 +28,6 @@ local Healthbar = Gladdy:NewModule("Health Bar", 100, { healthFrameStrata = "MEDIUM", healthFrameLevel = 1, healthCustomTagsEnabled = false, - healthTextRight = "[percent|status]", healthTextLeft = "[name]", healthTextRight = "[percent|status]", healthTextLeftOutline = false, @@ -122,12 +121,13 @@ function Healthbar.OnEvent(self, event, unit) self.hp:SetMinMaxValues(0, healthMax) self.hp:SetValue(health) self.hp.current = health + self.hp.max = healthMax Healthbar:SetText(unit, health, healthMax) --Healthbar:SetHealthText(self, health, healthMax) elseif event == "UNIT_NAME_UPDATE" then local name = UnitName(unit) Gladdy.buttons[unit].name = name - Healthbar:SetText(unit, self.hp.current, 100) + Healthbar:SetText(unit, self.hp.current, self.hp.max) end if not Gladdy.buttons[unit].class then Gladdy:SpotEnemy(unit, true) @@ -245,6 +245,7 @@ function Healthbar:Test(unit) --self:JOINED_ARENA() Gladdy:SendMessage("UNIT_HEALTH", unit, button.health, button.healthMax) healthBar.hp.current = button.health + healthBar.hp.max = button.healthMax self:ENEMY_SPOTTED(unit) self:SetText(unit, button.health, button.healthMax) healthBar.hp:SetValue(button.health) @@ -259,7 +260,7 @@ function Healthbar:UNIT_SPEC(unit) if not button then return end - self:SetText(unit, button.healthBar.hp.current, 100) + self:SetText(unit, button.healthBar.hp.current, button.healthBar.hp.max) --button.healthBar.nameText:SetText(Gladdy:SetTag(unit, Gladdy.db.healthTextLeft, button.health, button.healthMax)) end @@ -282,6 +283,7 @@ function Healthbar:ENEMY_SPOTTED(unit) healthBar.hp:SetMinMaxValues(0, healthMax) healthBar.hp:SetValue(health) healthBar.hp.current = health + healthBar.hp.max = healthMax Healthbar:SetText(unit, health, healthMax) --Healthbar:SetHealthText(healthBar, health, healthMax) end @@ -310,8 +312,7 @@ function Healthbar:UNIT_DESTROYED(unit) healthBar.hp:SetValue(0) healthBar.hp.current = 0 - healthBar.healthText:SetText(L["LEAVE"]) - healthBar.nameText:SetText("") + Healthbar:SetText(unit, 0, 100, L["LEAVE"]) end local function option(params) @@ -455,7 +456,7 @@ function Healthbar:GetOptions() max = 20, width = "full", }), - headerLeftText = { + headerOffsets = { type = "header", name = L["Offsets"], order = 30, diff --git a/Modules/Powerbar.lua b/Modules/Powerbar.lua index 5f48021..786ca59 100644 --- a/Modules/Powerbar.lua +++ b/Modules/Powerbar.lua @@ -16,7 +16,8 @@ local Powerbar = Gladdy:NewModule("Power Bar", 90, { powerBarBorderColor = { r = 0, g = 0, b = 0, a = 1 }, powerBarFontColor = { r = 1, g = 1, b = 1, a = 1 }, powerBarBgColor = { r = 0.3, g = 0.3, b = 0.3, a = 0.7 }, - powerBarFontSize = 10, + powerBarRaceFontSize = 10, + powerBarPowerFontSize = 10, powerShowSpec = true, powerShowRace = true, powerActual = true, @@ -24,6 +25,15 @@ local Powerbar = Gladdy:NewModule("Power Bar", 90, { powerPercentage = false, powerFrameStrata = "MEDIUM", powerFrameLevel = 1, + powerCustomTagsEnabled = false, + powerTextLeft = "[spec] [race]", + powerTextRight = "[current]/[max]", + powerTextLeftOutline = false, + powerTextRightOutline = false, + powerTextLeftVOffset = 1, + powerTextLeftHOffset = 5, + powerTextRightVOffset = 1, + powerTextRightHOffset = -5, }) function Powerbar:Initialize() @@ -72,85 +82,31 @@ function Powerbar:CreateFrame(unit) powerBar.bg:SetVertexColor(Gladdy:SetColor(Gladdy.db.powerBarBgColor)) powerBar.raceText = powerBar:CreateFontString(nil, "LOW") - powerBar.raceText:SetFont(Gladdy:SMFetch("font", "powerBarFont"), Gladdy.db.powerBarFontSize) + powerBar.raceText:SetFont(Gladdy:SMFetch("font", "powerBarFont"), Gladdy.db.powerBarRaceFontSize, Gladdy.db.powerTextLeftOutline and "OUTLINE") powerBar.raceText:SetTextColor(Gladdy:SetColor(Gladdy.db.powerBarFontColor)) powerBar.raceText:SetShadowOffset(1, -1) powerBar.raceText:SetShadowColor(0, 0, 0, 1) powerBar.raceText:SetJustifyH("CENTER") - powerBar.raceText:SetPoint("LEFT", 5, 1) + powerBar.raceText:SetPoint("LEFT", Gladdy.db.powerTextLeftHOffset, Gladdy.db.powerTextLeftVOffset) powerBar.powerText = powerBar:CreateFontString(nil, "LOW") - powerBar.powerText:SetFont(Gladdy:SMFetch("font", "powerBarFont"), Gladdy.db.powerBarFontSize) + powerBar.powerText:SetFont(Gladdy:SMFetch("font", "powerBarFont"), Gladdy.db.powerBarPowerFontSize, Gladdy.db.powerTextRightOutline and "OUTLINE") powerBar.powerText:SetTextColor(Gladdy:SetColor(Gladdy.db.powerBarFontColor)) powerBar.powerText:SetShadowOffset(1, -1) powerBar.powerText:SetShadowColor(0, 0, 0, 1) powerBar.powerText:SetJustifyH("CENTER") - powerBar.powerText:SetPoint("RIGHT", -5, 1) + powerBar.powerText:SetPoint("RIGHT", Gladdy.db.powerTextRightHOffset, Gladdy.db.powerTextRightVOffset) button.powerBar = powerBar self.frames[unit] = powerBar self:ResetUnit(unit) + powerBar.unit = unit powerBar:RegisterUnitEvent("UNIT_POWER_UPDATE", unit) powerBar:RegisterUnitEvent("UNIT_MAXPOWER", unit) powerBar:RegisterUnitEvent("UNIT_DISPLAYPOWER", unit) powerBar:SetScript("OnEvent", Powerbar.OnEvent) end -function Powerbar.OnEvent(powerBar, event, unit) - if event == "UNIT_POWER_UPDATE" then - Powerbar:SetPower(powerBar, UnitPower(unit, UnitPowerType(unit), true), UnitPowerMax(unit, UnitPowerType(unit), true), UnitPowerType(unit)) - elseif event == "UNIT_MAXPOWER" then - Powerbar:SetPower(powerBar, UnitPower(unit, UnitPowerType(unit), true), UnitPowerMax(unit, UnitPowerType(unit), true), UnitPowerType(unit)) - elseif event == "UNIT_DISPLAYPOWER" then - Powerbar:SetPower(powerBar, UnitPower(unit, UnitPowerType(unit), true), UnitPowerMax(unit, UnitPowerType(unit), true), UnitPowerType(unit)) - end -end - -function Powerbar:SetPower(powerBar, power, powerMax, powerType) - local powerPercentage = floor(power * 100 / powerMax) - local powerText - - if (Gladdy.db.powerActual) then - powerText = powerMax > 999 and ("%.1fk"):format(power / 1000) or power - end - - if (Gladdy.db.powerMax) then - local text = powerMax > 999 and ("%.1fk"):format(powerMax / 1000) or powerMax - if (powerText) then - powerText = ("%s/%s"):format(powerText, text) - else - powerText = text - end - end - - if (Gladdy.db.powerPercentage) then - if (powerText) then - powerText = ("%s (%d%%)"):format(powerText, powerPercentage) - else - powerText = ("%d%%"):format(powerPercentage) - end - end - - if (powerType == 1 and powerBar.powerType ~= powerType) then - powerBar.energy:SetStatusBarColor(1, 0, 0, 1) - powerBar.powerColor = {r = 1, g = 0, b = 0} - powerBar.powerType = powerType - elseif (powerType == 3 and powerBar.powerType ~= powerType) then - powerBar.energy:SetStatusBarColor(1, 1, 0, 1) - powerBar.powerColor = {r = 1, g = 1, b = 0} - powerBar.powerType = powerType - elseif powerBar.powerType ~= powerType then - powerBar.energy:SetStatusBarColor(.18, .44, .75, 1) - powerBar.powerColor = {r = .18, g = .44, b = .75} - powerBar.powerType = powerType - end - - powerBar.powerText:SetText(powerText) - powerBar.energy:SetMinMaxValues(0, powerMax) - powerBar.energy:SetValue(power) - -end - function Powerbar:UpdateFrame(unit) local powerBar = self.frames[unit] if (not powerBar) then @@ -182,7 +138,7 @@ function Powerbar:UpdateFrame(unit) powerBar:SetPoint("TOPLEFT", healthBar, "BOTTOMLEFT", 0, -1) powerBar:SetBackdrop({ edgeFile = Gladdy:SMFetch("border", "powerBarBorderStyle"), - edgeSize = Gladdy.db.powerBarBorderSize }) + edgeSize = Gladdy.db.powerBarBorderSize }) powerBar:SetBackdropBorderColor(Gladdy:SetColor(Gladdy.db.powerBarBorderColor)) powerBar.energy:SetStatusBarTexture(Gladdy:SMFetch("statusbar", "powerBarTexture")) @@ -190,10 +146,13 @@ function Powerbar:UpdateFrame(unit) powerBar.energy:SetPoint("TOPLEFT", powerBar, "TOPLEFT", (Gladdy.db.powerBarBorderSize/Gladdy.db.statusbarBorderOffset), -(Gladdy.db.powerBarBorderSize/Gladdy.db.statusbarBorderOffset)) powerBar.energy:SetPoint("BOTTOMRIGHT", powerBar, "BOTTOMRIGHT", -(Gladdy.db.powerBarBorderSize/Gladdy.db.statusbarBorderOffset), (Gladdy.db.powerBarBorderSize/Gladdy.db.statusbarBorderOffset)) - powerBar.raceText:SetFont(Gladdy:SMFetch("font", "powerBarFont"), Gladdy.db.powerBarFontSize) + powerBar.raceText:SetFont(Gladdy:SMFetch("font", "powerBarFont"), Gladdy.db.powerBarRaceFontSize, Gladdy.db.powerTextLeftOutline and "OUTLINE") powerBar.raceText:SetTextColor(Gladdy:SetColor(Gladdy.db.powerBarFontColor)) - powerBar.powerText:SetFont(Gladdy:SMFetch("font", "powerBarFont"), Gladdy.db.powerBarFontSize) + powerBar.raceText:SetPoint("LEFT", Gladdy.db.powerTextLeftHOffset, Gladdy.db.powerTextLeftVOffset) + + powerBar.powerText:SetFont(Gladdy:SMFetch("font", "powerBarFont"), Gladdy.db.powerBarPowerFontSize, Gladdy.db.powerTextRightOutline and "OUTLINE") powerBar.powerText:SetTextColor(Gladdy:SetColor(Gladdy.db.powerBarFontColor)) + powerBar.powerText:SetPoint("RIGHT", Gladdy.db.powerTextRightHOffset, Gladdy.db.powerTextRightVOffset) powerBar:SetFrameStrata(Gladdy.db.powerFrameStrata) powerBar:SetFrameLevel(Gladdy.db.powerFrameLevel) @@ -201,6 +160,83 @@ function Powerbar:UpdateFrame(unit) powerBar.energy:SetFrameLevel(Gladdy.db.powerFrameLevel - 1) end +function Powerbar.OnEvent(powerBar, event, unit) + if event == "UNIT_POWER_UPDATE" then + Powerbar:SetPower(powerBar, unit, UnitPower(unit, UnitPowerType(unit), true), UnitPowerMax(unit, UnitPowerType(unit), true), UnitPowerType(unit)) + elseif event == "UNIT_MAXPOWER" then + Powerbar:SetPower(powerBar, unit, UnitPower(unit, UnitPowerType(unit), true), UnitPowerMax(unit, UnitPowerType(unit), true), UnitPowerType(unit)) + elseif event == "UNIT_DISPLAYPOWER" then + Powerbar:SetPower(powerBar, unit, UnitPower(unit, UnitPowerType(unit), true), UnitPowerMax(unit, UnitPowerType(unit), true), UnitPowerType(unit)) + end +end + +function Powerbar:SetText(unit, power, powerMax, status) + local button = Gladdy.buttons[unit] + if not Gladdy.buttons[unit] then + return + end + local powerBar = button.powerBar + if Gladdy.db.powerCustomTagsEnabled then + powerBar.powerText:SetText(Gladdy:SetTag(unit, Gladdy.db.powerTextRight, power, powerMax, status)) + powerBar.raceText:SetText(Gladdy:SetTag(unit, Gladdy.db.powerTextLeft, power, powerMax, status)) + else + if power then + local powerPercentage = floor(power * 100 / powerMax) + local powerText + if (Gladdy.db.powerActual) then + powerText = powerMax > 999 and ("%.1fk"):format(power / 1000) or power + end + if (Gladdy.db.powerMax) then + local text = powerMax > 999 and ("%.1fk"):format(powerMax / 1000) or powerMax + if (powerText) then + powerText = ("%s/%s"):format(powerText, text) + else + powerText = text + end + end + if (Gladdy.db.powerPercentage) then + if (powerText) then + powerText = ("%s (%d%%)"):format(powerText, powerPercentage) + else + powerText = ("%d%%"):format(powerPercentage) + end + end + powerBar.powerText:SetText(powerText) + end + + local raceText = Gladdy.db.powerShowRace and button.raceLoc or "" + if (button.spec and Gladdy.db.powerShowSpec) then + raceText = button.spec .. " " .. raceText + end + powerBar.raceText:SetText(raceText) + end +end + +function Powerbar:SetPower(powerBar, unit, power, powerMax, powerType, status) + Powerbar:SetText(unit, power, powerMax, status) + powerBar.energy.current = power + powerBar.energy.max = powerMax + powerBar.energy.powerType = powerType + + if (powerType == 1 and powerBar.powerType ~= powerType) then + powerBar.energy:SetStatusBarColor(1, 0, 0, 1) + powerBar.powerColor = {r = 1, g = 0, b = 0} + powerBar.powerType = powerType + elseif (powerType == 3 and powerBar.powerType ~= powerType) then + powerBar.energy:SetStatusBarColor(1, 1, 0, 1) + powerBar.powerColor = {r = 1, g = 1, b = 0} + powerBar.powerType = powerType + elseif powerBar.powerType ~= powerType then + powerBar.energy:SetStatusBarColor(.18, .44, .75, 1) + powerBar.powerColor = {r = .18, g = .44, b = .75} + powerBar.powerType = powerType + end + + powerBar.energy:SetMinMaxValues(0, powerMax) + powerBar.energy:SetValue(power) + +end + function Powerbar:ResetUnit(unit) local powerBar = self.frames[unit] if (not powerBar) then @@ -222,8 +258,14 @@ function Powerbar:Test(unit) return end + powerBar.energy.current = button.power + powerBar.energy.max = button.powerMax + powerBar.energy.powerType = button.powerType self:ENEMY_SPOTTED(unit) self:UNIT_POWER(unit, button.power, button.powerMax, button.powerType) + if unit == "arena1" then + self:UNIT_DEATH(unit) + end end function Powerbar:ENEMY_SPOTTED(unit) @@ -233,13 +275,6 @@ function Powerbar:ENEMY_SPOTTED(unit) return end - local raceText = Gladdy.db.powerShowRace and button.raceLoc or "" - - if (button.spec and Gladdy.db.powerShowSpec) then - raceText = button.spec .. " " .. raceText - end - - powerBar.raceText:SetText(raceText) if UnitExists(unit) then Powerbar:SetPower(powerBar, UnitPower(unit, UnitPowerType(unit), true), UnitPowerMax(unit, UnitPowerType(unit), true), UnitPowerType(unit)) end @@ -251,13 +286,10 @@ function Powerbar:UNIT_SPEC(unit, spec) if (not powerBar or not button) then return end - local raceText = Gladdy.db.powerShowRace and button.raceLoc or "" - if (button.spec and Gladdy.db.powerShowSpec) then - raceText = spec .. " " .. raceText + if UnitExists(unit) then + Powerbar:SetPower(powerBar, unit, powerBar.energy.current, powerBar.energy.max, powerBar.energy.powerType) end - - powerBar.raceText:SetText(raceText) end function Powerbar:UNIT_POWER(unit, power, powerMax, powerType) @@ -269,44 +301,7 @@ function Powerbar:UNIT_POWER(unit, power, powerMax, powerType) if not Gladdy.buttons[unit].class then Gladdy:SpotEnemy(unit, true) end - - local powerPercentage = floor(power * 100 / powerMax) - local powerText - - if (Gladdy.db.powerActual) then - powerText = powerMax > 999 and ("%.1fk"):format(power / 1000) or power - end - - if (Gladdy.db.powerMax) then - local text = powerMax > 999 and ("%.1fk"):format(powerMax / 1000) or powerMax - if (powerText) then - powerText = ("%s/%s"):format(powerText, text) - else - powerText = text - end - end - - if (Gladdy.db.powerPercentage) then - if (powerText) then - powerText = ("%s (%d%%)"):format(powerText, powerPercentage) - else - powerText = ("%d%%"):format(powerPercentage) - end - end - - if (powerType == 1) then - powerBar.energy:SetStatusBarColor(1, 0, 0, 1) - powerBar.powerColor = {r = 1, g = 0, b = 0} - elseif (powerType == 3) then - powerBar.energy:SetStatusBarColor(1, 1, 0, 1) - powerBar.powerColor = {r = 1, g = 1, b = 0} - else - powerBar.energy:SetStatusBarColor(.18, .44, .75, 1) - powerBar.powerColor = {r = .18, g = .44, b = .75} - end - - powerBar.powerText:SetText(powerText) - powerBar.energy:SetValue(powerPercentage) + Powerbar:SetPower(powerBar, unit, power, powerMax, powerType) end function Powerbar:UNIT_DEATH(unit) @@ -314,9 +309,7 @@ function Powerbar:UNIT_DEATH(unit) if (not powerBar) then return end - - powerBar.energy:SetValue(0) - powerBar.powerText:SetText("0%") + Powerbar:SetPower(powerBar, unit, 0, powerBar.energy.max, powerBar.energy.powerType, L["DEAD"]) end function Powerbar:UNIT_DESTROYED(unit) @@ -324,8 +317,7 @@ function Powerbar:UNIT_DESTROYED(unit) if (not powerBar) then return end - powerBar.energy:SetValue(0) - powerBar.powerText:SetText("0%") + Powerbar:SetPower(powerBar, unit, 0, powerBar.energy.max, powerBar.energy.powerType, L["LEAVE"]) end local function option(params) @@ -341,8 +333,10 @@ local function option(params) if Gladdy.db.powerBarBorderSize > Gladdy.db.powerBarHeight/2 then Gladdy.db.powerBarBorderSize = Gladdy.db.powerBarHeight/2 end - for i=1,Gladdy.curBracket do - Powerbar:Test("arena" .. i) + if Gladdy.frame.testing then + for i=1,Gladdy.curBracket do + Powerbar:Test("arena" .. i) + end end Gladdy:UpdateFrame() end, @@ -436,16 +430,84 @@ function Powerbar:GetOptions() order = 12, hasAlpha = true, }), - powerBarFontSize = option({ - type = "range", - name = L["Font size"], - desc = L["Size of the text"], + powerTextLeftOutline = option({ + type = "toggle", + name = L["Left Font Outline"], order = 13, + width = "full", + }), + powerTextRightOutline = option({ + type = "toggle", + name = L["Right Font Outline"], + order = 14, + width = "full", + }), + headerSize = { + type = "header", + name = L["Size"], + order = 20, + }, + powerBarRaceFontSize = option({ + type = "range", + name = L["Race font size"], + desc = L["Size of the race text"], + order = 21, step = 0.1, - min = 1, + min = 0, max = 20, width = "full", }), + powerBarPowerFontSize = option({ + type = "range", + name = L["Power font size"], + desc = L["Size of the power text"], + order = 22, + step = 0.1, + min = 0, + max = 20, + width = "full", + }), + headerOffsets = { + type = "header", + name = L["Offsets"], + order = 30, + }, + powerTextLeftVOffset = option({ + type = "range", + name = L["Left Text Vertical Offset"], + order = 31, + step = 0.1, + min = -200, + max = 200, + width = "full", + }), + powerTextLeftHOffset = option({ + type = "range", + name = L["Left Text Horizontal Offset"], + order = 32, + step = 0.1, + min = -200, + max = 200, + width = "full", + }), + powerTextRightVOffset = option({ + type = "range", + name = L["Right Text Vertical Offset"], + order = 33, + step = 0.1, + min = -200, + max = 200, + width = "full", + }), + powerTextRightHOffset = option({ + type = "range", + name = L["Right Text Horizontal Offset"], + order = 34, + step = 0.1, + min = -200, + max = 200, + width = "full", + }), }, }, border = { @@ -528,31 +590,44 @@ function Powerbar:GetOptions() name = L["Show race"], desc = L["Show race"], order = 2, + disabled = function() return Gladdy.db.powerCustomTagsEnabled end, }), powerShowSpec= option({ type = "toggle", name = L["Show spec"], desc = L["Show spec"], order = 3, + disabled = function() return Gladdy.db.powerCustomTagsEnabled end, }), powerActual = option({ type = "toggle", name = L["Show the actual power"], desc = L["Show the actual power on the power bar"], - order = 31, + order = 4, + disabled = function() return Gladdy.db.powerCustomTagsEnabled end, }), powerMax = option({ type = "toggle", name = L["Show max power"], desc = L["Show max power on the power bar"], - order = 32, + order = 5, + disabled = function() return Gladdy.db.powerCustomTagsEnabled end, }), powerPercentage = option({ type = "toggle", name = L["Show power percentage"], desc = L["Show power percentage on the power bar"], - order = 33, + order = 6, + disabled = function() return Gladdy.db.powerCustomTagsEnabled end, }), + header = { + type = "header", + name = L["Custom Tags"], + order = 10, + }, + powerCustomTagsEnabled = Gladdy:GetTagOption(L["Custom Tags Enabled"], 11, nil, option, true), + powerTextLeft = Gladdy:GetTagOption(L["Left Text"], 12, "powerCustomTagsEnabled", option), + powerTextRight = Gladdy:GetTagOption(L["Right Text"], 13, "powerCustomTagsEnabled", option), }, }, }, diff --git a/Util.lua b/Util.lua index 204e9d0..947a877 100644 --- a/Util.lua +++ b/Util.lua @@ -43,9 +43,9 @@ local function getTagText(unit, tag, current, max, status) if str_find(tag, "percent") then return current and max and floor(current * 100 / max) .. "%%" or "" elseif str_find(tag, "current") then - return current or "" + return current and max > 999 and ("%.1fk"):format(current / 1000) or current or "" elseif str_find(tag, "max") then - return max or "" + return max and max > 999 and ("%.1fk"):format(max / 1000) or max or "" elseif str_find(tag, "status") then if str_find(tag, "%|") and status == nil then return nil @@ -55,11 +55,12 @@ local function getTagText(unit, tag, current, max, status) elseif str_find(tag, "name") then return button.name or "" elseif str_find(tag, "class") then - return button.classLoc or "" + return button.classLoc or "" elseif str_find(tag, "race") then - return button.raceLoc or "" + return button.raceLoc or "" elseif str_find(tag, "arena") then - return str_gsub(unit, "arena", "") + local str,found = str_gsub(unit, "arena", "") + return found == 1 and str or "" elseif str_find(tag, "spec") then if str_find(tag, "%|") and button.spec == nil then return nil From 10caa05e314cf3d7ac18deaa933ab1369e36c213 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Fri, 25 Mar 2022 00:02:25 +0100 Subject: [PATCH 40/51] cooldowns test only active icons --- Modules/Cooldowns.lua | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/Modules/Cooldowns.lua b/Modules/Cooldowns.lua index 3b8bf5a..5bcee89 100644 --- a/Modules/Cooldowns.lua +++ b/Modules/Cooldowns.lua @@ -311,13 +311,17 @@ end function Cooldowns:UpdateTestCooldowns(unit) local button = Gladdy.buttons[unit] self:UpdateCooldowns(button) - -- use class spells - for spellId,_ in pairs(Gladdy:GetCooldownList()[button.class]) do - self:CooldownUsed(unit, button.class, spellId) + + local orderedIcons = {} + for _,icon in pairs(button.spellCooldownFrame.icons) do + tinsert(orderedIcons, icon) end - -- use race spells - for spellId,_ in pairs(Gladdy:GetCooldownList()[button.race]) do - self:CooldownUsed(unit, button.race, spellId) + tbl_sort(orderedIcons, function(a, b) + return Gladdy.db.cooldownCooldownsOrder[button.class][tostring(a.spellId)] < Gladdy.db.cooldownCooldownsOrder[button.class][tostring(b.spellId)] + end) + + for _,icon in ipairs(orderedIcons) do + self:CooldownUsed(unit, button.class, icon.spellId) end end From 5b32b8c79311edd403a0e125afb83fdc6d95c1fc Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Fri, 25 Mar 2022 15:59:43 +0100 Subject: [PATCH 41/51] grouping auras, interrupts, classicon, racial, trinket --- Modules/Auras.lua | 97 +++++++++++++++++++++++++++++++++++++++++-- Modules/Classicon.lua | 38 ++++++++++++++--- Modules/Cooldowns.lua | 15 +++++-- Modules/Pets.lua | 10 ++--- Modules/Racial.lua | 42 ++++++++++++++++++- Modules/Trinket.lua | 40 +++++++++++++++++- 6 files changed, 222 insertions(+), 20 deletions(-) diff --git a/Modules/Auras.lua b/Modules/Auras.lua index 5d33667..bbe428a 100644 --- a/Modules/Auras.lua +++ b/Modules/Auras.lua @@ -1,5 +1,5 @@ local pairs, ipairs, select, tinsert, tbl_sort, tostring, tonumber, rand = pairs, ipairs, select, tinsert, table.sort, tostring, tonumber, math.random - +local str_gsub = string.gsub local GetSpellInfo = GetSpellInfo local GetSpellDescription = GetSpellDescription local CreateFrame, GetTime = CreateFrame, GetTime @@ -56,6 +56,10 @@ local Auras = Gladdy:NewModule("Auras", nil, { auraFrameLevel = 5, auraInterruptFrameStrata = "MEDIUM", auraInterruptFrameLevel = 5, + auraGroup = false, + auraGroupDirection = "DOWN", + auraInterruptGroup = false, + auraInterruptGroupDirection = "DOWN", }) function Auras:Initialize() @@ -239,6 +243,23 @@ function Auras:UpdateFrame(unit) auraFrame:ClearAllPoints() Gladdy:SetPosition(auraFrame, unit, "auraXOffset", "auraYOffset", true, Auras) + + if (Gladdy.db.auraGroup) then + if (unit ~= "arena1") then + local previousUnit = "arena" .. str_gsub(unit, "arena", "") - 1 + self.frames[unit]:ClearAllPoints() + if Gladdy.db.auraGroupDirection == "RIGHT" then + self.frames[unit]:SetPoint("LEFT", self.frames[previousUnit], "RIGHT", 0, 0) + elseif Gladdy.db.auraGroupDirection == "LEFT" then + self.frames[unit]:SetPoint("RIGHT", self.frames[previousUnit], "LEFT", 0, 0) + elseif Gladdy.db.auraGroupDirection == "UP" then + self.frames[unit]:SetPoint("BOTTOM", self.frames[previousUnit], "TOP", 0, 0) + elseif Gladdy.db.auraGroupDirection == "DOWN" then + self.frames[unit]:SetPoint("TOP", self.frames[previousUnit], "BOTTOM", 0, 0) + end + end + end + if (unit == "arena1") then Gladdy:CreateMover(auraFrame, "auraXOffset", "auraYOffset", L["Auras"], {"TOPLEFT", "TOPLEFT"}, @@ -321,6 +342,23 @@ function Auras:UpdateInterruptFrame(unit) interruptFrame:ClearAllPoints() Gladdy:SetPosition(interruptFrame, unit, "auraInterruptXOffset", "auraInterruptYOffset", true, Auras) + + if (Gladdy.db.auraInterruptGroup) then + if (unit ~= "arena1") then + local previousUnit = "arena" .. str_gsub(unit, "arena", "") - 1 + self.frames[unit].interruptFrame:ClearAllPoints() + if Gladdy.db.auraInterruptGroupDirection == "RIGHT" then + self.frames[unit].interruptFrame:SetPoint("LEFT", self.frames[previousUnit].interruptFrame, "RIGHT", 0, 0) + elseif Gladdy.db.auraInterruptGroupDirection == "LEFT" then + self.frames[unit].interruptFrame:SetPoint("RIGHT", self.frames[previousUnit].interruptFrame, "LEFT", 0, 0) + elseif Gladdy.db.auraInterruptGroupDirection == "UP" then + self.frames[unit].interruptFrame:SetPoint("BOTTOM", self.frames[previousUnit].interruptFrame, "TOP", 0, 0) + elseif Gladdy.db.auraInterruptGroupDirection == "DOWN" then + self.frames[unit].interruptFrame:SetPoint("TOP", self.frames[previousUnit].interruptFrame, "BOTTOM", 0, 0) + end + end + end + if (unit == "arena1") then Gladdy:CreateMover(interruptFrame, "auraInterruptXOffset", "auraInterruptYOffset", L["Interrupts"], {"TOPLEFT", "TOPLEFT"}, @@ -682,10 +720,63 @@ function Auras:GetOptions() name = L["Frame"], order = 3, args = { + groupOptions = { + type = "group", + name = L["Group"], + order = 4, + args = { + headerAuras = { + type = "header", + name = L["Auras"], + order = 1, + }, + auraGroup = Gladdy:option({ + type = "toggle", + name = L["Group"] .. " " .. L["Auras"], + order = 2, + disabled = function() return not Gladdy.db.auraDetached end, + }), + auraGroupDirection = Gladdy:option({ + type = "select", + name = L["Group direction"], + order = 3, + values = { + ["RIGHT"] = L["Right"], + ["LEFT"] = L["Left"], + ["UP"] = L["Up"], + ["DOWN"] = L["Down"], + }, + disabled = function() return not Gladdy.db.auraGroup or not Gladdy.db.auraDetached end, + }), + headerInterrupts = { + type = "header", + name = L["Interrupts"], + order = 4, + }, + auraInterruptGroup = Gladdy:option({ + type = "toggle", + name = L["Group"] .. " " .. L["Interrupts"], + order = 5, + disabled = function() return not Gladdy.db.auraInterruptDetached end, + }), + auraInterruptGroupDirection = Gladdy:option({ + type = "select", + name = L["Group direction"], + order = 6, + values = { + ["RIGHT"] = L["Right"], + ["LEFT"] = L["Left"], + ["UP"] = L["Up"], + ["DOWN"] = L["Down"], + }, + disabled = function() return not Gladdy.db.auraInterruptGroup or not Gladdy.db.auraInterruptDetached end, + }), + } + }, detachedAuraMode = { type = "group", name = L["Detached Aura"], - order = 4, + order = 5, args = { headerDetachedMode = { type = "header", @@ -789,7 +880,7 @@ function Auras:GetOptions() detachedInterruptMode = { type = "group", name = L["Detached Interrupt"], - order = 5, + order = 6, args = { headerDetachedMode = { type = "header", diff --git a/Modules/Classicon.lua b/Modules/Classicon.lua index d9c476a..abaa060 100644 --- a/Modules/Classicon.lua +++ b/Modules/Classicon.lua @@ -1,4 +1,4 @@ -local select = select +local select, str_gsub = select, string.gsub local Gladdy = LibStub("Gladdy") local CreateFrame = CreateFrame @@ -16,7 +16,7 @@ local Classicon = Gladdy:NewModule("Class Icon", 81, { classIconFrameStrata = "MEDIUM", classIconFrameLevel = 5, classIconGroup = false, - classIconGroupDirection = "RIGHT" + classIconGroupDirection = "DOWN" }) local classIconPath = "Interface\\Addons\\Gladdy\\Images\\Classes\\" @@ -137,9 +137,17 @@ function Classicon:UpdateFrame(unit) if (Gladdy.db.classIconGroup) then if (unit ~= "arena1") then - local previousUnit = "arena" .. string.gsub(unit, "arena", "") - 1 + local previousUnit = "arena" .. str_gsub(unit, "arena", "") - 1 self.frames[unit]:ClearAllPoints() - self.frames[unit]:SetPoint("LEFT", self.frames[previousUnit], "RIGHT", 0, 0) + if Gladdy.db.classIconGroupDirection == "RIGHT" then + self.frames[unit]:SetPoint("LEFT", self.frames[previousUnit], "RIGHT", 0, 0) + elseif Gladdy.db.classIconGroupDirection == "LEFT" then + self.frames[unit]:SetPoint("RIGHT", self.frames[previousUnit], "LEFT", 0, 0) + elseif Gladdy.db.classIconGroupDirection == "UP" then + self.frames[unit]:SetPoint("BOTTOM", self.frames[previousUnit], "TOP", 0, 0) + elseif Gladdy.db.classIconGroupDirection == "DOWN" then + self.frames[unit]:SetPoint("TOP", self.frames[previousUnit], "BOTTOM", 0, 0) + end end end @@ -228,11 +236,31 @@ function Classicon:GetOptions() end end }, + classIconGroup = Gladdy:option({ + type = "toggle", + name = L["Group"] .. " " .. L["Class Icon"], + order = 5, + disabled = function() return not Gladdy.db.classIconEnabled end, + }), + classIconGroupDirection = Gladdy:option({ + type = "select", + name = L["Group direction"], + order = 6, + values = { + ["RIGHT"] = L["Right"], + ["LEFT"] = L["Left"], + ["UP"] = L["Up"], + ["DOWN"] = L["Down"], + }, + disabled = function() + return not Gladdy.db.classIconGroup or not Gladdy.db.classIconEnabled + end, + }), group = { type = "group", childGroups = "tree", name = L["Frame"], - order = 4, + order = 7, disabled = function() return not Gladdy.db.classIconEnabled end, args = { size = { diff --git a/Modules/Cooldowns.lua b/Modules/Cooldowns.lua index 5bcee89..e915321 100644 --- a/Modules/Cooldowns.lua +++ b/Modules/Cooldowns.lua @@ -236,6 +236,7 @@ function Cooldowns:UpdateFrame(unit) end if (Gladdy.db.cooldownGroup) then + --TODO fix overlapping if (unit ~= "arena1") then local previousUnit = "arena" .. string.gsub(unit, "arena", "") - 1 self.frames[unit]:ClearAllPoints() @@ -552,6 +553,12 @@ function Cooldowns:GetOptions() desc = L["Enabled cooldown module"], order = 2, }), + cooldownGroup = Gladdy:option({ + type = "toggle", + name = L["Group"] .. " " .. L["Cooldown"], + order = 3, + disabled = function() return not Gladdy.db.cooldown end, + }), group = { type = "group", childGroups = "tree", @@ -858,8 +865,8 @@ function Cooldowns:GetCooldownOptions() order = 2, width = 0.1, image = "Interface\\Addons\\Gladdy\\Images\\uparrow", - imageWidth = 20, - imageHeight = 20, + imageWidth = 15, + imageHeight = 15, func = function() if (Gladdy.db.cooldownCooldownsOrder[class][tostring(spellId)] > 1) then local current = Gladdy.db.cooldownCooldownsOrder[class][tostring(spellId)] @@ -883,8 +890,8 @@ function Cooldowns:GetCooldownOptions() order = 3, width = 0.1, image = "Interface\\Addons\\Gladdy\\Images\\downarrow", - imageWidth = 20, - imageHeight = 20, + imageWidth = 15, + imageHeight = 15, func = function() if (Gladdy.db.cooldownCooldownsOrder[class][tostring(spellId)] < tblLength) then local current = Gladdy.db.cooldownCooldownsOrder[class][tostring(spellId)] diff --git a/Modules/Pets.lua b/Modules/Pets.lua index d54ceab..4e9d648 100644 --- a/Modules/Pets.lua +++ b/Modules/Pets.lua @@ -389,6 +389,11 @@ function Pets:GetOptions() desc = L["Enables Pets module"], order = 3, }), + petGroup = option({ + type = "toggle", + name = L["Group Pets"], + order = 4, + }), group = { type = "group", childGroups = "tree", @@ -426,11 +431,6 @@ function Pets:GetOptions() step = 1, width = "full", }), - petGroup = option({ - type = "toggle", - name = L["Group Pets"], - order = 5, - }), petMargin = option({ type = "range", name = L["Margin"], diff --git a/Modules/Racial.lua b/Modules/Racial.lua index ac8bc50..335b3fe 100644 --- a/Modules/Racial.lua +++ b/Modules/Racial.lua @@ -1,4 +1,4 @@ -local ceil = ceil +local ceil, str_gsub = ceil, string.gsub local CreateFrame = CreateFrame local GetTime = GetTime @@ -20,6 +20,8 @@ local Racial = Gladdy:NewModule("Racial", 79, { racialCooldownNumberAlpha = 1, racialFrameStrata = "MEDIUM", racialFrameLevel = 5, + racialGroup = false, + racialGroupDirection = "DOWN", }) @@ -153,6 +155,22 @@ function Racial:UpdateFrame(unit) Gladdy:SetPosition(racial, unit, "racialXOffset", "racialYOffset", Racial:LegacySetPosition(racial, unit), Racial) + if (Gladdy.db.racialGroup) then + if (unit ~= "arena1") then + local previousUnit = "arena" .. str_gsub(unit, "arena", "") - 1 + self.frames[unit]:ClearAllPoints() + if Gladdy.db.racialGroupDirection == "RIGHT" then + self.frames[unit]:SetPoint("LEFT", self.frames[previousUnit], "RIGHT", 0, 0) + elseif Gladdy.db.racialGroupDirection == "LEFT" then + self.frames[unit]:SetPoint("RIGHT", self.frames[previousUnit], "LEFT", 0, 0) + elseif Gladdy.db.racialGroupDirection == "UP" then + self.frames[unit]:SetPoint("BOTTOM", self.frames[previousUnit], "TOP", 0, 0) + elseif Gladdy.db.racialGroupDirection == "DOWN" then + self.frames[unit]:SetPoint("TOP", self.frames[previousUnit], "BOTTOM", 0, 0) + end + end + end + if (unit == "arena1") then Gladdy:CreateMover(racial,"racialXOffset", "racialYOffset", L["Racial"], {"TOPLEFT", "TOPLEFT"}, @@ -241,11 +259,31 @@ function Racial:GetOptions() desc = L["Enable racial icon"], order = 3, }), + racialGroup = Gladdy:option({ + type = "toggle", + name = L["Group"] .. " " .. L["Racial"], + order = 4, + disabled = function() return not Gladdy.db.racialEnabled end, + }), + racialGroupDirection = Gladdy:option({ + type = "select", + name = L["Group direction"], + order = 5, + values = { + ["RIGHT"] = L["Right"], + ["LEFT"] = L["Left"], + ["UP"] = L["Up"], + ["DOWN"] = L["Down"], + }, + disabled = function() + return not Gladdy.db.racialGroup or not Gladdy.db.racialEnabled + end, + }), group = { type = "group", childGroups = "tree", name = L["Frame"], - order = 4, + order = 6, disabled = function() return not Gladdy.db.racialEnabled end, args = { general = { diff --git a/Modules/Trinket.lua b/Modules/Trinket.lua index 13f7f49..fd14d10 100644 --- a/Modules/Trinket.lua +++ b/Modules/Trinket.lua @@ -1,4 +1,4 @@ -local ceil = ceil +local ceil, str_gsub = ceil, string.gsub local C_PvP = C_PvP local CreateFrame = CreateFrame @@ -25,6 +25,8 @@ local Trinket = Gladdy:NewModule("Trinket", 80, { trinketColored = false, trinketColoredCd = { r = 1, g = 0, b = 0, a = 1 }, trinketColoredNoCd = { r = 0, g = 1, b = 0, a = 1 }, + trinketGroup = false, + trinketGroupDirection = "DOWN", }) function Trinket:Initialize() @@ -175,6 +177,22 @@ function Trinket:UpdateFrame(unit) Gladdy:SetPosition(trinket, unit, "trinketXOffset", "trinketYOffset", Trinket:LegacySetPosition(trinket, unit), Trinket) + if (Gladdy.db.trinketGroup) then + if (unit ~= "arena1") then + local previousUnit = "arena" .. str_gsub(unit, "arena", "") - 1 + self.frames[unit]:ClearAllPoints() + if Gladdy.db.trinketGroupDirection == "RIGHT" then + self.frames[unit]:SetPoint("LEFT", self.frames[previousUnit], "RIGHT", 0, 0) + elseif Gladdy.db.trinketGroupDirection == "LEFT" then + self.frames[unit]:SetPoint("RIGHT", self.frames[previousUnit], "LEFT", 0, 0) + elseif Gladdy.db.trinketGroupDirection == "UP" then + self.frames[unit]:SetPoint("BOTTOM", self.frames[previousUnit], "TOP", 0, 0) + elseif Gladdy.db.trinketGroupDirection == "DOWN" then + self.frames[unit]:SetPoint("TOP", self.frames[previousUnit], "BOTTOM", 0, 0) + end + end + end + if (unit == "arena1") then Gladdy:CreateMover(trinket,"trinketXOffset", "trinketYOffset", L["Trinket"], {"TOPLEFT", "TOPLEFT"}, @@ -299,6 +317,26 @@ function Trinket:GetOptions() hasAlpha = true, disabled = function() return not Gladdy.db.trinketEnabled end, }), + trinketGroup = Gladdy:option({ + type = "toggle", + name = L["Group Class Icons"], + order = 7, + disabled = function() return not Gladdy.db.trinketEnabled end, + }), + trinketGroupDirection = Gladdy:option({ + type = "select", + name = L["Group direction"], + order = 8, + values = { + ["RIGHT"] = L["Right"], + ["LEFT"] = L["Left"], + ["UP"] = L["Up"], + ["DOWN"] = L["Down"], + }, + disabled = function() + return not Gladdy.db.trinketGroup or not Gladdy.db.trinketEnabled + end, + }), group = { type = "group", childGroups = "tree", From eddd7588f426e1bac71bf4e4fc47dc2812336786 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Fri, 25 Mar 2022 16:36:27 +0100 Subject: [PATCH 42/51] #31 frames expand a centric point option added --- Frame.lua | 9 +++++++-- Options.lua | 9 ++++++++- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/Frame.lua b/Frame.lua index 2713510..e236d2e 100644 --- a/Frame.lua +++ b/Frame.lua @@ -134,6 +134,8 @@ function Gladdy:UpdateFrame() local height = (self.db.healthBarHeight + powerBarHeight) * teamSize + (self.db.highlightInset and 0 or self.db.highlightBorderSize * 2 * teamSize) + self.db.bottomMargin * (teamSize - 1) + local singleFrameHeight = self.db.healthBarHeight + powerBarHeight + + (self.db.highlightInset and 0 or self.db.highlightBorderSize * 2) + self.db.bottomMargin -- Highlight margin = margin + highlightBorderSize @@ -155,10 +157,13 @@ function Gladdy:UpdateFrame() self.frame:SetPoint("CENTER") else local scale = self.frame:GetEffectiveScale() + local growMiddle = self.db.growMiddle and teamSize > 0 and teamSize / 2 >= 1 and (teamSize - 1) * (singleFrameHeight / 2) or 0 if (self.db.growDirection == "TOP") then - self.frame:SetPoint("BOTTOMLEFT", UIParent, "BOTTOMLEFT", self.db.x / scale, self.db.y / scale) + self.frame:SetPoint("BOTTOMLEFT", UIParent, "BOTTOMLEFT", self.db.x / scale, (self.db.y / scale) - growMiddle) + elseif self.db.growDirection == "BOTTOM" then + self.frame:SetPoint("TOPLEFT", UIParent, "BOTTOMLEFT", self.db.x / scale, (self.db.y / scale) + growMiddle) else - self.frame:SetPoint("TOPLEFT", UIParent, "BOTTOMLEFT", self.db.x / scale, self.db.y / scale) + self.frame:SetPoint("TOPLEFT", UIParent, "BOTTOMLEFT", self.db.x / scale, (self.db.y / scale)) end end diff --git a/Options.lua b/Options.lua index ea4c3a3..78f78e1 100644 --- a/Options.lua +++ b/Options.lua @@ -48,6 +48,7 @@ Gladdy.defaults = { x = 0, y = 0, growDirection = "BOTTOM", + growMiddle = false, frameScale = 1, pixelPerfect = false, barWidth = 180, @@ -311,7 +312,7 @@ function Gladdy:SetupOptions() group = { type = "group", name = L["General"], - order = 5, + order = 6, childGroups = "tree", args = { frameGeneral = { @@ -322,6 +323,12 @@ function Gladdy:SetupOptions() headerFrame = { type = "header", name = L["Frame General"], + order = 2, + }, + growMiddle = { + type = "toggle", + name = L["Grow Middle"], + desc = L["Frames expand along a centric anchor"], order = 3, }, pixelPerfect = { From 15fb697258d93e454120de4bc8d74aef7588866a Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Fri, 25 Mar 2022 17:02:37 +0100 Subject: [PATCH 43/51] readme + version --- Gladdy.lua | 2 +- Gladdy.toc | 6 +++--- README.md | 34 ++++++++++++++++++++++++++++++++-- 3 files changed, 36 insertions(+), 6 deletions(-) diff --git a/Gladdy.lua b/Gladdy.lua index 808b2c3..0270772 100644 --- a/Gladdy.lua +++ b/Gladdy.lua @@ -31,7 +31,7 @@ local MAJOR, MINOR = "Gladdy", 5 local Gladdy = LibStub:NewLibrary(MAJOR, MINOR) local L Gladdy.version_major_num = 2 -Gladdy.version_minor_num = 0.00 +Gladdy.version_minor_num = 0.10 Gladdy.version_num = Gladdy.version_major_num + Gladdy.version_minor_num Gladdy.version_releaseType = RELEASE_TYPES.release Gladdy.version = PREFIX .. Gladdy.version_num .. "-" .. Gladdy.version_releaseType diff --git a/Gladdy.toc b/Gladdy.toc index 9fe7adc..098d2c1 100644 --- a/Gladdy.toc +++ b/Gladdy.toc @@ -1,7 +1,7 @@ -## Interface: 20503 +## Interface: 20504 ## Title: Gladdy - TBC -## Version: 2.00-Release -## Notes: The most powerful arena AddOn for WoW 2.5.3 +## Version: 2.10-Release +## Notes: The most powerful arena AddOn for WoW 2.5.4 ## Author: XiconQoo, DnB_Junkee, Knall ## X-Email: contact me on discord Knall#1751 ## SavedVariables: GladdyXZ diff --git a/README.md b/README.md index 2c4d356..9fc6876 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ # Gladdy - TBC -### The most powerful arena addon for WoW TBC 2.5.1 +### The most powerful arena addon for WoW TBC 2.5.4 --- -## [v2.00-Release Download Here](https://github.com/XiconQoo/Gladdy-TBC/releases/download/v2.00-Release/Gladdy_TBC-Classic_v2.00-Release.zip) +## [v2.10-Release Download Here](https://github.com/XiconQoo/Gladdy-TBC/releases/download/v2.10-Release/Gladdy_TBC-Classic_v2.10-Release.zip) ###### Please consider donating if you like my work @@ -78,6 +78,36 @@ Thank you! ### Changes +### v2.10-Release + +- **Totems**: + - added new module **TotemPulse** (sorry Shamans) + - displays pulse ticks on all totems that have a pulse mechanic (e.g. tremor totem) + - either cooldown or bar style + - attaches to TotemPlates if enabled (con be configured individually by totem) + - completely hide totem nameplate option added + - added a dummy totemplate in config mode + - totem detection is completely localization independent now +- **Cooldowns**: + - completely refactored to fix general bugs + - can now be ordered individually + - some cooldown tracking improved for units coming out of stealth (e.g. perception, sprint, shadowstep) +- **Custom Text Tags** + - PowerBar and HealthBar can now have custom tags. Check it out + - also the texts can be moved to achieve a Blizzlike style with names above HealthBar +- general improvements to spec detection + - no more restoration warlocks :D + - tree of life spec detection should work now +- fix Announcements +- added grouping option for Auras (+ Interrupts) in detached mode, ClassIcon, Cooldowns, Trinket, Racial +- added a "Grow Middle" option, which aligns the gladdy frames on a centric point +- added frFR localization by Macumba +- added Flat statusbar texture +- added some auras (e.g. disarm) +- added disarm DRs +- improved some class icons +- fixed health bug since 2.5.4 + ### v2.00-Release This is a packed release with new features and bugfixes. Most importantly, positioning of all elements has been redone with movable frames. From f283ea994a6586fe845f002591cb2cf158c861c3 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Fri, 25 Mar 2022 17:16:17 +0100 Subject: [PATCH 44/51] updated Mir Profile --- ImportStrings.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ImportStrings.lua b/ImportStrings.lua index effd467..fef1286 100644 --- a/ImportStrings.lua +++ b/ImportStrings.lua @@ -25,7 +25,7 @@ function Gladdy:GetRukkProfile() end function Gladdy:GetMirProfile() - return "4XzT80SCBJZKpm75XfXpee4OvsCIRnXXRLtntQAkndLeTf3ir6LKAZ45qE2)AGUbjejLIyIZLiAsGgn6Ur)pYc2I7xmF5(hEOEM9FUEvzXTPRxNx84IBylMxLw8y2R2KT6l3w(1SQzPv3N9pnlMTy(Q06g4pNvwToR6vLBlRSqk1nRLlUjAX8hD)BL9FBwmFnmOYTRl)AXLBFAdoU1vVoVoD52SxLxTABwiyFmeKrxihhOnv5fFjR5qOSCX8nzPBB2aW5M0Dzxvw0mp)FZwCdhMAXt3x2KT72TPnz1ou5YTFn9567tREmRjBTD6vPRYt3EBz9I53D9BF39wm1bLvPa8rmh34ZBEgEZ8RlAYQEiDv2FE561FSO(pF7wGi(8FE9U0hZQ)tCS)1B3wwdGSEtkqgQZFCtZ957ay0c1o(GNw92QYV(68QSvn5LfTyZ)Fwvn83)1U0)3YQ)Qy)o3SF8WXo7J3F)h)GBdxLTR0Tbwm)1Lv513E7I5pL185pcRuwZIB(nfhOZ7RsFFEDZRZEiD)2glPxLKez)nRWsExB5ppvLdqO55f3iJS0)0vFba6BM9PRUYYq4jCUyAtHXfXXtBkczsK5OtHf3oL21isePN2AehlM4ExWuk20McxOmYPnfbJXsoN9EifwFcY14mLyPEIRcpMNm19IKDCcglAaBuejJpoBCe(U2OpU0Oyu2UupXnHugjpoPA0fHfjp(ImY(wZ48PHujSjk8cYHhFgm(WtuAP6SocgSRncTAAyvmxE8zm(IOmtLwXL84PUv0IPQLtdRYex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5ziGAYoP9lNt34P69Y8LVPmF3YHIr3SS7quDuXl9WM1zZ2U5V(R0I1saz1LDUvuKD712VIjKb21G8P9dbZPgf)c9eUS1lUZKcfUvbZwx0oeSzUVvB3KFkIQVFD3Io2GWJ1ap(hhNbKanVuUowQgmZJEgnBVHU)GaV5LYk6Qgu2Q2)TtrY9zT7r89J3op)gLNMkYk)qfVa7NozSUjC1hP3r0ipQzhUXnYpiuXDnXjap6bC4BvnXNXFldLMivOVLJ0OD4c0dOAzu5eofVC635ax)18xt(QBfxGGjyqg01Z7Bp5AZU8MBUetLzttHhmjb4m6fGbvRcG4K4xCTMRjos7o90(WPSrC82Zm4Yf)2kCGg2v95)ZF7X0)8ZTCGVCGFNPDAZEKYeegH9BjqLezA9(u1qo4pUayntXiO88IT)GD39fxwYhZRfcWVRpgJNsRt8Xxb5if)wjNmuVwocYF9W)CZyVu3nWc3HWYHB4oYu1VbC32FedoS1W2J3WGddHtU28mV2ypx2D3II5mldhrc8U8W6kgzFNUEYzqiB9GBhkgS2T2duSWFoM(CFb9qkvVutwnMrUM0(q(JBvIAmNxR57(opxTC5)pOQQLw" end function Gladdy:GetMirEditedProfile() From a8a6002f47cba046f4bcb30ec945e3a13f39a888 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Fri, 25 Mar 2022 17:56:53 +0100 Subject: [PATCH 45/51] fixed UNIT_HEALTH_FREQUENT --- Modules/Healthbar.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/Healthbar.lua b/Modules/Healthbar.lua index 2e91cba..4b05cc9 100644 --- a/Modules/Healthbar.lua +++ b/Modules/Healthbar.lua @@ -111,7 +111,7 @@ end function Healthbar.OnEvent(self, event, unit) local isDead = UnitExists(unit) and UnitIsDeadOrGhost(unit) - if event == "UNIT_HEALTH" or event == "UNIT_MAXHEALTH" then + if event == "UNIT_HEALTH_FREQUENT" or event == "UNIT_MAXHEALTH" then if isDead then Gladdy:SendMessage("UNIT_DEATH", unit) return From d43d8e9284b840215441c3c046262b3804d7ce3b Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Fri, 25 Mar 2022 17:57:04 +0100 Subject: [PATCH 46/51] updated Mir Profile --- ImportStrings.lua | 4 ++-- README.md | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ImportStrings.lua b/ImportStrings.lua index fef1286..fc1d475 100644 --- a/ImportStrings.lua +++ b/ImportStrings.lua @@ -25,9 +25,9 @@ function Gladdy:GetRukkProfile() end function Gladdy:GetMirProfile() - return "4XzT8STDBBRLFmZZ1djaji5Jw2XjznjYESCoTD1g1qlrBRjYIEiPoPURzLV9zFdKG3ueRDFjrweyJ9nSVtT0F5nlxSUywEX6SIZY3MxGFr6Y5(lxC7YlcJsuXMWapTxqIVx8Y7(Pq9Yf3p6tkg7jvlxu(q668VvU5(hQUzZJzfxNT9Q8n7QGJ6MlV663)23Dt)fDrr6JzlQksRsxU4DWAwUyvAz1S0XW55Ei(H)Bb(Vvi5DwE(waQ7oD7tpWR7HS0TvpCt2FwDnEulx8BpLvSkBx1)xzvA1(YpVCXt5FlROEf)RlV7UYSkAZvfB291SQlY3v9MDP3UnB9YznO19UOK3jbdJuYQFxgD8ZvA5aBrVF8nN)(p9r4jzvVJqyNDyaGvLxL94v73wMbp46S)Dwrz2YBDw)vmrLEFgIHcEpMWoWyuHHEkpvqyGpaFqWfqc7rEsXypzaHnqWBZOtALimEBr((NoFtr2QQn57wU48l)55dSVhY)2nFlN(msd3UhKdZW)5Sg48nhWi6riVa(7)4X0)N8I)y3(hbEmqR7ls)fRK0J)73VRkROy)tv)8M1vpCr6QQCuiDsYYf7E6MIShZlqjnGG5fBkV6kGc2Mww((v57iH1ha((2LZdzO9HnLvNNDx6(TviZ1ef5H)FwJEYtfBaav98Y5bOiSiD1xby)MzF6IlqgNkosp(w8dhyl(kDy40ofDqKxYXCk1NbCDoEANry4biKHXkFJXFABrPnjbtBlAFF)OJH2D5WXhGDn4Py0bMr3rsF(Byq8erkvOkA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PcrR3TE76NY2SMWjTzjUFCSsA8JXPCw9I21rC9X6nHnwUOn24q)Ot6I3bz(9anunqTQFugQVKP19iDlYdVBo9UjPBKB1c6X1RYNSz9F)3zfRK5XIEELn6nUae)UZQk259vbsDCMCLAjF(IMLHOh0)zLLzlFC(oEXHApjt8z751TZV(63kOpx9BbA5IMvj4poj6kj3FCsmU7p5LFNs0vND)4KOU7VtnFNs0v4T)4KOT7VJBFNs0vMx)iKyzRTsxKJcQhO38)j3TMJsFu3ACE0Xp7QjFm1B1xv08aJjD5N43WSNGd1H49uXWDjgn)ksfp8pdnC9mWZPvfNdp9bqPP6Fy2YYIn7lpSTL98(DflZDV5rRX)cr5fNAORxl2UQDxUBOUynCcdpMXLQX3AmmyeaLmt2Nwp04VYc8qSVCndw(3QpXwlnkFC)P0AiGuUus(YYn72EsdGrLq3FUFj4zMxCAdJI)1QgM64YZ2YtPtgSsJlfylZlO9bF8u6Oom0ilMf72vEAlMr0RGr72pSvoISBRwEkT2OIit2HStP1XPSb((8SItP94VEb82963i257odVm9kMY52)c9uNP266C1BCwr9R2V3vN9MlBN05A2H2NKS(Fq68nbZyTeGtq3KS33LGSV3HRg3F5xz6ziL5KtFDEMprVw5jb06GFcF8dI18cQxMz0d48UkRtSI)wwk1PyqFlNIqzJ48PhqqPv6Lhe3C6hmLsVaT5VMcYU0pGErtWSdiFi4CAWrGyyFQQDnb34nr3b3tR3Ds)FxNgdDwnl(1fZ(9LyffST8p)p)9NY(8F2lLJKNqABA37ToC8GSW7TBUbDuTQiHA)mEYi1xBBM6p(1HEUO9avwdCBcAwKj9gcTmAl8)fkOX2R2f5l)6awFXV0V2nZRidobmF8HuJMoE)kC16D(UnYunzugwLXcb7p9G9XNlXM)QV9pFtCd4W8qNSfesCWkxghfefQsJJ12OO4u3BjzR3Wt)F9ckxS4))kE61Zb" end \ No newline at end of file diff --git a/README.md b/README.md index 9fc6876..4c269b9 100644 --- a/README.md +++ b/README.md @@ -107,6 +107,7 @@ Thank you! - added disarm DRs - improved some class icons - fixed health bug since 2.5.4 +- updated Mir Profile ### v2.00-Release From 3d4479cc06fb74bd00abdd260a2787abf7a2c052 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Fri, 25 Mar 2022 22:25:54 +0100 Subject: [PATCH 47/51] castbar font outline option added --- Modules/Castbar.lua | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/Modules/Castbar.lua b/Modules/Castbar.lua index 24fc6a7..05ec33b 100644 --- a/Modules/Castbar.lua +++ b/Modules/Castbar.lua @@ -25,6 +25,7 @@ local Castbar = Gladdy:NewModule("Cast Bar", 70, { castBarIconSize = 22, castBarBorderSize = 8, castBarFontSize = 12, + castBarFontOutline = false, castBarTexture = "Smooth", castBarIconStyle = "Interface\\AddOns\\Gladdy\\Images\\Border_rounded_blp", castBarBorderStyle = "Gladdy Tooltip round", @@ -115,7 +116,7 @@ function Castbar:CreateFrame(unit) end castBar.spellText = castBar:CreateFontString(nil, "LOW") - castBar.spellText:SetFont(Gladdy:SMFetch("font", "auraFont"), Gladdy.db.castBarFontSize) + castBar.spellText:SetFont(Gladdy:SMFetch("font", "auraFont"), Gladdy.db.castBarFontSize, Gladdy.db.castBarFontOutline and "OUTLINE") castBar.spellText:SetTextColor(Gladdy:SetColor(Gladdy.db.castBarFontColor)) castBar.spellText:SetShadowOffset(1, -1) castBar.spellText:SetShadowColor(0, 0, 0, 1) @@ -123,7 +124,7 @@ function Castbar:CreateFrame(unit) castBar.spellText:SetPoint("LEFT", 7, 0) -- Text of the spell castBar.timeText = castBar:CreateFontString(nil, "LOW") - castBar.timeText:SetFont(Gladdy:SMFetch("font", "auraFont"), Gladdy.db.castBarFontSize) + castBar.timeText:SetFont(Gladdy:SMFetch("font", "auraFont"), Gladdy.db.castBarFontSize, Gladdy.db.castBarFontOutline and "OUTLINE") castBar.timeText:SetTextColor(Gladdy:SetColor(Gladdy.db.castBarFontColor)) castBar.timeText:SetShadowOffset(1, -1) castBar.timeText:SetShadowColor(0, 0, 0, 1) @@ -203,10 +204,10 @@ function Castbar:UpdateFrame(unit) Gladdy:SetPosition(castBar, unit, "castBarXOffset", "castBarYOffset", Castbar:LegacySetPosition(castBar, unit, leftMargin, rightMargin), Castbar) - castBar.spellText:SetFont(Gladdy:SMFetch("font", "castBarFont"), Gladdy.db.castBarFontSize) + castBar.spellText:SetFont(Gladdy:SMFetch("font", "castBarFont"), Gladdy.db.castBarFontSize, Gladdy.db.castBarFontOutline and "OUTLINE") castBar.spellText:SetTextColor(Gladdy:SetColor(Gladdy.db.castBarFontColor)) - castBar.timeText:SetFont(Gladdy:SMFetch("font", "castBarFont"), Gladdy.db.castBarFontSize) + castBar.timeText:SetFont(Gladdy:SMFetch("font", "castBarFont"), Gladdy.db.castBarFontSize, Gladdy.db.castBarFontOutline and "OUTLINE") castBar.timeText:SetTextColor(Gladdy:SetColor(Gladdy.db.castBarFontColor)) castBar.icon.texture.overlay:SetTexture(Gladdy.db.castBarIconStyle) @@ -785,6 +786,12 @@ function Castbar:GetOptions() max = 20, width = "full", }), + castBarFontOutline = option({ + type = "toggle", + name = L["Outline"], + order = 5, + width = "full", + }), headerFormat = { type = "header", name = L["Format"], From 7d77054a7b355f6c55b39694bde79db89b6a8434 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Fri, 25 Mar 2022 22:33:27 +0100 Subject: [PATCH 48/51] update readme --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 4c269b9..b2fa01b 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,7 @@ The goal is to make Gladdy highly configurable in it's appearance. Everything ca - **Range Check** (checks the range to a unit by a configurable spell) - **Shadowsight Timer** (shows a little movable frame with time left until Shadow Eyes spawn) - **TotemPlates** (show totem icons instead of normal nameplates, compatible with **Plater, NeatPlates, KUI, ThreatPlates, ElvUI, TukUI**) +- **TotemPulse** (shows pulse on TotemPlate icon or beneath nameplate) - **Trinket** (tracks trinket usage) - **VersionCheck** (checks if you use an older version that your teammate) - **XiconProfiles** (predefined profiles to start your configuration from) @@ -106,6 +107,7 @@ Thank you! - added some auras (e.g. disarm) - added disarm DRs - improved some class icons +- added font OUTLINE option for Health-/Power-/CastBar texts - fixed health bug since 2.5.4 - updated Mir Profile From 2720e25cea522d13014e9d2d8cc349fc09449870 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Fri, 25 Mar 2022 22:34:04 +0100 Subject: [PATCH 49/51] fix ArenaCooldown not showing --- Modules/ArenaCountDown.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Modules/ArenaCountDown.lua b/Modules/ArenaCountDown.lua index 4f7e5df..a8dfb51 100644 --- a/Modules/ArenaCountDown.lua +++ b/Modules/ArenaCountDown.lua @@ -70,7 +70,7 @@ end function ACDFrame.OnUpdate(self, elapse) if (self.countdown > 0 and Gladdy.db.countdown) then self.hidden = false; - + self.ACDNumFrame:Show() if ((floor(self.countdown) ~= floor(self.countdown - elapse)) and (floor(self.countdown - elapse) >= 0)) then local str = tostring(floor(self.countdown - elapse)); @@ -109,7 +109,6 @@ end function ACDFrame:JOINED_ARENA() if Gladdy.db.countdown then - self.ACDNumFrame:Show() self:RegisterEvent("CHAT_MSG_BG_SYSTEM_NEUTRAL") self:SetScript("OnEvent", ACDFrame.OnEvent) self.endTime = GetTime() + 70 From cb6de72b93ec436508efd83bc625800227c35ecc Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Sat, 26 Mar 2022 00:11:34 +0100 Subject: [PATCH 50/51] version string trailing zeros --- Gladdy.lua | 6 +++--- Modules/VersionCheck.lua | 14 +++++++------- Options.lua | 6 +++--- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Gladdy.lua b/Gladdy.lua index 0270772..5c4f93a 100644 --- a/Gladdy.lua +++ b/Gladdy.lua @@ -17,7 +17,7 @@ local IsActiveBattlefieldArena = IsActiveBattlefieldArena local IsInInstance = IsInInstance local GetNumArenaOpponents = GetNumArenaOpponents local RELEASE_TYPES = { alpha = "Alpha", beta = "Beta", release = "Release"} -local PREFIX = "TBC-Classic_v" +local PREFIX = "Gladdy v" local VERSION_REGEX = PREFIX .. "(%d+%.%d+)%-(%a)" local LibStub = LibStub @@ -27,14 +27,14 @@ local LibStub = LibStub --------------------------- -local MAJOR, MINOR = "Gladdy", 5 +local MAJOR, MINOR = "Gladdy", 6 local Gladdy = LibStub:NewLibrary(MAJOR, MINOR) local L Gladdy.version_major_num = 2 Gladdy.version_minor_num = 0.10 Gladdy.version_num = Gladdy.version_major_num + Gladdy.version_minor_num Gladdy.version_releaseType = RELEASE_TYPES.release -Gladdy.version = PREFIX .. Gladdy.version_num .. "-" .. Gladdy.version_releaseType +Gladdy.version = PREFIX .. string.format("%.2f", Gladdy.version_num) .. "-" .. Gladdy.version_releaseType Gladdy.VERSION_REGEX = VERSION_REGEX Gladdy.debug = false diff --git a/Modules/VersionCheck.lua b/Modules/VersionCheck.lua index 9bbe922..c86c465 100644 --- a/Modules/VersionCheck.lua +++ b/Modules/VersionCheck.lua @@ -1,4 +1,4 @@ -local tonumber, tostring = tonumber, tostring +local tonumber, tostring, str_format = tonumber, tostring, string.format local UnitName = UnitName local IsInGroup, IsInRaid = IsInGroup, IsInRaid @@ -24,11 +24,11 @@ end function VersionCheck:JOINED_ARENA() self:RegisterComm("GladdyVCheck", VersionCheck.OnCommReceived) if IsInRaid(LE_PARTY_CATEGORY_HOME) then - self:SendCommMessage("GladdyVCheck", tostring(Gladdy.version_num), "RAID", self.playerName) + self:SendCommMessage("GladdyVCheck", str_format("%.2f", Gladdy.version_num), "RAID", self.playerName) elseif IsInGroup(LE_PARTY_CATEGORY_INSTANCE) or IsInRaid(LE_PARTY_CATEGORY_INSTANCE) then - self:SendCommMessage("GladdyVCheck", tostring(Gladdy.version_num), "INSTANCE_CHAT", self.playerName) + self:SendCommMessage("GladdyVCheck", str_format("%.2f", Gladdy.version_num), "INSTANCE_CHAT", self.playerName) elseif IsInGroup(LE_PARTY_CATEGORY_HOME) then - self:SendCommMessage("GladdyVCheck", tostring(Gladdy.version_num), "PARTY", self.playerName) + self:SendCommMessage("GladdyVCheck", str_format("%.2f", Gladdy.version_num), "PARTY", self.playerName) end end @@ -41,9 +41,9 @@ end function VersionCheck.OnCommReceived(prefix, message, distribution, sender) if sender ~= VersionCheck.playerName then - local addonVersion = Gladdy.version_num - message = tonumber(message) - if message and message <= Gladdy.version_num then + local addonVersion = str_format("%.2f", Gladdy.version_num) + local message_num = tonumber(message) or 0 + if message and message_num <= Gladdy.version_num then --Gladdy:Print("Version", "\"".. addonVersion.."\"", "is up to date") else Gladdy:Warn("Current version", "\"".. addonVersion.."\"", "is outdated. Most recent version is", "\"".. message.."\"") diff --git a/Options.lua b/Options.lua index 78f78e1..5268dc6 100644 --- a/Options.lua +++ b/Options.lua @@ -1,5 +1,5 @@ local type, pairs, tinsert, tsort = type, pairs, table.insert, table.sort -local tostring, str_match, tonumber, string_format = tostring, string.match, tonumber, string.format +local tostring, str_match, tonumber, str_format = tostring, string.match, tonumber, string.format local ceil, floor = ceil, floor local ReloadUI = ReloadUI @@ -31,7 +31,7 @@ function Gladdy:FormatTimer(fontString, timeLeft, milibreakpoint, showSeconds) else if time >= 60 then if showSeconds then - fontString:SetText(floor(timeLeft / 60) .. ":" .. string_format("%02.f", floor(timeLeft - floor(timeLeft / 60) * 60))) + fontString:SetText(floor(timeLeft / 60) .. ":" .. str_format("%02.f", floor(timeLeft - floor(timeLeft / 60) * 60))) else fontString:SetText(ceil(ceil(time / 60)) .. "m") end @@ -279,7 +279,7 @@ function Gladdy:SetupOptions() order = 5, width = 1, type = "description", - name = " Gladdy v" .. Gladdy.version_num .. "-" .. Gladdy.version_releaseType + name = " " .. Gladdy.version }, general = { type = "group", From 80eee574a90c7c1178e4d1d5d4f0a038eb254c61 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Sat, 26 Mar 2022 00:16:13 +0100 Subject: [PATCH 51/51] cleanup ArenaCountDown --- Modules/ArenaCountDown.lua | 64 ++++++++++++++++++-------------------- 1 file changed, 31 insertions(+), 33 deletions(-) diff --git a/Modules/ArenaCountDown.lua b/Modules/ArenaCountDown.lua index a8dfb51..0902f51 100644 --- a/Modules/ArenaCountDown.lua +++ b/Modules/ArenaCountDown.lua @@ -22,30 +22,30 @@ function ACDFrame:Initialize() self.texturePath = "Interface\\AddOns\\Gladdy\\Images\\Countdown\\"; local ACDNumFrame = CreateFrame("Frame", "ACDNumFrame", UIParent) - ACDNumFrame:EnableMouse(false) - ACDNumFrame:SetHeight(512) - ACDNumFrame:SetWidth(512) - ACDNumFrame:SetPoint("CENTER", 0, 256) - ACDNumFrame:Hide() self.ACDNumFrame = ACDNumFrame + self.ACDNumFrame:EnableMouse(false) + self.ACDNumFrame:SetHeight(Gladdy.db.arenaCountdownSize) + self.ACDNumFrame:SetWidth(Gladdy.db.arenaCountdownSize) + self.ACDNumFrame:SetPoint("CENTER", 0, 128) + self.ACDNumFrame:Hide() local ACDNumTens = ACDNumFrame:CreateTexture("ACDNumTens", "HIGH") - ACDNumTens:SetWidth(256) - ACDNumTens:SetHeight(256) - ACDNumTens:SetPoint("CENTER", ACDNumFrame, "CENTER", -50, 0) self.ACDNumTens = ACDNumTens + self.ACDNumTens:SetWidth(Gladdy.db.arenaCountdownSize) + self.ACDNumTens:SetHeight(Gladdy.db.arenaCountdownSize) + self.ACDNumTens:SetPoint("CENTER", self.ACDNumFrame, "CENTER", -(Gladdy.db.arenaCountdownSize/8 + Gladdy.db.arenaCountdownSize/8/2), 0) local ACDNumOnes = ACDNumFrame:CreateTexture("ACDNumOnes", "HIGH") - ACDNumOnes:SetWidth(256) - ACDNumOnes:SetHeight(256) - ACDNumOnes:SetPoint("CENTER", ACDNumFrame, "CENTER", 50, 0) self.ACDNumOnes = ACDNumOnes + self.ACDNumOnes:SetWidth(Gladdy.db.arenaCountdownSize) + self.ACDNumOnes:SetHeight(Gladdy.db.arenaCountdownSize) + self.ACDNumOnes:SetPoint("CENTER", self.ACDNumFrame, "CENTER", (Gladdy.db.arenaCountdownSize/8 + Gladdy.db.arenaCountdownSize/8/2), 0) local ACDNumOne = ACDNumFrame:CreateTexture("ACDNumOne", "HIGH") - ACDNumOne:SetWidth(256) - ACDNumOne:SetHeight(256) - ACDNumOne:SetPoint("CENTER", ACDNumFrame, "CENTER", 0, 0) self.ACDNumOne = ACDNumOne + self.ACDNumOne:SetWidth(Gladdy.db.arenaCountdownSize) + self.ACDNumOne:SetHeight(Gladdy.db.arenaCountdownSize) + self.ACDNumOne:SetPoint("CENTER", self.ACDNumFrame, "CENTER", 0, 0) if Gladdy.db.countdown then self:RegisterMessage("JOINED_ARENA") @@ -65,6 +65,22 @@ function ACDFrame:UpdateFrameOnce() end self.ACDNumFrame:SetFrameStrata(Gladdy.db.arenaCountdownFrameStrata) self.ACDNumFrame:SetFrameLevel(Gladdy.db.arenaCountdownFrameLevel) + + self.ACDNumFrame:SetHeight(Gladdy.db.arenaCountdownSize) + self.ACDNumFrame:SetWidth(Gladdy.db.arenaCountdownSize) + self.ACDNumFrame:SetPoint("CENTER", 0, 128) + + self.ACDNumTens:SetWidth(Gladdy.db.arenaCountdownSize) + self.ACDNumTens:SetHeight(Gladdy.db.arenaCountdownSize) + self.ACDNumTens:SetPoint("CENTER", self.ACDNumFrame, "CENTER", -(Gladdy.db.arenaCountdownSize/8 + Gladdy.db.arenaCountdownSize/8/2), 0) + + self.ACDNumOnes:SetWidth(Gladdy.db.arenaCountdownSize) + self.ACDNumOnes:SetHeight(Gladdy.db.arenaCountdownSize) + self.ACDNumOnes:SetPoint("CENTER", self.ACDNumFrame, "CENTER", (Gladdy.db.arenaCountdownSize/8 + Gladdy.db.arenaCountdownSize/8/2), 0) + + self.ACDNumOne:SetWidth(Gladdy.db.arenaCountdownSize) + self.ACDNumOne:SetHeight(Gladdy.db.arenaCountdownSize) + self.ACDNumOne:SetPoint("CENTER", self.ACDNumFrame, "CENTER", 0, 0) end function ACDFrame.OnUpdate(self, elapse) @@ -140,25 +156,7 @@ function ACDFrame:CHAT_MSG_BG_SYSTEM_NEUTRAL(msg) end end -function ACDFrame:UpdateFrame() - self.ACDNumFrame:SetHeight(Gladdy.db.arenaCountdownSize) - self.ACDNumFrame:SetWidth(Gladdy.db.arenaCountdownSize) - self.ACDNumFrame:SetPoint("CENTER", 0, 128) - - self.ACDNumTens:SetWidth(Gladdy.db.arenaCountdownSize) - self.ACDNumTens:SetHeight(Gladdy.db.arenaCountdownSize) - self.ACDNumTens:SetPoint("CENTER", self.ACDNumFrame, "CENTER", -(Gladdy.db.arenaCountdownSize/8 + Gladdy.db.arenaCountdownSize/8/2), 0) - - self.ACDNumOnes:SetWidth(Gladdy.db.arenaCountdownSize) - self.ACDNumOnes:SetHeight(Gladdy.db.arenaCountdownSize) - self.ACDNumOnes:SetPoint("CENTER", self.ACDNumFrame, "CENTER", (Gladdy.db.arenaCountdownSize/8 + Gladdy.db.arenaCountdownSize/8/2), 0) - - self.ACDNumOne:SetWidth(Gladdy.db.arenaCountdownSize) - self.ACDNumOne:SetHeight(Gladdy.db.arenaCountdownSize) - self.ACDNumOne:SetPoint("CENTER", self.ACDNumFrame, "CENTER", 0, 0) -end - -function ACDFrame:Test() +function ACDFrame:TestOnce() self.countdown = 30 self:JOINED_ARENA() end