From b1b6584b01331c5138e0d5dd563e4b98b9b14725 Mon Sep 17 00:00:00 2001 From: speedwaystar Date: Mon, 9 Jan 2023 00:19:13 +0800 Subject: [PATCH 01/12] * use item hyperlinks instead of item names * FOOD: added Timely Demise (70 Haste) * FOOD: added Filet of Fangs (70 Crit) * FOOD: added Seamoth Surprise (70 Vers) * FOOD: added Salt-Baked Fishcake (70 Mastery) * FOOD: added Feisty Fish Sticks (45 Haste/Crit) * FOOD: added Aromatic Seafood Platter (45 Haste/Vers) * FOOD: added Sizzling Seafood Medley (45 Haste/Mastery) * FOOD: added Revenge, Served Cold (45 Crit/Verst) * FOOD: added Thousandbone Tongueslicer (45 Crit/Mastery) * FOOD: added Great Cerulean Sea (45 Vers/Mastery) * FOOD: added Fated Fortune Cookie (76 primary stat) * FOOD: added Feast: Grand Banquet of the Kalu'ak (76 primary stat) * FOOD: added Feast: Hoard of Draconic Delicacies (76 primary stat) * AUGMENT RUNE: added Draconic Augment Rune * VANTUS RUNE: added Vantus Rune: Vault of the Incarnates * WEAPON BUFF: added Buzzing Rune * WEAPON BUFF: added Chirping Rune * WEAPON BUFF: added Howling Rune * WEAPON BUFF: added Primal Weightstone * WEAPON BUFF: added Primal Whetstone * WEAPON BUFF: added Completely Safe Rockets * FLASK added Phial of the Eye in the Storm * FLASK: added Phial of Still Air * FLASK: added Phial of Icy Preservation * FLASK: added Iced Phial of Corrupting Rage * FLASK: added Phial of Charged Isolation * FLASK: added Phial of Glacial Fury * FLASK: added Phial of Static Empowerment * FLASK: added Phial of Tepid Versatility * FLASK: added Aerated Phial of Deftness * FLASK: added Steaming Phial of Finesse * FLASK: added Charged Phial of Alacrity * FLASK: added Crystalline Phial of Perception * FLASK: added Phial of Elemental Chaos * FLASK: added Aerated Phial of Quick Hands * WARLOCK PET: added Summon Imp * WARLOCK PET: added Summon Fellhunter * WARLOCK PET: added Summon Voidwalker * WARLOCK PET: added Summon Succubus * WARLOCK PET: added Summon Infernal * WARLOCK PET: added Summon Doomguard * WARLOCK PET: added Summon Felguard * WARLOCK PET: added Summon Fel Imp * WARLOCK PET: added Summon Voidlord * WARLOCK PET: added Summon Shivarra * WARLOCK PET: added Summon Observer * WARLOCK PET: added Summon Wrathguard * HUNTER PET: added Call Pet 1 * HUNTER PET: added Call Pet 2 * HUNTER PET: added Call Pet 3 * HUNTER PET: added Call Pet 4 * HUNTER PET: added Call Pet 5 * TOY: added Wayfarer's Compass * TOY: added Golden Dragon Goblet * TOY: added Lucky Duck * GROUPS: removed old custom locations: Icecrown Citadel, Trial of the Crusader, Ulduar, Molten Core, Onyxia's Lair, Blackwing Lair, Naxxramas, Ahn'Qiraj, Zul'Gurub * GROUPS: added LFR, Mythic Keystone, Castle Nathria, Sanctum of Domination, Sepulcher of the First Ones, Vault of the Incarnates * increased size of SmartBuff splash window to allow for longer itemLink text * tidied up some code and re-indented the most egregious examples nested IF statements * bumped version to r16alpha * added changelog to WHATSNEW * TODO: non-English localization * TODO: rewrite to use itemID instead of itemLink * TODO: add new buffs from Dragonlands class talent trees Signed-off-by: speedwaystar --- SmartBuff.buffs.lua | 836 +++++++++++++++++++---------- SmartBuff.lua | 1247 ++++++++++++++++++++++--------------------- SmartBuff.toc | 3 +- SmartBuff.xml | 4 +- localization.en.lua | 53 +- 5 files changed, 1233 insertions(+), 910 deletions(-) diff --git a/SmartBuff.buffs.lua b/SmartBuff.buffs.lua index 3fa7ae6..529be34 100644 --- a/SmartBuff.buffs.lua +++ b/SmartBuff.buffs.lua @@ -40,7 +40,7 @@ local function GetItems(items) end local function InsertItem(t, type, itemId, spellId, duration, link) - local item = GetItemInfo(itemId); + local _,item = GetItemInfo(itemId); -- item link local spell = GetSpellInfo(spellId); if (item and spell) then --print("Item found: "..item..", "..spell); @@ -56,7 +56,6 @@ local function LoadToys() C_ToyBox.SetCollectedShown(true) C_ToyBox.SetAllSourceTypeFilters(true) C_ToyBox.SetFilterString("") - local nTotal = C_ToyBox.GetNumTotalDisplayedToys(); local nLearned = C_ToyBox.GetNumLearnedDisplayedToys() or 0; if (nLearned <= 0) then @@ -68,6 +67,7 @@ local function LoadToys() local id, name, icon = C_ToyBox.GetToyInfo(num); if (id) then if (PlayerHasToy(id)) then + _,name = GetItemInfo(id) S.Toybox[tostring(name)] = {id, icon}; end end @@ -78,106 +78,139 @@ end function SMARTBUFF_InitItemList() -- Stones and oils - SMARTBUFF_HEALTHSTONE = GetItemInfo(5512); --"Healthstone" - SMARTBUFF_MANAGEM = GetItemInfo(36799); --"Mana Gem" - SMARTBUFF_BRILLIANTMANAGEM = GetItemInfo(81901); --"Brilliant Mana Gem" - SMARTBUFF_SSROUGH = GetItemInfo(2862); --"Rough Sharpening Stone" - SMARTBUFF_SSCOARSE = GetItemInfo(2863); --"Coarse Sharpening Stone" - SMARTBUFF_SSHEAVY = GetItemInfo(2871); --"Heavy Sharpening Stone" - SMARTBUFF_SSSOLID = GetItemInfo(7964); --"Solid Sharpening Stone" - SMARTBUFF_SSDENSE = GetItemInfo(12404); --"Dense Sharpening Stone" - SMARTBUFF_SSELEMENTAL = GetItemInfo(18262); --"Elemental Sharpening Stone" - SMARTBUFF_SSFEL = GetItemInfo(23528); --"Fel Sharpening Stone" - SMARTBUFF_SSADAMANTITE = GetItemInfo(23529); --"Adamantite Sharpening Stone" - SMARTBUFF_WSROUGH = GetItemInfo(3239); --"Rough Weightstone" - SMARTBUFF_WSCOARSE = GetItemInfo(3240); --"Coarse Weightstone" - SMARTBUFF_WSHEAVY = GetItemInfo(3241); --"Heavy Weightstone" - SMARTBUFF_WSSOLID = GetItemInfo(7965); --"Solid Weightstone" - SMARTBUFF_WSDENSE = GetItemInfo(12643); --"Dense Weightstone" - SMARTBUFF_WSFEL = GetItemInfo(28420); --"Fel Weightstone" - SMARTBUFF_WSADAMANTITE = GetItemInfo(28421); --"Adamantite Weightstone" - SMARTBUFF_SHADOWOIL = GetItemInfo(3824); --"Shadow Oil" - SMARTBUFF_FROSTOIL = GetItemInfo(3829); --"Frost Oil" - SMARTBUFF_MANAOIL1 = GetItemInfo(20745); --"Minor Mana Oil" - SMARTBUFF_MANAOIL2 = GetItemInfo(20747); --"Lesser Mana Oil" - SMARTBUFF_MANAOIL3 = GetItemInfo(20748); --"Brilliant Mana Oil" - SMARTBUFF_MANAOIL4 = GetItemInfo(22521); --"Superior Mana Oil" - SMARTBUFF_WIZARDOIL1 = GetItemInfo(20744); --"Minor Wizard Oil" - SMARTBUFF_WIZARDOIL2 = GetItemInfo(20746); --"Lesser Wizard Oil" - SMARTBUFF_WIZARDOIL3 = GetItemInfo(20750); --"Wizard Oil" - SMARTBUFF_WIZARDOIL4 = GetItemInfo(20749); --"Brilliant Wizard Oil" - SMARTBUFF_WIZARDOIL5 = GetItemInfo(22522); --"Superior Wizard Oil" - SMARTBUFF_SHADOWCOREOIL = GetItemInfo(171285); --"Shadowcore Oil" - SMARTBUFF_EMBALMERSOIL = GetItemInfo(171286); --"Embalmer's Oil" + _,SMARTBUFF_HEALTHSTONE = GetItemInfo(5512); --"Healthstone" + _,SMARTBUFF_MANAGEM = GetItemInfo(36799); --"Mana Gem" + _,SMARTBUFF_BRILLIANTMANAGEM = GetItemInfo(81901); --"Brilliant Mana Gem" + _,SMARTBUFF_SSROUGH = GetItemInfo(2862); --"Rough Sharpening Stone" + _,SMARTBUFF_SSCOARSE = GetItemInfo(2863); --"Coarse Sharpening Stone" + _,SMARTBUFF_SSHEAVY = GetItemInfo(2871); --"Heavy Sharpening Stone" + _,SMARTBUFF_SSSOLID = GetItemInfo(7964); --"Solid Sharpening Stone" + _,SMARTBUFF_SSDENSE = GetItemInfo(12404); --"Dense Sharpening Stone" + _,SMARTBUFF_SSELEMENTAL = GetItemInfo(18262); --"Elemental Sharpening Stone" + _,SMARTBUFF_SSFEL = GetItemInfo(23528); --"Fel Sharpening Stone" + _,SMARTBUFF_SSADAMANTITE = GetItemInfo(23529); --"Adamantite Sharpening Stone" + _,SMARTBUFF_WSROUGH = GetItemInfo(3239); --"Rough Weightstone" + _,SMARTBUFF_WSCOARSE = GetItemInfo(3240); --"Coarse Weightstone" + _,SMARTBUFF_WSHEAVY = GetItemInfo(3241); --"Heavy Weightstone" + _,SMARTBUFF_WSSOLID = GetItemInfo(7965); --"Solid Weightstone" + _,SMARTBUFF_WSDENSE = GetItemInfo(12643); --"Dense Weightstone" + _,SMARTBUFF_WSFEL = GetItemInfo(28420); --"Fel Weightstone" + _,SMARTBUFF_WSADAMANTITE = GetItemInfo(28421); --"Adamantite Weightstone" + _,SMARTBUFF_SHADOWOIL = GetItemInfo(3824); --"Shadow Oil" + _,SMARTBUFF_FROSTOIL = GetItemInfo(3829); --"Frost Oil" + _,SMARTBUFF_MANAOIL1 = GetItemInfo(20745); --"Minor Mana Oil" + _,SMARTBUFF_MANAOIL2 = GetItemInfo(20747); --"Lesser Mana Oil" + _,SMARTBUFF_MANAOIL3 = GetItemInfo(20748); --"Brilliant Mana Oil" + _,SMARTBUFF_MANAOIL4 = GetItemInfo(22521); --"Superior Mana Oil" + _,SMARTBUFF_WIZARDOIL1 = GetItemInfo(20744); --"Minor Wizard Oil" + _,SMARTBUFF_WIZARDOIL2 = GetItemInfo(20746); --"Lesser Wizard Oil" + _,SMARTBUFF_WIZARDOIL3 = GetItemInfo(20750); --"Wizard Oil" + _,SMARTBUFF_WIZARDOIL4 = GetItemInfo(20749); --"Brilliant Wizard Oil" + _,SMARTBUFF_WIZARDOIL5 = GetItemInfo(22522); --"Superior Wizard Oil" + _,SMARTBUFF_SHADOWCOREOIL = GetItemInfo(171285); --"Shadowcore Oil" + _,SMARTBUFF_EMBALMERSOIL = GetItemInfo(171286); --"Embalmer's Oil" + -- Dragonflight + _,SMARTBUFF_SafeRockets_q1 = GetItemInfo(198160); -- Completely Safe Rockets (Quality 1) + _,SMARTBUFF_SafeRockets_q2 = GetItemInfo(198161); -- Completely Safe Rockets (Quality 2) + _,SMARTBUFF_SafeRockets_q3 = GetItemInfo(198162); -- Completely Safe Rockets (Quality 3) + _,SMARTBUFF_BuzzingRune_q1 = GetItemInfo(194817); -- Buzzing Rune (Quality 1) + _,SMARTBUFF_BuzzingRune_q2 = GetItemInfo(194818); -- Buzzing Rune (Quality 2) + _,SMARTBUFF_BuzzingRune_q3 = GetItemInfo(194819); -- Buzzing Rune (Quality 3) + _,SMARTBUFF_ChirpingRune_q1 = GetItemInfo(194824); -- Buzzing Rune (Quality 1) + _,SMARTBUFF_ChirpingRune_q2 = GetItemInfo(194825); -- Buzzing Rune (Quality 2) + _,SMARTBUFF_ChirpingRune_q3 = GetItemInfo(194826); -- Buzzing Rune (Quality 3) + _,SMARTBUFF_HowlingRune_q1 = GetItemInfo(194821); -- Buzzing Rune (Quality 1) + _,SMARTBUFF_HowlingRune_q2 = GetItemInfo(194822); -- Buzzing Rune (Quality 2) + _,SMARTBUFF_HowlingRune_q3 = GetItemInfo(194820); -- Buzzing Rune (Quality 3) + _,SMARTBUFF_PrimalWeighstone_q1 = GetItemInfo(191943); -- Primal Weighstone (Quality 1) + _,SMARTBUFF_PrimalWeighstone_q2 = GetItemInfo(191944); -- Primal Weighstone (Quality 2) + _,SMARTBUFF_PrimalWeighstone_q3 = GetItemInfo(191945); -- Primal Weighstone (Quality 3) + _,SMARTBUFF_PrimalWhetstone_q1 = GetItemInfo(191933); -- Primal Whestone (Quality 1) + _,SMARTBUFF_PrimalWhetstone_q2 = GetItemInfo(191939); -- Primal Whestone (Quality 2) + _,SMARTBUFF_PrimalWhetstone_q3 = GetItemInfo(191940); -- Primal Whestone (Quality 3) + -- Food -- SMARTBUFF_KIBLERSBITS = GetItemInfo(33874); --"Kibler's Bits" -- SMARTBUFF_STORMCHOPS = GetItemInfo(33866); --"Stormchops" - SMARTBUFF_JUICYBEARBURGER = GetItemInfo(35565); --"Juicy Bear Burger" - SMARTBUFF_CRUNCHYSPIDER = GetItemInfo(22645); --"Crunchy Spider Surprise" - SMARTBUFF_LYNXSTEAK = GetItemInfo(27635); --"Lynx Steak" - SMARTBUFF_CHARREDBEARKABOBS = GetItemInfo(35563); --"Charred Bear Kabobs" - SMARTBUFF_BATBITES = GetItemInfo(27636); --"Bat Bites" - SMARTBUFF_ROASTEDMOONGRAZE = GetItemInfo(24105); --"Roasted Moongraze Tenderloin" - SMARTBUFF_MOKNATHALSHORTRIBS = GetItemInfo(31672); --"Mok'Nathal Shortribs" - SMARTBUFF_CRUNCHYSERPENT = GetItemInfo(31673); --"Crunchy Serpent" - SMARTBUFF_ROASTEDCLEFTHOOF = GetItemInfo(27658); --"Roasted Clefthoof" - SMARTBUFF_FISHERMANSFEAST = GetItemInfo(33052); --"Fisherman's Feast" - SMARTBUFF_WARPBURGER = GetItemInfo(27659); --"Warp Burger" - SMARTBUFF_RAVAGERDOG = GetItemInfo(27655); --"Ravager Dog" - SMARTBUFF_SKULLFISHSOUP = GetItemInfo(33825); --"Skullfish Soup" - SMARTBUFF_BUZZARDBITES = GetItemInfo(27651); --"Buzzard Bites" - SMARTBUFF_TALBUKSTEAK = GetItemInfo(27660); --"Talbuk Steak" - SMARTBUFF_GOLDENFISHSTICKS = GetItemInfo(27666); --"Golden Fish Sticks" - SMARTBUFF_SPICYHOTTALBUK = GetItemInfo(33872); --"Spicy Hot Talbuk" - SMARTBUFF_FELTAILDELIGHT = GetItemInfo(27662); --"Feltail Delight" - SMARTBUFF_BLACKENEDSPOREFISH = GetItemInfo(27663); --"Blackened Sporefish" - SMARTBUFF_HOTAPPLECIDER = GetItemInfo(34411); --"Hot Apple Cider" - SMARTBUFF_BROILEDBLOODFIN = GetItemInfo(33867); --"Broiled Bloodfin" - SMARTBUFF_SPICYCRAWDAD = GetItemInfo(27667); --"Spicy Crawdad" - SMARTBUFF_POACHEDBLUEFISH = GetItemInfo(27665); --"Poached Bluefish" - SMARTBUFF_BLACKENEDBASILISK = GetItemInfo(27657); --"Blackened Basilisk" - SMARTBUFF_GRILLEDMUDFISH = GetItemInfo(27664); --"Grilled Mudfish" - SMARTBUFF_CLAMBAR = GetItemInfo(30155); --"Clam Bar" - SMARTBUFF_SAGEFISHDELIGHT = GetItemInfo(21217); --"Sagefish Delight" - SMARTBUFF_SALTPEPPERSHANK = GetItemInfo(133557); --"Salt & Pepper Shank" - SMARTBUFF_PICKLEDSTORMRAY = GetItemInfo(133562); --"Pickled Stormray" - SMARTBUFF_DROGBARSTYLESALMON = GetItemInfo(133569); --"Drogbar-Style Salmon" - SMARTBUFF_BARRACUDAMRGLGAGH = GetItemInfo(133567); --"Barracuda Mrglgagh" - SMARTBUFF_FIGHTERCHOW = GetItemInfo(133577); --"Fighter Chow" - SMARTBUFF_FARONAARFIZZ = GetItemInfo(133563); --"Faronaar Fizz" - SMARTBUFF_BEARTARTARE = GetItemInfo(133576); --"Bear Tartare" - SMARTBUFF_LEGIONCHILI = GetItemInfo(118428); --"Legion Chili" - SMARTBUFF_DEEPFRIEDMOSSGILL = GetItemInfo(133561); --"Deep-Fried Mossgill" - SMARTBUFF_MONDAZI = GetItemInfo(154885); --"Mon'Dazi" - SMARTBUFF_KULTIRAMISU = GetItemInfo(154881); --"Kul Tiramisu" - SMARTBUFF_GRILLEDCATFISH = GetItemInfo(154889); --"Grilled Catfish" - SMARTBUFF_LOALOAF = GetItemInfo(154887); --"Loa Loaf" - SMARTBUFF_HONEYHAUNCHES = GetItemInfo(154882); --"Honey-Glazed Haunches" - SMARTBUFF_RAVENBERRYTARTS = GetItemInfo(154883); --"Ravenberry Tarts" - SMARTBUFF_SWAMPFISHNCHIPS = GetItemInfo(154884); --"Swamp Fish 'n Chips" - SMARTBUFF_SEASONEDLOINS = GetItemInfo(154891); --"Seasoned Loins" - SMARTBUFF_SAILORSPIE = GetItemInfo(154888); --"Sailor's Pie" - SMARTBUFF_SPICEDSNAPPER = GetItemInfo(154886); --"Spiced Snapper" - --SMARTBUFF_HEARTSBANEHEXWURST = GetItemInfo(163781); --"Heartsbane Hexwurst" - SMARTBUFF_ABYSSALFRIEDRISSOLE = GetItemInfo(168311); --"Abyssal-Fried Rissole" - SMARTBUFF_BAKEDPORTTATO = GetItemInfo(168313); --"Baked Port Tato" - SMARTBUFF_BILTONG = GetItemInfo(168314); --"Bil'Tong" - SMARTBUFF_BIGMECH = GetItemInfo(168310); --"Mech-Dowel's 'Big Mech'" - SMARTBUFF_FRAGRANTKAKAVIA = GetItemInfo(168312); --"Fragrant Kakavia" - SMARTBUFF_BANANABEEFPUDDING = GetItemInfo(172069); --"Banana Beef Pudding" - SMARTBUFF_BUTTERSCOTCHRIBS = GetItemInfo(172040); --"Butterscotch Marinated Ribs" - SMARTBUFF_CINNAMONBONEFISH = GetItemInfo(172044); --"Cinnamon Bonefish Stew" - SMARTBUFF_EXTRALEMONYFILET = GetItemInfo(184682); --"Extra Lemony Herb Filet" - SMARTBUFF_FRIEDBONEFISH = GetItemInfo(172063); --"Friedn Bonefish" - SMARTBUFF_IRIDESCENTRAVIOLI = GetItemInfo(172049); --"Iridescent Ravioli with Apple Sauce" - SMARTBUFF_MEATYAPPLEDUMPLINGS = GetItemInfo(172048); --"Meaty Apple Dumplings" - SMARTBUFF_PICKLEDMEATSMOOTHIE = GetItemInfo(172068); --"Pickled Meat Smoothie" - SMARTBUFF_SERAPHTENDERS = GetItemInfo(172061); --"Seraph Tenders" - SMARTBUFF_SPINEFISHSOUFFLE = GetItemInfo(172041); --"Spinefish Souffle and Fries" - SMARTBUFF_STEAKALAMODE = GetItemInfo(172051); --"Steak ala Mode" - SMARTBUFF_SWEETSILVERGILL = GetItemInfo(172050); --"Sweet Silvergill Sausages" - SMARTBUFF_TENEBROUSCROWNROAST = GetItemInfo(172045); --"Tenebrous Crown Roast Aspic" - + _,SMARTBUFF_JUICYBEARBURGER = GetItemInfo(35565); --"Juicy Bear Burger" + _,SMARTBUFF_CRUNCHYSPIDER = GetItemInfo(22645); --"Crunchy Spider Surprise" + _,SMARTBUFF_LYNXSTEAK = GetItemInfo(27635); --"Lynx Steak" + _,SMARTBUFF_CHARREDBEARKABOBS = GetItemInfo(35563); --"Charred Bear Kabobs" + _,SMARTBUFF_BATBITES = GetItemInfo(27636); --"Bat Bites" + _,SMARTBUFF_ROASTEDMOONGRAZE = GetItemInfo(24105); --"Roasted Moongraze Tenderloin" + _,SMARTBUFF_MOKNATHALSHORTRIBS = GetItemInfo(31672); --"Mok'Nathal Shortribs" + _,SMARTBUFF_CRUNCHYSERPENT = GetItemInfo(31673); --"Crunchy Serpent" + _,SMARTBUFF_ROASTEDCLEFTHOOF = GetItemInfo(27658); --"Roasted Clefthoof" + _,SMARTBUFF_FISHERMANSFEAST = GetItemInfo(33052); --"Fisherman's Feast" + _,SMARTBUFF_WARPBURGER = GetItemInfo(27659); --"Warp Burger" + _,SMARTBUFF_RAVAGERDOG = GetItemInfo(27655); --"Ravager Dog" + _,SMARTBUFF_SKULLFISHSOUP = GetItemInfo(33825); --"Skullfish Soup" + _,SMARTBUFF_BUZZARDBITES = GetItemInfo(27651); --"Buzzard Bites" + _,SMARTBUFF_TALBUKSTEAK = GetItemInfo(27660); --"Talbuk Steak" + _,SMARTBUFF_GOLDENFISHSTICKS = GetItemInfo(27666); --"Golden Fish Sticks" + _,SMARTBUFF_SPICYHOTTALBUK = GetItemInfo(33872); --"Spicy Hot Talbuk" + _,SMARTBUFF_FELTAILDELIGHT = GetItemInfo(27662); --"Feltail Delight" + _,SMARTBUFF_BLACKENEDSPOREFISH = GetItemInfo(27663); --"Blackened Sporefish" + _,SMARTBUFF_HOTAPPLECIDER = GetItemInfo(34411); --"Hot Apple Cider" + _,SMARTBUFF_BROILEDBLOODFIN = GetItemInfo(33867); --"Broiled Bloodfin" + _,SMARTBUFF_SPICYCRAWDAD = GetItemInfo(27667); --"Spicy Crawdad" + _,SMARTBUFF_POACHEDBLUEFISH = GetItemInfo(27665); --"Poached Bluefish" + _,SMARTBUFF_BLACKENEDBASILISK = GetItemInfo(27657); --"Blackened Basilisk" + _,SMARTBUFF_GRILLEDMUDFISH = GetItemInfo(27664); --"Grilled Mudfish" + _,SMARTBUFF_CLAMBAR = GetItemInfo(30155); --"Clam Bar" + _,SMARTBUFF_SAGEFISHDELIGHT = GetItemInfo(21217); --"Sagefish Delight" + _,SMARTBUFF_SALTPEPPERSHANK = GetItemInfo(133557); --"Salt & Pepper Shank" + _,SMARTBUFF_PICKLEDSTORMRAY = GetItemInfo(133562); --"Pickled Stormray" + _,SMARTBUFF_DROGBARSTYLESALMON = GetItemInfo(133569); --"Drogbar-Style Salmon" + _,SMARTBUFF_BARRACUDAMRGLGAGH = GetItemInfo(133567); --"Barracuda Mrglgagh" + _,SMARTBUFF_FIGHTERCHOW = GetItemInfo(133577); --"Fighter Chow" + _,SMARTBUFF_FARONAARFIZZ = GetItemInfo(133563); --"Faronaar Fizz" + _,SMARTBUFF_BEARTARTARE = GetItemInfo(133576); --"Bear Tartare" + _,SMARTBUFF_LEGIONCHILI = GetItemInfo(118428); --"Legion Chili" + _,SMARTBUFF_DEEPFRIEDMOSSGILL = GetItemInfo(133561); --"Deep-Fried Mossgill" + _,SMARTBUFF_MONDAZI = GetItemInfo(154885); --"Mon'Dazi" + _,SMARTBUFF_KULTIRAMISU = GetItemInfo(154881); --"Kul Tiramisu" + _,SMARTBUFF_GRILLEDCATFISH = GetItemInfo(154889); --"Grilled Catfish" + _,SMARTBUFF_LOALOAF = GetItemInfo(154887); --"Loa Loaf" + _,SMARTBUFF_HONEYHAUNCHES = GetItemInfo(154882); --"Honey-Glazed Haunches" + _,SMARTBUFF_RAVENBERRYTARTS = GetItemInfo(154883); --"Ravenberry Tarts" + _,SMARTBUFF_SWAMPFISHNCHIPS = GetItemInfo(154884); --"Swamp Fish 'n Chips" + _,SMARTBUFF_SEASONEDLOINS = GetItemInfo(154891); --"Seasoned Loins" + _,SMARTBUFF_SAILORSPIE = GetItemInfo(154888); --"Sailor's Pie" + _,SMARTBUFF_SPICEDSNAPPER = GetItemInfo(154886); --"Spiced Snapper" + --_,SMARTBUFF_HEARTSBANEHEXWURST = GetItemInfo(163781); --"Heartsbane Hexwurst" + _,SMARTBUFF_ABYSSALFRIEDRISSOLE = GetItemInfo(168311); --"Abyssal-Fried Rissole" + _,SMARTBUFF_BAKEDPORTTATO = GetItemInfo(168313); --"Baked Port Tato" + _,SMARTBUFF_BILTONG = GetItemInfo(168314); --"Bil'Tong" + _,SMARTBUFF_BIGMECH = GetItemInfo(168310); --"Mech-Dowel's 'Big Mech'" + _,SMARTBUFF_FRAGRANTKAKAVIA = GetItemInfo(168312); --"Fragrant Kakavia" + _,SMARTBUFF_BANANABEEFPUDDING = GetItemInfo(172069); --"Banana Beef Pudding" + _,SMARTBUFF_BUTTERSCOTCHRIBS = GetItemInfo(172040); --"Butterscotch Marinated Ribs" + _,SMARTBUFF_CINNAMONBONEFISH = GetItemInfo(172044); --"Cinnamon Bonefish Stew" + _,SMARTBUFF_EXTRALEMONYFILET = GetItemInfo(184682); --"Extra Lemony Herb Filet" + _,SMARTBUFF_FRIEDBONEFISH = GetItemInfo(172063); --"Friedn Bonefish" + _,SMARTBUFF_IRIDESCENTRAVIOLI = GetItemInfo(172049); --"Iridescent Ravioli with Apple Sauce" + _,SMARTBUFF_MEATYAPPLEDUMPLINGS = GetItemInfo(172048); --"Meaty Apple Dumplings" + _,SMARTBUFF_PICKLEDMEATSMOOTHIE = GetItemInfo(172068); --"Pickled Meat Smoothie" + _,SMARTBUFF_SERAPHTENDERS = GetItemInfo(172061); --"Seraph Tenders" + _,SMARTBUFF_SPINEFISHSOUFFLE = GetItemInfo(172041); --"Spinefish Souffle and Fries" + _,SMARTBUFF_STEAKALAMODE = GetItemInfo(172051); --"Steak ala Mode" + _,SMARTBUFF_SWEETSILVERGILL = GetItemInfo(172050); --"Sweet Silvergill Sausages" + _,SMARTBUFF_TENEBROUSCROWNROAST = GetItemInfo(172045); --"Tenebrous Crown Roast Aspic" + -- Dragonflight + _,SMARTBUFF_TimelyDemise = GetItemInfo(197778); -- Timely Demise (70 Haste) + _,SMARTBUFF_FiletOfFangs = GetItemInfo(197779); -- Filet of Fangs (70 Crit) + _,SMARTBUFF_SeamothSurprise = GetItemInfo(197780); -- Seamoth Surprise (70 Vers) + _,SMARTBUFF_SaltBakedFishcake = GetItemInfo(197781); -- Salt-Baked Fishcake (70 Mastery) + _,SMARTBUFF_FeistyFishSticks = GetItemInfo(197782); -- Feisty Fish Sticks (45 Haste/Crit) + _,SMARTBUFF_SeafoodPlatter = GetItemInfo(197783); -- Aromatic Seafood Platter (45 Haste/Vers) + _,SMARTBUFF_SeafoodMedley = GetItemInfo(197784); -- Sizzling Seafood Medley (45 Haste/Mastery) + _,SMARTBUFF_RevengeServedCold = GetItemInfo(197785); -- Revenge, Served Cold (45 Crit/Verst) + _,SMARTBUFF_Tongueslicer = GetItemInfo(197786); -- Thousandbone Tongueslicer (45 Crit/Mastery) + _,SMARTBUFF_GreatCeruleanSea = GetItemInfo(197787); -- Great Cerulean Sea (45 Vers/Mastery) + _,SMARTBUFF_FatedFortuneCookie = GetItemInfo(197792); -- Fated Fortune Cookie (76 primary stat) + _,SMARTBUFF_KaluakBanquet = GetItemInfo(197794); -- Feast: Grand Banquet of the Kalu'ak (76 primary stat) + _,SMARTBUFF_HoardOfDelicacies = GetItemInfo(197795); -- Feast: Hoard of Draconic Delicacies (76 primary stat) -- Food item IDs S.FoodItems = GetItems({ @@ -192,175 +225,236 @@ function SMARTBUFF_InitItemList() }); -- Conjured mage food IDs - SMARTBUFF_CONJUREDMANA = GetItemInfo(113509); --"Conjured Mana Buns" + _,SMARTBUFF_CONJUREDMANA = GetItemInfo(113509); --"Conjured Mana Buns" S.FoodMage = GetItems({113509, 80618, 80610, 65499, 43523, 43518, 34062, 65517, 65516, 65515, 65500, 42955}); - --SMARTBUFF_BCPETFOOD1 = GetItemInfo(33874); --"Kibler's Bits (Pet food)" - --SMARTBUFF_WOTLKPETFOOD1 = GetItemInfo(43005); --"Spiced Mammoth Treats (Pet food)" + --_,SMARTBUFF_BCPETFOOD1 = GetItemInfo(33874); --"Kibler's Bits (Pet food)" + --_,SMARTBUFF_WOTLKPETFOOD1 = GetItemInfo(43005); --"Spiced Mammoth Treats (Pet food)" -- Scrolls - SMARTBUFF_SOAGILITY1 = GetItemInfo(3012); --"Scroll of Agility I" - SMARTBUFF_SOAGILITY2 = GetItemInfo(1477); --"Scroll of Agility II" - SMARTBUFF_SOAGILITY3 = GetItemInfo(4425); --"Scroll of Agility III" - SMARTBUFF_SOAGILITY4 = GetItemInfo(10309); --"Scroll of Agility IV" - SMARTBUFF_SOAGILITY5 = GetItemInfo(27498); --"Scroll of Agility V" - SMARTBUFF_SOAGILITY6 = GetItemInfo(33457); --"Scroll of Agility VI" - SMARTBUFF_SOAGILITY7 = GetItemInfo(43463); --"Scroll of Agility VII" - SMARTBUFF_SOAGILITY8 = GetItemInfo(43464); --"Scroll of Agility VIII" - SMARTBUFF_SOAGILITY9 = GetItemInfo(63303); --"Scroll of Agility IX" - SMARTBUFF_SOINTELLECT1 = GetItemInfo(955); --"Scroll of Intellect I" - SMARTBUFF_SOINTELLECT2 = GetItemInfo(2290); --"Scroll of Intellect II" - SMARTBUFF_SOINTELLECT3 = GetItemInfo(4419); --"Scroll of Intellect III" - SMARTBUFF_SOINTELLECT4 = GetItemInfo(10308); --"Scroll of Intellect IV" - SMARTBUFF_SOINTELLECT5 = GetItemInfo(27499); --"Scroll of Intellect V" - SMARTBUFF_SOINTELLECT6 = GetItemInfo(33458); --"Scroll of Intellect VI" - SMARTBUFF_SOINTELLECT7 = GetItemInfo(37091); --"Scroll of Intellect VII" - SMARTBUFF_SOINTELLECT8 = GetItemInfo(37092); --"Scroll of Intellect VIII" - SMARTBUFF_SOINTELLECT9 = GetItemInfo(63305); --"Scroll of Intellect IX" - SMARTBUFF_SOSTAMINA1 = GetItemInfo(1180); --"Scroll of Stamina I" - SMARTBUFF_SOSTAMINA2 = GetItemInfo(1711); --"Scroll of Stamina II" - SMARTBUFF_SOSTAMINA3 = GetItemInfo(4422); --"Scroll of Stamina III" - SMARTBUFF_SOSTAMINA4 = GetItemInfo(10307); --"Scroll of Stamina IV" - SMARTBUFF_SOSTAMINA5 = GetItemInfo(27502); --"Scroll of Stamina V" - SMARTBUFF_SOSTAMINA6 = GetItemInfo(33461); --"Scroll of Stamina VI" - SMARTBUFF_SOSTAMINA7 = GetItemInfo(37093); --"Scroll of Stamina VII" - SMARTBUFF_SOSTAMINA8 = GetItemInfo(37094); --"Scroll of Stamina VIII" - SMARTBUFF_SOSTAMINA9 = GetItemInfo(63306); --"Scroll of Stamina IX" - SMARTBUFF_SOSPIRIT1 = GetItemInfo(1181); --"Scroll of Spirit I" - SMARTBUFF_SOSPIRIT2 = GetItemInfo(1712); --"Scroll of Spirit II" - SMARTBUFF_SOSPIRIT3 = GetItemInfo(4424); --"Scroll of Spirit III" - SMARTBUFF_SOSPIRIT4 = GetItemInfo(10306); --"Scroll of Spirit IV" - SMARTBUFF_SOSPIRIT5 = GetItemInfo(27501); --"Scroll of Spirit V" - SMARTBUFF_SOSPIRIT6 = GetItemInfo(33460); --"Scroll of Spirit VI" - SMARTBUFF_SOSPIRIT7 = GetItemInfo(37097); --"Scroll of Spirit VII" - SMARTBUFF_SOSPIRIT8 = GetItemInfo(37098); --"Scroll of Spirit VIII" - SMARTBUFF_SOSPIRIT9 = GetItemInfo(63307); --"Scroll of Spirit IX" - SMARTBUFF_SOSTRENGHT1 = GetItemInfo(954); --"Scroll of Strength I" - SMARTBUFF_SOSTRENGHT2 = GetItemInfo(2289); --"Scroll of Strength II" - SMARTBUFF_SOSTRENGHT3 = GetItemInfo(4426); --"Scroll of Strength III" - SMARTBUFF_SOSTRENGHT4 = GetItemInfo(10310); --"Scroll of Strength IV" - SMARTBUFF_SOSTRENGHT5 = GetItemInfo(27503); --"Scroll of Strength V" - SMARTBUFF_SOSTRENGHT6 = GetItemInfo(33462); --"Scroll of Strength VI" - SMARTBUFF_SOSTRENGHT7 = GetItemInfo(43465); --"Scroll of Strength VII" - SMARTBUFF_SOSTRENGHT8 = GetItemInfo(43466); --"Scroll of Strength VIII" - SMARTBUFF_SOSTRENGHT9 = GetItemInfo(63304); --"Scroll of Strength IX" - SMARTBUFF_SOPROTECTION9 = GetItemInfo(63308); --"Scroll of Protection IX" + _,SMARTBUFF_SOAGILITY1 = GetItemInfo(3012); --"Scroll of Agility I" + _,SMARTBUFF_SOAGILITY2 = GetItemInfo(1477); --"Scroll of Agility II" + _,SMARTBUFF_SOAGILITY3 = GetItemInfo(4425); --"Scroll of Agility III" + _,SMARTBUFF_SOAGILITY4 = GetItemInfo(10309); --"Scroll of Agility IV" + _,SMARTBUFF_SOAGILITY5 = GetItemInfo(27498); --"Scroll of Agility V" + _,SMARTBUFF_SOAGILITY6 = GetItemInfo(33457); --"Scroll of Agility VI" + _,SMARTBUFF_SOAGILITY7 = GetItemInfo(43463); --"Scroll of Agility VII" + _,SMARTBUFF_SOAGILITY8 = GetItemInfo(43464); --"Scroll of Agility VIII" + _,SMARTBUFF_SOAGILITY9 = GetItemInfo(63303); --"Scroll of Agility IX" + _,SMARTBUFF_SOINTELLECT1 = GetItemInfo(955); --"Scroll of Intellect I" + _,SMARTBUFF_SOINTELLECT2 = GetItemInfo(2290); --"Scroll of Intellect II" + _,SMARTBUFF_SOINTELLECT3 = GetItemInfo(4419); --"Scroll of Intellect III" + _,SMARTBUFF_SOINTELLECT4 = GetItemInfo(10308); --"Scroll of Intellect IV" + _,SMARTBUFF_SOINTELLECT5 = GetItemInfo(27499); --"Scroll of Intellect V" + _,SMARTBUFF_SOINTELLECT6 = GetItemInfo(33458); --"Scroll of Intellect VI" + _,SMARTBUFF_SOINTELLECT7 = GetItemInfo(37091); --"Scroll of Intellect VII" + _,SMARTBUFF_SOINTELLECT8 = GetItemInfo(37092); --"Scroll of Intellect VIII" + _,SMARTBUFF_SOINTELLECT9 = GetItemInfo(63305); --"Scroll of Intellect IX" + _,SMARTBUFF_SOSTAMINA1 = GetItemInfo(1180); --"Scroll of Stamina I" + _,SMARTBUFF_SOSTAMINA2 = GetItemInfo(1711); --"Scroll of Stamina II" + _,SMARTBUFF_SOSTAMINA3 = GetItemInfo(4422); --"Scroll of Stamina III" + _,SMARTBUFF_SOSTAMINA4 = GetItemInfo(10307); --"Scroll of Stamina IV" + _,SMARTBUFF_SOSTAMINA5 = GetItemInfo(27502); --"Scroll of Stamina V" + _,SMARTBUFF_SOSTAMINA6 = GetItemInfo(33461); --"Scroll of Stamina VI" + _,SMARTBUFF_SOSTAMINA7 = GetItemInfo(37093); --"Scroll of Stamina VII" + _,SMARTBUFF_SOSTAMINA8 = GetItemInfo(37094); --"Scroll of Stamina VIII" + _,SMARTBUFF_SOSTAMINA9 = GetItemInfo(63306); --"Scroll of Stamina IX" + _,SMARTBUFF_SOSPIRIT1 = GetItemInfo(1181); --"Scroll of Spirit I" + _,SMARTBUFF_SOSPIRIT2 = GetItemInfo(1712); --"Scroll of Spirit II" + _,SMARTBUFF_SOSPIRIT3 = GetItemInfo(4424); --"Scroll of Spirit III" + _,SMARTBUFF_SOSPIRIT4 = GetItemInfo(10306); --"Scroll of Spirit IV" + _,SMARTBUFF_SOSPIRIT5 = GetItemInfo(27501); --"Scroll of Spirit V" + _,SMARTBUFF_SOSPIRIT6 = GetItemInfo(33460); --"Scroll of Spirit VI" + _,SMARTBUFF_SOSPIRIT7 = GetItemInfo(37097); --"Scroll of Spirit VII" + _,SMARTBUFF_SOSPIRIT8 = GetItemInfo(37098); --"Scroll of Spirit VIII" + _,SMARTBUFF_SOSPIRIT9 = GetItemInfo(63307); --"Scroll of Spirit IX" + _,SMARTBUFF_SOSTRENGHT1 = GetItemInfo(954); --"Scroll of Strength I" + _,SMARTBUFF_SOSTRENGHT2 = GetItemInfo(2289); --"Scroll of Strength II" + _,SMARTBUFF_SOSTRENGHT3 = GetItemInfo(4426); --"Scroll of Strength III" + _,SMARTBUFF_SOSTRENGHT4 = GetItemInfo(10310); --"Scroll of Strength IV" + _,SMARTBUFF_SOSTRENGHT5 = GetItemInfo(27503); --"Scroll of Strength V" + _,SMARTBUFF_SOSTRENGHT6 = GetItemInfo(33462); --"Scroll of Strength VI" + _,SMARTBUFF_SOSTRENGHT7 = GetItemInfo(43465); --"Scroll of Strength VII" + _,SMARTBUFF_SOSTRENGHT8 = GetItemInfo(43466); --"Scroll of Strength VIII" + _,SMARTBUFF_SOSTRENGHT9 = GetItemInfo(63304); --"Scroll of Strength IX" + _,SMARTBUFF_SOPROTECTION9 = GetItemInfo(63308); --"Scroll of Protection IX" + + _,SMARTBUFF_MiscItem1 = GetItemInfo(178512); --"Celebration Package" + _,SMARTBUFF_MiscItem2 = GetItemInfo(44986); --"Warts-B-Gone Lip Balm" + _,SMARTBUFF_MiscItem3 = GetItemInfo(69775); --"Vrykul Drinking Horn" + _,SMARTBUFF_MiscItem4 = GetItemInfo(86569); --"Crystal of Insanity" + _,SMARTBUFF_MiscItem5 = GetItemInfo(85500); --"Anglers Fishing Raft" + _,SMARTBUFF_MiscItem6 = GetItemInfo(85973); --"Ancient Pandaren Fishing Charm" + _,SMARTBUFF_MiscItem7 = GetItemInfo(94604); --"Burning Seed" + _,SMARTBUFF_MiscItem9 = GetItemInfo(92738); --"Safari Hat" + _,SMARTBUFF_MiscItem10 = GetItemInfo(110424); --"Savage Safari Hat" + _,SMARTBUFF_MiscItem11 = GetItemInfo(118922); --"Oralius' Whispering Crystal" + _,SMARTBUFF_MiscItem12 = GetItemInfo(129192); --"Inquisitor's Menacing Eye" + _,SMARTBUFF_MiscItem13 = GetItemInfo(129210); --"Fel Crystal Fragments" + _,SMARTBUFF_MiscItem14 = GetItemInfo(128475); --"Empowered Augment Rune" + _,SMARTBUFF_MiscItem15 = GetItemInfo(128482); --"Empowered Augment Rune" + _,SMARTBUFF_MiscItem17 = GetItemInfo(147707); --"Repurposed Fel Focuser" + --Shadowlands + _,SMARTBUFF_AugmentRune = GetItemInfo(190384); --"Eternal Augment Rune" + _,SMARTBUFF_VieledAugment = GetItemInfo(181468); --"Veiled Augment Rune" + --Dragonflight + _,SMARTBUFF_DraconicRune = GetItemInfo(201325); -- Draconic Augment Rune + _,SMARTBUFF_VantusRune_VotI_q1 = GetItemInfo(198491); -- Vantus Rune: Vault of the Incarnates (Quality 1) + _,SMARTBUFF_VantusRune_VotI_q2 = GetItemInfo(198492); -- Vantus Rune: Vault of the Incarnates (Quality 2) + _,SMARTBUFF_VantusRune_VotI_q3 = GetItemInfo(198493); -- Vantus Rune: Vault of the Incarnates (Quality 3) + + _,SMARTBUFF_FLASKTBC1 = GetItemInfo(22854); --"Flask of Relentless Assault" + _,SMARTBUFF_FLASKTBC2 = GetItemInfo(22866); --"Flask of Pure Death" + _,SMARTBUFF_FLASKTBC3 = GetItemInfo(22851); --"Flask of Fortification" + _,SMARTBUFF_FLASKTBC4 = GetItemInfo(22861); --"Flask of Blinding Light" + _,SMARTBUFF_FLASKTBC5 = GetItemInfo(22853); --"Flask of Mighty Versatility" + _,SMARTBUFF_FLASK1 = GetItemInfo(46377); --"Flask of Endless Rage" + _,SMARTBUFF_FLASK2 = GetItemInfo(46376); --"Flask of the Frost Wyrm" + _,SMARTBUFF_FLASK3 = GetItemInfo(46379); --"Flask of Stoneblood" + _,SMARTBUFF_FLASK4 = GetItemInfo(46378); --"Flask of Pure Mojo" + _,SMARTBUFF_FLASKCT1 = GetItemInfo(58087); --"Flask of the Winds" + _,SMARTBUFF_FLASKCT2 = GetItemInfo(58088); --"Flask of Titanic Strength" + _,SMARTBUFF_FLASKCT3 = GetItemInfo(58086); --"Flask of the Draconic Mind" + _,SMARTBUFF_FLASKCT4 = GetItemInfo(58085); --"Flask of Steelskin" + _,SMARTBUFF_FLASKCT5 = GetItemInfo(67438); --"Flask of Flowing Water" + _,SMARTBUFF_FLASKCT7 = GetItemInfo(65455); --"Flask of Battle" + _,SMARTBUFF_FLASKMOP1 = GetItemInfo(75525); --"Alchemist's Flask" + _,SMARTBUFF_FLASKMOP2 = GetItemInfo(76087); --"Flask of the Earth" + _,SMARTBUFF_FLASKMOP3 = GetItemInfo(76086); --"Flask of Falling Leaves" + _,SMARTBUFF_FLASKMOP4 = GetItemInfo(76084); --"Flask of Spring Blossoms" + _,SMARTBUFF_FLASKMOP5 = GetItemInfo(76085); --"Flask of the Warm Sun" + _,SMARTBUFF_FLASKMOP6 = GetItemInfo(76088); --"Flask of Winter's Bite" + _,SMARTBUFF_FLASKWOD1 = GetItemInfo(109152); --"Draenic Stamina Flask" + _,SMARTBUFF_FLASKWOD2 = GetItemInfo(109148); --"Draenic Strength Flask" + _,SMARTBUFF_FLASKWOD3 = GetItemInfo(109147); --"Draenic Intellect Flask" + _,SMARTBUFF_FLASKWOD4 = GetItemInfo(109145); --"Draenic Agility Flask" + _,SMARTBUFF_GRFLASKWOD1 = GetItemInfo(109160); --"Greater Draenic Stamina Flask" + _,SMARTBUFF_GRFLASKWOD2 = GetItemInfo(109156); --"Greater Draenic Strength Flask" + _,SMARTBUFF_GRFLASKWOD3 = GetItemInfo(109155); --"Greater Draenic Intellect Flask" + _,SMARTBUFF_GRFLASKWOD4 = GetItemInfo(109153); --"Greater Draenic Agility Flask" + _,SMARTBUFF_FLASKLEG1 = GetItemInfo(127850); --"Flask of Ten Thousand Scars" + _,SMARTBUFF_FLASKLEG2 = GetItemInfo(127849); --"Flask of the Countless Armies" + _,SMARTBUFF_FLASKLEG3 = GetItemInfo(127847); --"Flask of the Whispered Pact" + _,SMARTBUFF_FLASKLEG4 = GetItemInfo(127848); --"Flask of the Seventh Demon" + _,SMARTBUFF_FLASKBFA1 = GetItemInfo(152639); --"Flask of Endless Fathoms" + _,SMARTBUFF_FLASKBFA2 = GetItemInfo(152638); --"Flask of the Currents" + _,SMARTBUFF_FLASKBFA3 = GetItemInfo(152641); --"Flask of the Undertow" + _,SMARTBUFF_FLASKBFA4 = GetItemInfo(152640); --"Flask of the Vast Horizon" + _,SMARTBUFF_GRFLASKBFA1 = GetItemInfo(168652); --"Greather Flask of Endless Fathoms" + _,SMARTBUFF_GRFLASKBFA2 = GetItemInfo(168651); --"Greater Flask of the Currents" + _,SMARTBUFF_GRFLASKBFA3 = GetItemInfo(168654); --"Greather Flask of teh Untertow" + _,SMARTBUFF_GRFLASKBFA4 = GetItemInfo(168653); --"Greater Flask of the Vast Horizon" + _,SMARTBUFF_FLASKSL1 = GetItemInfo(171276); --"Spectral Flask of Power" + _,SMARTBUFF_FLASKSL2 = GetItemInfo(171278); --"Spectral Flask of Stamina" + + _,SMARTBUFF_FlaskDF1_q1 = GetItemInfo(191318); -- Phial of the Eye in the Storm (Quality 1) + _,SMARTBUFF_FlaskDF1_q2 = GetItemInfo(191319); -- Phial of the Eye in the Storm (Quality 2) + _,SMARTBUFF_FlaskDF1_q3 = GetItemInfo(191320); -- Phial of the Eye in the Storm (Quality 3) + + _,SMARTBUFF_FlaskDF2_q1 = GetItemInfo(191321); -- Phial of Still Air (Quality 1) + _,SMARTBUFF_FlaskDF2_q2 = GetItemInfo(191322); -- Phial of Still Air (Quality 2) + _,SMARTBUFF_FlaskDF2_q3 = GetItemInfo(191323); -- Phial of Still Air (Quality 3) + + _,SMARTBUFF_FlaskDF3_q1 = GetItemInfo(191324); -- Phial of Icy Preservation (Quality 1) + _,SMARTBUFF_FlaskDF3_q2 = GetItemInfo(191325); -- Phial of Icy Preservation (Quality 2) + _,SMARTBUFF_FlaskDF3_q3 = GetItemInfo(191326); -- Phial of Icy Preservation (Quality 3) + + _,SMARTBUFF_FlaskDF4_q1 = GetItemInfo(191327); -- Iced Phial of Corrupting Rage (Quality 1) + _,SMARTBUFF_FlaskDF4_q2 = GetItemInfo(191328); -- Iced Phial of Corrupting Rage (Quality 2) + _,SMARTBUFF_FlaskDF4_q3 = GetItemInfo(191329); -- Iced Phial of Corrupting Rage (Quality 3) + + _,SMARTBUFF_FlaskDF5_q1 = GetItemInfo(191330); -- Phial of Charged Isolation (Quality 1) + _,SMARTBUFF_FlaskDF5_q2 = GetItemInfo(191331); -- Phial of Charged Isolation (Quality 2) + _,SMARTBUFF_FlaskDF5_q3 = GetItemInfo(191332); -- Phial of Charged Isolation (Quality 3) - SMARTBUFF_MiscItem1 = GetItemInfo(178512); --"Celebration Package" - SMARTBUFF_MiscItem2 = GetItemInfo(44986); --"Warts-B-Gone Lip Balm" - SMARTBUFF_MiscItem3 = GetItemInfo(69775); --"Vrykul Drinking Horn" - SMARTBUFF_MiscItem4 = GetItemInfo(86569); --"Crystal of Insanity" - SMARTBUFF_MiscItem5 = GetItemInfo(85500); --"Anglers Fishing Raft" - SMARTBUFF_MiscItem6 = GetItemInfo(85973); --"Ancient Pandaren Fishing Charm" - SMARTBUFF_MiscItem7 = GetItemInfo(94604); --"Burning Seed" - SMARTBUFF_MiscItem9 = GetItemInfo(92738); --"Safari Hat" - SMARTBUFF_MiscItem10 = GetItemInfo(110424); --"Savage Safari Hat" - SMARTBUFF_MiscItem11 = GetItemInfo(118922); --"Oralius' Whispering Crystal" - SMARTBUFF_MiscItem12 = GetItemInfo(129192); --"Inquisitor's Menacing Eye" - SMARTBUFF_MiscItem13 = GetItemInfo(129210); --"Fel Crystal Fragments" - SMARTBUFF_MiscItem14 = GetItemInfo(128475); --"Empowered Augment Rune" - SMARTBUFF_MiscItem15 = GetItemInfo(128482); --"Empowered Augment Rune" - SMARTBUFF_MiscItem17 = GetItemInfo(147707); --"Repurposed Fel Focuser" + _,SMARTBUFF_FlaskDF6_q1 = GetItemInfo(191333); -- Phial of Glacial Fury (Quality 1) + _,SMARTBUFF_FlaskDF6_q2 = GetItemInfo(191334); -- Phial of Glacial Fury (Quality 2) + _,SMARTBUFF_FlaskDF6_q3 = GetItemInfo(191335); -- Phial of Glacial Fury (Quality 3) - SMARTBUFF_AugmentRune = GetItemInfo(190384); --"Eternal Augment Rune" - SMARTBUFF_VieledAugment = GetItemInfo(181468); --"Veiled Augment Rune" + _,SMARTBUFF_FlaskDF7_q1 = GetItemInfo(191336); -- Phial of Static Empowerment (Quality 1) + _,SMARTBUFF_FlaskDF7_q2 = GetItemInfo(191337); -- Phial of Static Empowerment (Quality 2) + _,SMARTBUFF_FlaskDF7_q3 = GetItemInfo(191338); -- Phial of Static Empowerment (Quality 3) - SMARTBUFF_FLASKTBC1 = GetItemInfo(22854); --"Flask of Relentless Assault" - SMARTBUFF_FLASKTBC2 = GetItemInfo(22866); --"Flask of Pure Death" - SMARTBUFF_FLASKTBC3 = GetItemInfo(22851); --"Flask of Fortification" - SMARTBUFF_FLASKTBC4 = GetItemInfo(22861); --"Flask of Blinding Light" - SMARTBUFF_FLASKTBC5 = GetItemInfo(22853); --"Flask of Mighty Versatility" - SMARTBUFF_FLASK1 = GetItemInfo(46377); --"Flask of Endless Rage" - SMARTBUFF_FLASK2 = GetItemInfo(46376); --"Flask of the Frost Wyrm" - SMARTBUFF_FLASK3 = GetItemInfo(46379); --"Flask of Stoneblood" - SMARTBUFF_FLASK4 = GetItemInfo(46378); --"Flask of Pure Mojo" - SMARTBUFF_FLASKCT1 = GetItemInfo(58087); --"Flask of the Winds" - SMARTBUFF_FLASKCT2 = GetItemInfo(58088); --"Flask of Titanic Strength" - SMARTBUFF_FLASKCT3 = GetItemInfo(58086); --"Flask of the Draconic Mind" - SMARTBUFF_FLASKCT4 = GetItemInfo(58085); --"Flask of Steelskin" - SMARTBUFF_FLASKCT5 = GetItemInfo(67438); --"Flask of Flowing Water" - SMARTBUFF_FLASKCT7 = GetItemInfo(65455); --"Flask of Battle" - SMARTBUFF_FLASKMOP1 = GetItemInfo(75525); --"Alchemist's Flask" - SMARTBUFF_FLASKMOP2 = GetItemInfo(76087); --"Flask of the Earth" - SMARTBUFF_FLASKMOP3 = GetItemInfo(76086); --"Flask of Falling Leaves" - SMARTBUFF_FLASKMOP4 = GetItemInfo(76084); --"Flask of Spring Blossoms" - SMARTBUFF_FLASKMOP5 = GetItemInfo(76085); --"Flask of the Warm Sun" - SMARTBUFF_FLASKMOP6 = GetItemInfo(76088); --"Flask of Winter's Bite" - SMARTBUFF_FLASKWOD1 = GetItemInfo(109152); --"Draenic Stamina Flask" - SMARTBUFF_FLASKWOD2 = GetItemInfo(109148); --"Draenic Strength Flask" - SMARTBUFF_FLASKWOD3 = GetItemInfo(109147); --"Draenic Intellect Flask" - SMARTBUFF_FLASKWOD4 = GetItemInfo(109145); --"Draenic Agility Flask" - SMARTBUFF_GRFLASKWOD1 = GetItemInfo(109160); --"Greater Draenic Stamina Flask" - SMARTBUFF_GRFLASKWOD2 = GetItemInfo(109156); --"Greater Draenic Strength Flask" - SMARTBUFF_GRFLASKWOD3 = GetItemInfo(109155); --"Greater Draenic Intellect Flask" - SMARTBUFF_GRFLASKWOD4 = GetItemInfo(109153); --"Greater Draenic Agility Flask" - SMARTBUFF_FLASKLEG1 = GetItemInfo(127850); --"Flask of Ten Thousand Scars" - SMARTBUFF_FLASKLEG2 = GetItemInfo(127849); --"Flask of the Countless Armies" - SMARTBUFF_FLASKLEG3 = GetItemInfo(127847); --"Flask of the Whispered Pact" - SMARTBUFF_FLASKLEG4 = GetItemInfo(127848); --"Flask of the Seventh Demon" - SMARTBUFF_FLASKBFA1 = GetItemInfo(152639); --"Flask of Endless Fathoms" - SMARTBUFF_FLASKBFA2 = GetItemInfo(152638); --"Flask of the Currents" - SMARTBUFF_FLASKBFA3 = GetItemInfo(152641); --"Flask of the Undertow" - SMARTBUFF_FLASKBFA4 = GetItemInfo(152640); --"Flask of the Vast Horizon" - SMARTBUFF_GRFLASKBFA1 = GetItemInfo(168652); --"Greather Flask of Endless Fathoms" - SMARTBUFF_GRFLASKBFA2 = GetItemInfo(168651); --"Greater Flask of the Currents" - SMARTBUFF_GRFLASKBFA3 = GetItemInfo(168654); --"Greather Flask of teh Untertow" - SMARTBUFF_GRFLASKBFA4 = GetItemInfo(168653); --"Greater Flask of the Vast Horizon" - SMARTBUFF_FLASKSL1 = GetItemInfo(171276); --"Spectral Flask of Power" - SMARTBUFF_FLASKSL2 = GetItemInfo(171278); --"Spectral Flask of Stamina" + _,SMARTBUFF_FlaskDF8_q1 = GetItemInfo(191339); -- Phial of Tepid Versatility (Quality 1) + _,SMARTBUFF_FlaskDF8_q2 = GetItemInfo(191340); -- Phial of Tepid Versatility (Quality 2) + _,SMARTBUFF_FlaskDF8_q3 = GetItemInfo(191341); -- Phial of Tepid Versatility (Quality 3) + + _,SMARTBUFF_FlaskDF9_q1 = GetItemInfo(191342); -- Aerated Phial of Deftness (Quality 1) + _,SMARTBUFF_FlaskDF9_q3 = GetItemInfo(191343); -- Aerated Phial of Deftness (Quality 2) + _,SMARTBUFF_FlaskDF9_q3 = GetItemInfo(191344); -- Aerated Phial of Deftness (Quality 3) + + _,SMARTBUFF_FlaskDF10_q1 = GetItemInfo(191345); -- Steaming Phial of Finesse (Quality 1) + _,SMARTBUFF_FlaskDF10_q2 = GetItemInfo(191346); -- Steaming Phial of Finesse (Quality 1) + _,SMARTBUFF_FlaskDF10_q3 = GetItemInfo(191347); -- Steaming Phial of Finesse (Quality 1) - SMARTBUFF_ELIXIRTBC1 = GetItemInfo(22831); --"Elixir of Major Agility" - SMARTBUFF_ELIXIRTBC2 = GetItemInfo(28104); --"Elixir of Mastery" - SMARTBUFF_ELIXIRTBC3 = GetItemInfo(22825); --"Elixir of Healing Power" - SMARTBUFF_ELIXIRTBC4 = GetItemInfo(22834); --"Elixir of Major Defense" - SMARTBUFF_ELIXIRTBC5 = GetItemInfo(22824); --"Elixir of Major Strangth" - SMARTBUFF_ELIXIRTBC6 = GetItemInfo(32062); --"Elixir of Major Fortitude" - SMARTBUFF_ELIXIRTBC7 = GetItemInfo(22840); --"Elixir of Major Mageblood" - SMARTBUFF_ELIXIRTBC8 = GetItemInfo(32067); --"Elixir of Draenic Wisdom" - SMARTBUFF_ELIXIRTBC9 = GetItemInfo(28103); --"Adept's Elixir" - SMARTBUFF_ELIXIRTBC10 = GetItemInfo(22848); --"Elixir of Empowerment" - SMARTBUFF_ELIXIRTBC11 = GetItemInfo(28102); --"Onslaught Elixir" - SMARTBUFF_ELIXIRTBC12 = GetItemInfo(22835); --"Elixir of Major Shadow Power" - SMARTBUFF_ELIXIRTBC13 = GetItemInfo(32068); --"Elixir of Ironskin" - SMARTBUFF_ELIXIRTBC14 = GetItemInfo(32063); --"Earthen Elixir" - SMARTBUFF_ELIXIRTBC15 = GetItemInfo(22827); --"Elixir of Major Frost Power" - SMARTBUFF_ELIXIRTBC16 = GetItemInfo(31679); --"Fel Strength Elixir" - SMARTBUFF_ELIXIRTBC17 = GetItemInfo(22833); --"Elixir of Major Firepower" - SMARTBUFF_ELIXIR1 = GetItemInfo(39666); --"Elixir of Mighty Agility" - SMARTBUFF_ELIXIR2 = GetItemInfo(44332); --"Elixir of Mighty Thoughts" - SMARTBUFF_ELIXIR3 = GetItemInfo(40078); --"Elixir of Mighty Fortitude" - SMARTBUFF_ELIXIR4 = GetItemInfo(40073); --"Elixir of Mighty Strength" - SMARTBUFF_ELIXIR5 = GetItemInfo(40072); --"Elixir of Spirit" - SMARTBUFF_ELIXIR6 = GetItemInfo(40097); --"Elixir of Protection" - SMARTBUFF_ELIXIR7 = GetItemInfo(44328); --"Elixir of Mighty Defense" - SMARTBUFF_ELIXIR8 = GetItemInfo(44331); --"Elixir of Lightning Speed" - SMARTBUFF_ELIXIR9 = GetItemInfo(44329); --"Elixir of Expertise" - SMARTBUFF_ELIXIR10 = GetItemInfo(44327); --"Elixir of Deadly Strikes" - SMARTBUFF_ELIXIR11 = GetItemInfo(44330); --"Elixir of Armor Piercing" - SMARTBUFF_ELIXIR12 = GetItemInfo(44325); --"Elixir of Accuracy" - SMARTBUFF_ELIXIR13 = GetItemInfo(40076); --"Guru's Elixir" - SMARTBUFF_ELIXIR14 = GetItemInfo(9187); --"Elixir of Greater Agility" - SMARTBUFF_ELIXIR15 = GetItemInfo(28103); --"Adept's Elixir" - SMARTBUFF_ELIXIR16 = GetItemInfo(40070); --"Spellpower Elixir" - SMARTBUFF_ELIXIRCT1 = GetItemInfo(58148); --"Elixir of the Master" - SMARTBUFF_ELIXIRCT2 = GetItemInfo(58144); --"Elixir of Mighty Speed" - SMARTBUFF_ELIXIRCT3 = GetItemInfo(58094); --"Elixir of Impossible Accuracy" - SMARTBUFF_ELIXIRCT4 = GetItemInfo(58143); --"Prismatic Elixir" - SMARTBUFF_ELIXIRCT5 = GetItemInfo(58093); --"Elixir of Deep Earth" - SMARTBUFF_ELIXIRCT6 = GetItemInfo(58092); --"Elixir of the Cobra" - SMARTBUFF_ELIXIRCT7 = GetItemInfo(58089); --"Elixir of the Naga" - SMARTBUFF_ELIXIRCT8 = GetItemInfo(58084); --"Ghost Elixir" - SMARTBUFF_ELIXIRMOP1 = GetItemInfo(76081); --"Elixir of Mirrors" - SMARTBUFF_ELIXIRMOP2 = GetItemInfo(76079); --"Elixir of Peace" - SMARTBUFF_ELIXIRMOP3 = GetItemInfo(76080); --"Elixir of Perfection" - SMARTBUFF_ELIXIRMOP4 = GetItemInfo(76078); --"Elixir of the Rapids" - SMARTBUFF_ELIXIRMOP5 = GetItemInfo(76077); --"Elixir of Weaponry" - SMARTBUFF_ELIXIRMOP6 = GetItemInfo(76076); --"Mad Hozen Elixir" - SMARTBUFF_ELIXIRMOP7 = GetItemInfo(76075); --"Mantid Elixir" - SMARTBUFF_ELIXIRMOP8 = GetItemInfo(76083); --"Monk's Elixir" + _,SMARTBUFF_FlaskDF11_q1 = GetItemInfo(191348); -- Charged Phial of Alacrity (Quality 1) + _,SMARTBUFF_FlaskDF11_q2 = GetItemInfo(191349); -- Charged Phial of Alacrity (Quality 2) + _,SMARTBUFF_FlaskDF11_q3 = GetItemInfo(191350); -- Charged Phial of Alacrity (Quality 3) + + _,SMARTBUFF_FlaskDF12_q1 = GetItemInfo(191354); -- Crystalline Phial of Perception (Quality 1) + _,SMARTBUFF_FlaskDF12_q2 = GetItemInfo(191355); -- Crystalline Phial of Perception (Quality 2) + _,SMARTBUFF_FlaskDF12_q3 = GetItemInfo(191356); -- Crystalline Phial of Perception (Quality 3) + + _,SMARTBUFF_FlaskDF13_q1 = GetItemInfo(191357); -- Phial of Elemental Chaos (Quality 1) + _,SMARTBUFF_FlaskDF13_q2 = GetItemInfo(191358); -- Phial of Elemental Chaos (Quality 2) + _,SMARTBUFF_FlaskDF13_q3 = GetItemInfo(191359); -- Phial of Elemental Chaos (Quality 3) + + _,SMARTBUFF_FlaskDF14_q1 = GetItemInfo(197720); -- Aerated Phial of Quick Hands (Quality 1) + _,SMARTBUFF_FlaskDF14_q2 = GetItemInfo(197721); -- Aerated Phial of Quick Hands (Quality 2) + _,SMARTBUFF_FlaskDF14_q3 = GetItemInfo(197722); -- Aerated Phial of Quick Hands (Quality 3) + + _,SMARTBUFF_ELIXIRTBC1 = GetItemInfo(22831); --"Elixir of Major Agility" + _,SMARTBUFF_ELIXIRTBC2 = GetItemInfo(28104); --"Elixir of Mastery" + _,SMARTBUFF_ELIXIRTBC3 = GetItemInfo(22825); --"Elixir of Healing Power" + _,SMARTBUFF_ELIXIRTBC4 = GetItemInfo(22834); --"Elixir of Major Defense" + _,SMARTBUFF_ELIXIRTBC5 = GetItemInfo(22824); --"Elixir of Major Strangth" + _,SMARTBUFF_ELIXIRTBC6 = GetItemInfo(32062); --"Elixir of Major Fortitude" + _,SMARTBUFF_ELIXIRTBC7 = GetItemInfo(22840); --"Elixir of Major Mageblood" + _,SMARTBUFF_ELIXIRTBC8 = GetItemInfo(32067); --"Elixir of Draenic Wisdom" + _,SMARTBUFF_ELIXIRTBC9 = GetItemInfo(28103); --"Adept's Elixir" + _,SMARTBUFF_ELIXIRTBC10 = GetItemInfo(22848); --"Elixir of Empowerment" + _,SMARTBUFF_ELIXIRTBC11 = GetItemInfo(28102); --"Onslaught Elixir" + _,SMARTBUFF_ELIXIRTBC12 = GetItemInfo(22835); --"Elixir of Major Shadow Power" + _,SMARTBUFF_ELIXIRTBC13 = GetItemInfo(32068); --"Elixir of Ironskin" + _,SMARTBUFF_ELIXIRTBC14 = GetItemInfo(32063); --"Earthen Elixir" + _,SMARTBUFF_ELIXIRTBC15 = GetItemInfo(22827); --"Elixir of Major Frost Power" + _,SMARTBUFF_ELIXIRTBC16 = GetItemInfo(31679); --"Fel Strength Elixir" + _,SMARTBUFF_ELIXIRTBC17 = GetItemInfo(22833); --"Elixir of Major Firepower" + _,SMARTBUFF_ELIXIR1 = GetItemInfo(39666); --"Elixir of Mighty Agility" + _,SMARTBUFF_ELIXIR2 = GetItemInfo(44332); --"Elixir of Mighty Thoughts" + _,SMARTBUFF_ELIXIR3 = GetItemInfo(40078); --"Elixir of Mighty Fortitude" + _,SMARTBUFF_ELIXIR4 = GetItemInfo(40073); --"Elixir of Mighty Strength" + _,SMARTBUFF_ELIXIR5 = GetItemInfo(40072); --"Elixir of Spirit" + _,SMARTBUFF_ELIXIR6 = GetItemInfo(40097); --"Elixir of Protection" + _,SMARTBUFF_ELIXIR7 = GetItemInfo(44328); --"Elixir of Mighty Defense" + _,SMARTBUFF_ELIXIR8 = GetItemInfo(44331); --"Elixir of Lightning Speed" + _,SMARTBUFF_ELIXIR9 = GetItemInfo(44329); --"Elixir of Expertise" + _,SMARTBUFF_ELIXIR10 = GetItemInfo(44327); --"Elixir of Deadly Strikes" + _,SMARTBUFF_ELIXIR11 = GetItemInfo(44330); --"Elixir of Armor Piercing" + _,SMARTBUFF_ELIXIR12 = GetItemInfo(44325); --"Elixir of Accuracy" + _,SMARTBUFF_ELIXIR13 = GetItemInfo(40076); --"Guru's Elixir" + _,SMARTBUFF_ELIXIR14 = GetItemInfo(9187); --"Elixir of Greater Agility" + _,SMARTBUFF_ELIXIR15 = GetItemInfo(28103); --"Adept's Elixir" + _,SMARTBUFF_ELIXIR16 = GetItemInfo(40070); --"Spellpower Elixir" + _,SMARTBUFF_ELIXIRCT1 = GetItemInfo(58148); --"Elixir of the Master" + _,SMARTBUFF_ELIXIRCT2 = GetItemInfo(58144); --"Elixir of Mighty Speed" + _,SMARTBUFF_ELIXIRCT3 = GetItemInfo(58094); --"Elixir of Impossible Accuracy" + _,SMARTBUFF_ELIXIRCT4 = GetItemInfo(58143); --"Prismatic Elixir" + _,SMARTBUFF_ELIXIRCT5 = GetItemInfo(58093); --"Elixir of Deep Earth" + _,SMARTBUFF_ELIXIRCT6 = GetItemInfo(58092); --"Elixir of the Cobra" + _,SMARTBUFF_ELIXIRCT7 = GetItemInfo(58089); --"Elixir of the Naga" + _,SMARTBUFF_ELIXIRCT8 = GetItemInfo(58084); --"Ghost Elixir" + _,SMARTBUFF_ELIXIRMOP1 = GetItemInfo(76081); --"Elixir of Mirrors" + _,SMARTBUFF_ELIXIRMOP2 = GetItemInfo(76079); --"Elixir of Peace" + _,SMARTBUFF_ELIXIRMOP3 = GetItemInfo(76080); --"Elixir of Perfection" + _,SMARTBUFF_ELIXIRMOP4 = GetItemInfo(76078); --"Elixir of the Rapids" + _,SMARTBUFF_ELIXIRMOP5 = GetItemInfo(76077); --"Elixir of Weaponry" + _,SMARTBUFF_ELIXIRMOP6 = GetItemInfo(76076); --"Mad Hozen Elixir" + _,SMARTBUFF_ELIXIRMOP7 = GetItemInfo(76075); --"Mantid Elixir" + _,SMARTBUFF_ELIXIRMOP8 = GetItemInfo(76083); --"Monk's Elixir" -- Draught of Ten Lands - SMARTBUFF_EXP_POTION = GetItemInfo(166750); --"Draught of Ten Lands" + _,SMARTBUFF_EXP_POTION = GetItemInfo(166750); --"Draught of Ten Lands" -- fishing pole _, _, _, _, _, _, S.FishingPole = GetItemInfo(6256); --"Fishing Pole" @@ -443,7 +537,20 @@ function SMARTBUFF_InitSpellIDs() SMARTBUFF_CREATEHS = GetSpellInfo(6201); --"Create Healthstone" SMARTBUFF_SOULSTONE = GetSpellInfo(20707); --"Soulstone" SMARTBUFF_GOSACRIFICE = GetSpellInfo(108503);--"Grimoire of Sacrifice" - SMARTBUFF_INQUISITORGAZE = GetSpellInfo(386344);--"Inquisitor's Gaze" + --SMARTBUFF_BLOODHORROR = GetSpellInfo(111397);--"Blood Horror" + -- Warlock pets + SMARTBUFF_SUMMONIMP = GetSpellInfo(688); --"Summon Imp" + SMARTBUFF_SUMMONFELHUNTER = GetSpellInfo(691); --"Summon Fellhunter" + SMARTBUFF_SUMMONVOIDWALKER= GetSpellInfo(697); --"Summon Voidwalker" + SMARTBUFF_SUMMONSUCCUBUS = GetSpellInfo(712); --"Summon Succubus" + SMARTBUFF_SUMMONINFERNAL = GetSpellInfo(1122); --"Summon Infernal" + SMARTBUFF_SUMMONDOOMGUARD = GetSpellInfo(18540); --"Summon Doomguard" + SMARTBUFF_SUMMONFELGUARD = GetSpellInfo(30146); --"Summon Felguard" + SMARTBUFF_SUMMONFELIMP = GetSpellInfo(112866); --"Summon Fel Imp" + SMARTBUFF_SUMMONVOIDLORD = GetSpellInfo(112867); --"Summon Voidlord" + SMARTBUFF_SUMMONSHIVARRA = GetSpellInfo(112868); --"Summon Shivarra" + SMARTBUFF_SUMMONOBSERVER = GetSpellInfo(112869); --"Summon Observer" + SMARTBUFF_SUMMONWRATHGUARD= GetSpellInfo(112870); --"Summon Wrathguard" -- Hunter SMARTBUFF_TRUESHOTAURA = GetSpellInfo(193526); --"Trueshot Aura" (P) @@ -467,6 +574,12 @@ function SMARTBUFF_InitSpellIDs() --SMARTBUFF_LW6 = GetSpellInfo(160205); --"Lone Wolf: Wisdom of the Serpent" --SMARTBUFF_LW7 = GetSpellInfo(172967); --"Lone Wolf: Versatility of the Ravager" --SMARTBUFF_LW8 = GetSpellInfo(172968); --"Lone Wolf: Quickness of the Dragonhawk" + -- Hunter pets + SMARTBUFF_CALL_PET_1 = GetSpellInfo(883 ); -- "Call Pet 1" + SMARTBUFF_CALL_PET_2 = GetSpellInfo(83242); -- "Call Pet 2" + SMARTBUFF_CALL_PET_3 = GetSpellInfo(83243); -- "Call Pet 3" + SMARTBUFF_CALL_PET_4 = GetSpellInfo(83244); -- "Call Pet 4" + SMARTBUFF_CALL_PET_5 = GetSpellInfo(83245); -- "Call Pet 5" -- Hunter buff links S.LinkAspects = { SMARTBUFF_AOTF, SMARTBUFF_AOTC, SMARTBUFF_AOTP, SMARTBUFF_AOTW }; S.LinkAmmo = { SMARTBUFF_AMMOI, SMARTBUFF_AMMOP, SMARTBUFF_AMMOF }; @@ -636,12 +749,17 @@ function SMARTBUFF_InitSpellIDs() SMARTBUFF_BMiscItem14_3 = GetSpellInfo(175439); --"Stout Augmentation SMARTBUFF_BMiscItem16 = GetSpellInfo(181642); --"Bodyguard Miniaturization Device" SMARTBUFF_BMiscItem17 = GetSpellInfo(242551); --"Fel Focus" - + -- Shadowlands SMARTBUFF_BAugmentRune = GetSpellInfo(367405); --"Eternal Augmentation from Eternal Augment Rune" SMARTBUFF_BVieledAugment = GetSpellInfo(347901); --"Veiled Augmentation from Veiled Augment Rune" - + -- Dragonflight + SMARTBUFF_BDraconicRune = GetSpellInfo(393438); -- Draconic Augmentation from Draconic Augment Rune + SMARTBUFF_BVantusRune_VotI_q1 = GetSpellInfo(384154); -- Vantus Rune: Vault of the Incarnates (Quality 1) + SMARTBUFF_BVantusRune_VotI_q2 = GetSpellInfo(384248); -- Vantus Rune: Vault of the Incarnates (Quality 2) + SMARTBUFF_BVantusRune_VotI_q3 = GetSpellInfo(384306); -- Vantus Rune: Vault of the Incarnates (Quality 3) + S.LinkSafariHat = { SMARTBUFF_BMiscItem9, SMARTBUFF_BMiscItem10 }; - S.LinkAugment = { SMARTBUFF_BMiscItem14, SMARTBUFF_BMiscItem14_1, SMARTBUFF_BMiscItem14_2, SMARTBUFF_BMiscItem14_3, SMARTBUFF_BAugmentRune, SMARTBUFF_BVieledAugment }; + S.LinkAugment = { SMARTBUFF_BMiscItem14, SMARTBUFF_BMiscItem14_1, SMARTBUFF_BMiscItem14_2, SMARTBUFF_BMiscItem14_3, SMARTBUFF_BAugmentRune, SMARTBUFF_BVieledAugment, SMARTBUFF_BDraconicRune }; -- Flasks & Elixirs SMARTBUFF_BFLASKTBC1 = GetSpellInfo(28520); --"Flask of Relentless Assault" @@ -680,16 +798,35 @@ function SMARTBUFF_InitSpellIDs() SMARTBUFF_BFLASKLEG2 = GetSpellInfo(188034); --"Flask of the Countless Armies" SMARTBUFF_BFLASKLEG3 = GetSpellInfo(188031); --"Flask of the Whispered Pact" SMARTBUFF_BFLASKLEG4 = GetSpellInfo(188033); --"Flask of the Seventh Demon" - SMARTBUFF_BFLASKBFA1 = GetSpellInfo(251837); --"Flask of Endless Fathoms" - SMARTBUFF_BFLASKBFA2 = GetSpellInfo(251836); --"Flask of the Currents" - SMARTBUFF_BFLASKBFA3 = GetSpellInfo(251839); --"Flask of the Undertow" - SMARTBUFF_BFLASKBFA4 = GetSpellInfo(251838); --"Flask of the Vast Horizon" + SMARTBUFF_BFLASKBFA1 = GetSpellInfo(251837); --"Flask of Endless Fathoms" + SMARTBUFF_BFLASKBFA2 = GetSpellInfo(251836); --"Flask of the Currents" + SMARTBUFF_BFLASKBFA3 = GetSpellInfo(251839); --"Flask of the Undertow" + SMARTBUFF_BFLASKBFA4 = GetSpellInfo(251838); --"Flask of the Vast Horizon" SMARTBUFF_BGRFLASKBFA1 = GetSpellInfo(298837); --"Greather Flask of Endless Fathoms" SMARTBUFF_BGRFLASKBFA2 = GetSpellInfo(298836); --"Greater Flask of the Currents" SMARTBUFF_BGRFLASKBFA3 = GetSpellInfo(298841); --"Greather Flask of teh Untertow" SMARTBUFF_BGRFLASKBFA4 = GetSpellInfo(298839); --"Greater Flask of the Vast Horizon" - SMARTBUFF_BFLASKSL1 = GetSpellInfo(307185); --"Spectral Flask of Power" - SMARTBUFF_BFLASKSL2 = GetSpellInfo(307187); --"Spectral Flask of Stamina" + SMARTBUFF_BFLASKSL1 = GetSpellInfo(307185); --"Spectral Flask of Power" + SMARTBUFF_BFLASKSL2 = GetSpellInfo(307187); --"Spectral Flask of Stamina" + -- Dragonflight + SMARTBUFF_BFlaskDF1 = GetSpellInfo(371345); -- Phial of the Eye in the Storm + SMARTBUFF_BFlaskDF2 = GetSpellInfo(371204); -- Phial of Still Air + SMARTBUFF_BFlaskDF3 = GetSpellInfo(371036); -- Phial of Icy Preservation + SMARTBUFF_BFlaskDF4 = GetSpellInfo(374000); -- Iced Phial of Corrupting Rage + SMARTBUFF_BFlaskDF5 = GetSpellInfo(371386); -- Phial of Charged Isolation + SMARTBUFF_BFlaskDF6 = GetSpellInfo(373257); -- Phial of Glacial Fury + SMARTBUFF_BFlaskDF7 = GetSpellInfo(370652); -- Phial of Static Empowerment + SMARTBUFF_BFlaskDF8 = GetSpellInfo(371172); -- Phial of Tepid Versatility + SMARTBUFF_BFlaskDF9 = GetSpellInfo(393700); -- Aerated Phial of Deftness + SMARTBUFF_BFlaskDF10 = GetSpellInfo(393717); -- Steaming Phial of Finesse + SMARTBUFF_BFlaskDF11 = GetSpellInfo(371186); -- Charged Phial of Alacrity + SMARTBUFF_BFlaskDF12 = GetSpellInfo(393714); -- Crystalline Phial of Perception + -- the Phial of Elemental Chaos gives 1 the following 4 random buffs every 60 seconds + SMARTBUFF_BFlaskDF13_1 = GetSpellInfo(371348); -- Elemental Chaos: Fire + SMARTBUFF_BFlaskDF13_2 = GetSpellInfo(371350); -- Elemental Chaos: Air + SMARTBUFF_BFlaskDF13_3 = GetSpellInfo(371351); -- Elemental Chaos: Earth + SMARTBUFF_BFlaskDF13_4 = GetSpellInfo(371353); -- Elemental Chaos: Frost + SMARTBUFF_BFlaskDF14 = GetSpellInfo(393665); -- Aerated Phial of Quick Hands S.LinkFlaskTBC = { SMARTBUFF_BFLASKTBC1, SMARTBUFF_BFLASKTBC2, SMARTBUFF_BFLASKTBC3, SMARTBUFF_BFLASKTBC4, SMARTBUFF_BFLASKTBC5 }; S.LinkFlaskCT7 = { SMARTBUFF_BFLASKCT1, SMARTBUFF_BFLASKCT2, SMARTBUFF_BFLASKCT3, SMARTBUFF_BFLASKCT4, SMARTBUFF_BFLASKCT5 }; @@ -698,6 +835,7 @@ function SMARTBUFF_InitSpellIDs() S.LinkFlaskLeg = { SMARTBUFF_BFLASKLEG1, SMARTBUFF_BFLASKLEG2, SMARTBUFF_BFLASKLEG3, SMARTBUFF_BFLASKLEG4 }; S.LinkFlaskBfA = { SMARTBUFF_BFLASKBFA1, SMARTBUFF_BFLASKBFA2, SMARTBUFF_BFLASKBFA3, SMARTBUFF_BFLASKBFA4, SMARTBUFF_BGRFLASKBFA1, SMARTBUFF_BGRFLASKBFA2, SMARTBUFF_BGRFLASKBFA3, SMARTBUFF_BGRFLASKBFA4 }; S.LinkFlaskSL = { SMARTBUFF_BFLASKSL1, SMARTBUFF_BFLASKSL2 }; + S.LinkFlaskDF = { SMARTBUFF_BFlaskDF1, SMARTBUFF_BFlaskDF2, SMARTBUFF_BFlaskDF3, SMARTBUFF_BFlaskDF4, SMARTBUFF_BFlaskDF5, SMARTBUFF_BFlaskDF6, SMARTBUFF_BFlaskDF7, SMARTBUFF_BFlaskDF8, SMARTBUFF_BFlaskDF9, SMARTBUFF_BFlaskDF10, SMARTBUFF_BFlaskDF11, SMARTBUFF_BFlaskDF12, SMARTBUFF_BFlaskDF13_1, SMARTBUFF_BFlaskDF13_2, SMARTBUFF_BFlaskDF13_3, SMARTBUFF_BFlaskDF13_4, SMARTBUFF_BFlaskDF14 }; SMARTBUFF_BELIXIRTBC1 = GetSpellInfo(54494); --"Major Agility" B SMARTBUFF_BELIXIRTBC2 = GetSpellInfo(33726); --"Mastery" B @@ -861,7 +999,6 @@ function SMARTBUFF_InitSpellList() SMARTBUFF_BUFFLIST = { {SMARTBUFF_DEMONARMOR, -1, SMARTBUFF_CONST_SELF}, {SMARTBUFF_AMPLIFYCURSE, 1, SMARTBUFF_CONST_SELF}, - {SMARTBUFF_INQUISITORGAZE, 60, SMARTBUFF_CONST_SELF}, {SMARTBUFF_DARKINTENT, 60, SMARTBUFF_CONST_GROUP, nil, "WARRIOR;HUNTER;ROGUE"}, {SMARTBUFF_SOULLINK, -1, SMARTBUFF_CONST_SELF, nil, S.CheckPetNeeded}, {SMARTBUFF_UNENDINGBREATH, 10, SMARTBUFF_CONST_GROUP, {16}, "HPET;WPET;DKPET"}, @@ -869,7 +1006,19 @@ function SMARTBUFF_InitSpellList() {SMARTBUFF_GOSACRIFICE, 60, SMARTBUFF_CONST_SELF, nil, S.CheckPetNeeded}, {SMARTBUFF_BLOODHORROR, 1, SMARTBUFF_CONST_SELF}, {SMARTBUFF_SOULSTONE, 15, SMARTBUFF_CONST_GROUP, {18}, "WARRIOR;DRUID;SHAMAN;HUNTER;ROGUE;MAGE;PRIEST;PALADIN;WARLOCK;DEATHKNIGHT;EVOKER;MONK;DEMONHUNTER;HPET;WPET;DKPET"}, - {SMARTBUFF_CREATEHS, 0.03, SMARTBUFF_CONST_ITEM, nil, SMARTBUFF_HEALTHSTONE} + {SMARTBUFF_CREATEHS, 0.03, SMARTBUFF_CONST_ITEM, nil, SMARTBUFF_HEALTHSTONE}, + {SMARTBUFF_SUMMONIMP, -1, SMARTBUFF_CONST_SELF, nil, S.CheckPet}, + {SMARTBUFF_SUMMONFELHUNTER, -1, SMARTBUFF_CONST_SELF, nil, S.CheckPet}, + {SMARTBUFF_SUMMONVOIDWALKER, -1, SMARTBUFF_CONST_SELF, nil, S.CheckPet}, + {SMARTBUFF_SUMMONSUCCUBUS, -1, SMARTBUFF_CONST_SELF, nil, S.CheckPet}, + {SMARTBUFF_SUMMONINFERNAL, -1, SMARTBUFF_CONST_SELF, nil, S.CheckPet}, + {SMARTBUFF_SUMMONDOOMGUARD, -1, SMARTBUFF_CONST_SELF, nil, S.CheckPet}, + {SMARTBUFF_SUMMONFELGUARD, -1, SMARTBUFF_CONST_SELF, nil, S.CheckPet}, + {SMARTBUFF_SUMMONFELIMP, -1, SMARTBUFF_CONST_SELF, nil, S.CheckPet}, + {SMARTBUFF_SUMMONVOIDLORD, -1, SMARTBUFF_CONST_SELF, nil, S.CheckPet}, + {SMARTBUFF_SUMMONSHIVARRA, -1, SMARTBUFF_CONST_SELF, nil, S.CheckPet}, + {SMARTBUFF_SUMMONOBSERVER, -1, SMARTBUFF_CONST_SELF, nil, S.CheckPet}, + {SMARTBUFF_SUMMONWRATHGUARD, -1, SMARTBUFF_CONST_SELF, nil, S.CheckPet}, }; end @@ -895,7 +1044,12 @@ function SMARTBUFF_InitSpellList() {SMARTBUFF_AOTF, 0.1, SMARTBUFF_CONST_SELF, nil, nil, S.LinkAspects}, {SMARTBUFF_AOTC, -1, SMARTBUFF_CONST_SELF, nil, nil, S.LinkAspects}, {SMARTBUFF_AOTP, -1, SMARTBUFF_CONST_SELF, nil, nil, S.LinkAspects}, - {SMARTBUFF_AOTW, -1, SMARTBUFF_CONST_SELF, nil, nil, S.LinkAspects} + {SMARTBUFF_AOTW, -1, SMARTBUFF_CONST_SELF, nil, nil, S.LinkAspects}, + {SMARTBUFF_CALL_PET_1, -1, SMARTBUFF_CONST_SELF, nil, S.CheckPet}, + {SMARTBUFF_CALL_PET_2, -1, SMARTBUFF_CONST_SELF, nil, S.CheckPet}, + {SMARTBUFF_CALL_PET_3, -1, SMARTBUFF_CONST_SELF, nil, S.CheckPet}, + {SMARTBUFF_CALL_PET_4, -1, SMARTBUFF_CONST_SELF, nil, S.CheckPet}, + {SMARTBUFF_CALL_PET_5, -1, SMARTBUFF_CONST_SELF, nil, S.CheckPet}, }; end @@ -1045,8 +1199,29 @@ function SMARTBUFF_InitSpellList() {SMARTBUFF_WIZARDOIL3, 60, SMARTBUFF_CONST_INV}, {SMARTBUFF_WIZARDOIL2, 60, SMARTBUFF_CONST_INV}, {SMARTBUFF_WIZARDOIL1, 60, SMARTBUFF_CONST_INV}, + -- Shadowlands {SMARTBUFF_SHADOWCOREOIL, 60, SMARTBUFF_CONST_INV}, - {SMARTBUFF_EMBALMERSOIL, 60, SMARTBUFF_CONST_INV} + {SMARTBUFF_EMBALMERSOIL, 60, SMARTBUFF_CONST_INV}, + -- Dragonflight + {SMARTBUFF_SafeRockets_q1, 60, SMARTBUFF_CONST_INV}, + {SMARTBUFF_SafeRockets_q2, 60, SMARTBUFF_CONST_INV}, + {SMARTBUFF_SafeRockets_q3, 60, SMARTBUFF_CONST_INV}, + {SMARTBUFF_BuzzingRune_q1, 120, SMARTBUFF_CONST_INV}, + {SMARTBUFF_BuzzingRune_q2, 120, SMARTBUFF_CONST_INV}, + {SMARTBUFF_BuzzingRune_q3, 120, SMARTBUFF_CONST_INV}, + {SMARTBUFF_ChirpingRune_q1, 120, SMARTBUFF_CONST_INV}, + {SMARTBUFF_ChirpingRune_q2, 120, SMARTBUFF_CONST_INV}, + {SMARTBUFF_ChirpingRune_q3, 120, SMARTBUFF_CONST_INV}, + {SMARTBUFF_HowlingRune_q1, 120, SMARTBUFF_CONST_INV}, + {SMARTBUFF_HowlingRune_q2, 120, SMARTBUFF_CONST_INV}, + {SMARTBUFF_HowlingRune_q3, 120, SMARTBUFF_CONST_INV}, + {SMARTBUFF_HowlingRune_q3, 120, SMARTBUFF_CONST_INV}, + {SMARTBUFF_PrimalWeighstone_q1, 120, SMARTBUFF_CONST_INV}, + {SMARTBUFF_PrimalWeighstone_q2, 120, SMARTBUFF_CONST_INV}, + {SMARTBUFF_PrimalWeighstone_q3, 120, SMARTBUFF_CONST_INV}, + {SMARTBUFF_PrimalWhetstone_q1, 120, SMARTBUFF_CONST_INV}, + {SMARTBUFF_PrimalWhetstone_q2, 120, SMARTBUFF_CONST_INV}, + {SMARTBUFF_PrimalWhetstone_q3, 120, SMARTBUFF_CONST_INV}, }; -- Tracking @@ -1080,7 +1255,7 @@ function SMARTBUFF_InitSpellList() {SMARTBUFF_BAKEDPORTTATO, 60, SMARTBUFF_CONST_FOOD}, {SMARTBUFF_BANANABEEFPUDDING, 60, SMARTBUFF_CONST_FOOD}, {SMARTBUFF_BARRACUDAMRGLGAGH, 60, SMARTBUFF_CONST_FOOD}, - {SMARTBUFF_BATBITES, 15, SMARTBUFF_CONST_FOOD}, + {SMARTBUFF_BATBITES, 15, SMARTBUFF_CONST_FOOD}, {SMARTBUFF_BEARTARTARE, 60, SMARTBUFF_CONST_FOOD}, {SMARTBUFF_BILTONG, 60, SMARTBUFF_CONST_FOOD}, {SMARTBUFF_BIGMECH, 60, SMARTBUFF_CONST_FOOD}, @@ -1089,11 +1264,11 @@ function SMARTBUFF_InitSpellList() {SMARTBUFF_BROILEDBLOODFIN, 30, SMARTBUFF_CONST_FOOD}, {SMARTBUFF_BUTTERSCOTCHRIBS, 60, SMARTBUFF_CONST_FOOD}, {SMARTBUFF_BUZZARDBITES, 30, SMARTBUFF_CONST_FOOD}, - {SMARTBUFF_CHARREDBEARKABOBS, 15, SMARTBUFF_CONST_FOOD}, + {SMARTBUFF_CHARREDBEARKABOBS, 15, SMARTBUFF_CONST_FOOD}, {SMARTBUFF_CINNAMONBONEFISH, 60, SMARTBUFF_CONST_FOOD}, {SMARTBUFF_CLAMBAR, 30, SMARTBUFF_CONST_FOOD}, {SMARTBUFF_CRUNCHYSERPENT, 30, SMARTBUFF_CONST_FOOD}, - {SMARTBUFF_CRUNCHYSPIDER, 15, SMARTBUFF_CONST_FOOD}, + {SMARTBUFF_CRUNCHYSPIDER, 15, SMARTBUFF_CONST_FOOD}, {SMARTBUFF_DEEPFRIEDMOSSGILL, 60, SMARTBUFF_CONST_FOOD}, {SMARTBUFF_DROGBARSTYLESALMON, 60, SMARTBUFF_CONST_FOOD}, {SMARTBUFF_EXTRALEMONYFILET, 20, SMARTBUFF_CONST_FOOD}, @@ -1108,12 +1283,12 @@ function SMARTBUFF_InitSpellList() {SMARTBUFF_HEARTSBANEHEXWURST, 5, SMARTBUFF_CONST_FOOD}, {SMARTBUFF_HONEYHAUNCHES, 60, SMARTBUFF_CONST_FOOD}, {SMARTBUFF_IRIDESCENTRAVIOLI, 60, SMARTBUFF_CONST_FOOD}, - {SMARTBUFF_JUICYBEARBURGER, 15, SMARTBUFF_CONST_FOOD}, - {SMARTBUFF_KIBLERSBITS, 20, SMARTBUFF_CONST_FOOD}, + {SMARTBUFF_JUICYBEARBURGER, 15, SMARTBUFF_CONST_FOOD}, + {SMARTBUFF_KIBLERSBITS, 20, SMARTBUFF_CONST_FOOD}, {SMARTBUFF_KULTIRAMISU, 60, SMARTBUFF_CONST_FOOD}, {SMARTBUFF_LEGIONCHILI, 60, SMARTBUFF_CONST_FOOD}, {SMARTBUFF_LOALOAF, 60, SMARTBUFF_CONST_FOOD}, - {SMARTBUFF_LYNXSTEAK, 15, SMARTBUFF_CONST_FOOD}, + {SMARTBUFF_LYNXSTEAK, 15, SMARTBUFF_CONST_FOOD}, {SMARTBUFF_MEATYAPPLEDUMPLINGS, 60, SMARTBUFF_CONST_FOOD}, {SMARTBUFF_MOKNATHALSHORTRIBS, 30, SMARTBUFF_CONST_FOOD}, {SMARTBUFF_MONDAZI, 60, SMARTBUFF_CONST_FOOD}, @@ -1123,7 +1298,7 @@ function SMARTBUFF_InitSpellList() {SMARTBUFF_RAVAGERDOG, 30, SMARTBUFF_CONST_FOOD}, {SMARTBUFF_RAVENBERRYTARTS, 60, SMARTBUFF_CONST_FOOD}, {SMARTBUFF_ROASTEDCLEFTHOOF, 30, SMARTBUFF_CONST_FOOD}, - {SMARTBUFF_ROASTEDMOONGRAZE, 15, SMARTBUFF_CONST_FOOD}, + {SMARTBUFF_ROASTEDMOONGRAZE, 15, SMARTBUFF_CONST_FOOD}, {SMARTBUFF_SAGEFISHDELIGHT, 15, SMARTBUFF_CONST_FOOD}, {SMARTBUFF_SAILORSPIE, 60, SMARTBUFF_CONST_FOOD}, {SMARTBUFF_SALTPEPPERSHANK, 60, SMARTBUFF_CONST_FOOD}, @@ -1135,13 +1310,26 @@ function SMARTBUFF_InitSpellList() {SMARTBUFF_SPICYHOTTALBUK, 30, SMARTBUFF_CONST_FOOD}, {SMARTBUFF_SPINEFISHSOUFFLE, 60, SMARTBUFF_CONST_FOOD}, {SMARTBUFF_STEAKALAMODE, 60, SMARTBUFF_CONST_FOOD}, - {SMARTBUFF_STORMCHOPS, 30, SMARTBUFF_CONST_FOOD}, + {SMARTBUFF_STORMCHOPS, 30, SMARTBUFF_CONST_FOOD}, {SMARTBUFF_SWAMPFISHNCHIPS, 60, SMARTBUFF_CONST_FOOD}, {SMARTBUFF_SWEETSILVERGILL, 60, SMARTBUFF_CONST_FOOD}, {SMARTBUFF_TALBUKSTEAK, 30, SMARTBUFF_CONST_FOOD}, {SMARTBUFF_TENEBROUSCROWNROAST, 60, SMARTBUFF_CONST_FOOD}, - {SMARTBUFF_WARPBURGER, 30, SMARTBUFF_CONST_FOOD} - + {SMARTBUFF_WARPBURGER, 30, SMARTBUFF_CONST_FOOD}, + -- Dragonflight + {SMARTBUFF_TimelyDemise, 60, SMARTBUFF_CONST_FOOD}, + {SMARTBUFF_FiletOfFangs, 60, SMARTBUFF_CONST_FOOD}, + {SMARTBUFF_SeamothSurprise, 60, SMARTBUFF_CONST_FOOD}, + {SMARTBUFF_SaltBakedFishcake, 60, SMARTBUFF_CONST_FOOD}, + {SMARTBUFF_FeistyFishSticks, 60, SMARTBUFF_CONST_FOOD}, + {SMARTBUFF_SeafoodPlatter, 60, SMARTBUFF_CONST_FOOD}, + {SMARTBUFF_SeafoodMedley, 60, SMARTBUFF_CONST_FOOD}, + {SMARTBUFF_RevengeServedCold, 60, SMARTBUFF_CONST_FOOD}, + {SMARTBUFF_Tongueslicer, 60, SMARTBUFF_CONST_FOOD}, + {SMARTBUFF_GreatCeruleanSea, 60, SMARTBUFF_CONST_FOOD}, + {SMARTBUFF_FatedFortuneCookie, 60, SMARTBUFF_CONST_FOOD}, + {SMARTBUFF_KaluakBanquet, 60, SMARTBUFF_CONST_FOOD}, + {SMARTBUFF_HoardOfDelicacies, 60, SMARTBUFF_CONST_FOOD}, }; for n, name in pairs(S.FoodItems) do @@ -1157,7 +1345,7 @@ function SMARTBUFF_InitSpellList() print("List: "..v[1]); end end - ]]-- + ]] -- Scrolls @@ -1181,6 +1369,7 @@ function SMARTBUFF_InitSpellList() {SMARTBUFF_MiscItem8, 5, SMARTBUFF_CONST_SCROLL, nil, SMARTBUFF_BMiscItem8}, {SMARTBUFF_AugmentRune, 60, SMARTBUFF_CONST_SCROLL, nil, SMARTBUFF_BAugmentRune, S.LinkAugment}, {SMARTBUFF_VieledAugment, 60, SMARTBUFF_CONST_SCROLL, nil, SMARTBUFF_BVieledAugment, S.LinkAugment}, + {SMARTBUFF_SOAGILITY9, 30, SMARTBUFF_CONST_SCROLL, nil, SMARTBUFF_SBAGILITY}, {SMARTBUFF_SOAGILITY8, 30, SMARTBUFF_CONST_SCROLL, nil, SMARTBUFF_SBAGILITY}, {SMARTBUFF_SOAGILITY7, 30, SMARTBUFF_CONST_SCROLL, nil, SMARTBUFF_SBAGILITY}, @@ -1226,7 +1415,13 @@ function SMARTBUFF_InitSpellList() {SMARTBUFF_SOSTRENGHT3, 30, SMARTBUFF_CONST_SCROLL, nil, SMARTBUFF_SBSTRENGHT}, {SMARTBUFF_SOSTRENGHT2, 30, SMARTBUFF_CONST_SCROLL, nil, SMARTBUFF_SBSTRENGHT}, {SMARTBUFF_SOSTRENGHT1, 30, SMARTBUFF_CONST_SCROLL, nil, SMARTBUFF_SBSTRENGHT}, - {SMARTBUFF_SOPROTECTION9, 30, SMARTBUFF_CONST_SCROLL, nil, SMARTBUFF_SBPROTECTION} + {SMARTBUFF_SOPROTECTION9, 30, SMARTBUFF_CONST_SCROLL, nil, SMARTBUFF_SBPROTECTION}, + + -- Dragonflight + {SMARTBUFF_DraconicRune, 60, SMARTBUFF_CONST_SCROLL, nil, SMARTBUFF_BDraconicRune, S.LinkAugment}, + {SMARTBUFF_VantusRune_VotI_q1, 60, SMARTBUFF_CONST_SCROLL, nil, SMARTBUFF_BVantusRune_VotI_q1}, + {SMARTBUFF_VantusRune_VotI_q2, 60, SMARTBUFF_CONST_SCROLL, nil, SMARTBUFF_BVantusRune_VotI_q2}, + {SMARTBUFF_VantusRune_VotI_q3, 60, SMARTBUFF_CONST_SCROLL, nil, SMARTBUFF_BVantusRune_VotI_q3}, }; -- ItemId, SpellId, Duration [min] @@ -1319,8 +1514,13 @@ function SMARTBUFF_InitSpellList() AddItem( 97919, 141917, 3); --Whole-Body Shrinka' AddItem(167698, 293671, 60); --Secret Fish Goggles AddItem(169109, 299445, 60); --Beeholder's Goggles - - + AddItem(191341, 371172, 30); -- Tepid Q3 + -- Dragonflight + AddItem(199902, 388275, 30); -- Wayfarer's Compass + AddItem(202019, 396172, 30); -- Golden Dragon Goblet + AddItem(198857, 385941, 30); -- Lucky Duck + + -- Potions SMARTBUFF_POTION = { {SMARTBUFF_ELIXIRTBC1, 60, SMARTBUFF_CONST_POTION, nil, SMARTBUFF_BELIXIRTBC1}, @@ -1415,9 +1615,69 @@ function SMARTBUFF_InitSpellList() {SMARTBUFF_GRFLASKBFA3, 60, SMARTBUFF_CONST_POTION, nil, SMARTBUFF_BGRFLASKBFA3}, {SMARTBUFF_GRFLASKBFA4, 60, SMARTBUFF_CONST_POTION, nil, SMARTBUFF_BGRFLASKBFA4}, {SMARTBUFF_FLASKSL1, 60, SMARTBUFF_CONST_POTION, nil, SMARTBUFF_BFLASKSL1, S.LinkFlaskSL}, - {SMARTBUFF_FLASKSL2, 60, SMARTBUFF_CONST_POTION, nil, SMARTBUFF_BFLASKSL2} + {SMARTBUFF_FLASKSL2, 60, SMARTBUFF_CONST_POTION, nil, SMARTBUFF_BFLASKSL2}, + -- Dragonflight + -- consuming an identical phial will add another 30 min + -- alchemist's flasks last twice as long + {SMARTBUFF_FlaskDF1_q1, 30, SMARTBUFF_CONST_POTION, nil, SMARTBUFF_BFlaskDF1, S.LinkFlaskDF}, + {SMARTBUFF_FlaskDF1_q2, 30, SMARTBUFF_CONST_POTION, nil, SMARTBUFF_BFlaskDF1, S.LinkFlaskDF}, + {SMARTBUFF_FlaskDF1_q3, 30, SMARTBUFF_CONST_POTION, nil, SMARTBUFF_BFlaskDF1, S.LinkFlaskDF}, + + {SMARTBUFF_FlaskDF2_q1, 30, SMARTBUFF_CONST_POTION, nil, SMARTBUFF_BFlaskDF2, S.LinkFlaskDF}, + {SMARTBUFF_FlaskDF2_q2, 30, SMARTBUFF_CONST_POTION, nil, SMARTBUFF_BFlaskDF2, S.LinkFlaskDF}, + {SMARTBUFF_FlaskDF2_q3, 30, SMARTBUFF_CONST_POTION, nil, SMARTBUFF_BFlaskDF2, S.LinkFlaskDF}, + + {SMARTBUFF_FlaskDF3_q1, 30, SMARTBUFF_CONST_POTION, nil, SMARTBUFF_BFlaskDF3, S.LinkFlaskDF}, + {SMARTBUFF_FlaskDF3_q2, 30, SMARTBUFF_CONST_POTION, nil, SMARTBUFF_BFlaskDF3, S.LinkFlaskDF}, + {SMARTBUFF_FlaskDF3_q3, 30, SMARTBUFF_CONST_POTION, nil, SMARTBUFF_BFlaskDF3, S.LinkFlaskDF}, + + {SMARTBUFF_FlaskDF4_q1, 30, SMARTBUFF_CONST_POTION, nil, SMARTBUFF_BFlaskDF4, S.LinkFlaskDF}, + {SMARTBUFF_FlaskDF4_q2, 30, SMARTBUFF_CONST_POTION, nil, SMARTBUFF_BFlaskDF4, S.LinkFlaskDF}, + {SMARTBUFF_FlaskDF4_q3, 30, SMARTBUFF_CONST_POTION, nil, SMARTBUFF_BFlaskDF4, S.LinkFlaskDF}, + + + {SMARTBUFF_FlaskDF5_q1, 30, SMARTBUFF_CONST_POTION, nil, SMARTBUFF_BFlaskDF5, S.LinkFlaskDF}, + {SMARTBUFF_FlaskDF5_q2, 30, SMARTBUFF_CONST_POTION, nil, SMARTBUFF_BFlaskDF5, S.LinkFlaskDF}, + {SMARTBUFF_FlaskDF5_q3, 30, SMARTBUFF_CONST_POTION, nil, SMARTBUFF_BFlaskDF5, S.LinkFlaskDF}, + + {SMARTBUFF_FlaskDF6_q1, 30, SMARTBUFF_CONST_POTION, nil, SMARTBUFF_BFlaskDF6, S.LinkFlaskDF}, + {SMARTBUFF_FlaskDF6_q2, 30, SMARTBUFF_CONST_POTION, nil, SMARTBUFF_BFlaskDF6, S.LinkFlaskDF}, + {SMARTBUFF_FlaskDF6_q3, 30, SMARTBUFF_CONST_POTION, nil, SMARTBUFF_BFlaskDF6, S.LinkFlaskDF}, + + {SMARTBUFF_FlaskDF7_q1, 30, SMARTBUFF_CONST_POTION, nil, SMARTBUFF_BFlaskDF7, S.LinkFlaskDF}, + {SMARTBUFF_FlaskDF7_q2, 30, SMARTBUFF_CONST_POTION, nil, SMARTBUFF_BFlaskDF7, S.LinkFlaskDF}, + {SMARTBUFF_FlaskDF7_q3, 30, SMARTBUFF_CONST_POTION, nil, SMARTBUFF_BFlaskDF7, S.LinkFlaskDF}, + + {SMARTBUFF_FlaskDF8_q1, 30, SMARTBUFF_CONST_POTION, nil, SMARTBUFF_BFlaskDF8, S.LinkFlaskDF}, + {SMARTBUFF_FlaskDF8_q2, 30, SMARTBUFF_CONST_POTION, nil, SMARTBUFF_BFlaskDF8, S.LinkFlaskDF}, + {SMARTBUFF_FlaskDF8_q3, 30, SMARTBUFF_CONST_POTION, nil, SMARTBUFF_BFlaskDF8, S.LinkFlaskDF}, + + {SMARTBUFF_FlaskDF9_q1, 30, SMARTBUFF_CONST_POTION, nil, SMARTBUFF_BFlaskDF9, S.LinkFlaskDF}, + {SMARTBUFF_FlaskDF9_q2, 30, SMARTBUFF_CONST_POTION, nil, SMARTBUFF_BFlaskDF9, S.LinkFlaskDF}, + {SMARTBUFF_FlaskDF9_q3, 30, SMARTBUFF_CONST_POTION, nil, SMARTBUFF_BFlaskDF9, S.LinkFlaskDF}, + + {SMARTBUFF_FlaskDF10_q1, 30, SMARTBUFF_CONST_POTION, nil, SMARTBUFF_BFlaskDF10, S.LinkFlaskDF}, + {SMARTBUFF_FlaskDF10_q2, 30, SMARTBUFF_CONST_POTION, nil, SMARTBUFF_BFlaskDF10, S.LinkFlaskDF}, + {SMARTBUFF_FlaskDF10_q3, 30, SMARTBUFF_CONST_POTION, nil, SMARTBUFF_BFlaskDF10, S.LinkFlaskDF}, + + {SMARTBUFF_FlaskDF11_q1, 30, SMARTBUFF_CONST_POTION, nil, SMARTBUFF_BFlaskDF11, S.LinkFlaskDF}, + {SMARTBUFF_FlaskDF11_q2, 30, SMARTBUFF_CONST_POTION, nil, SMARTBUFF_BFlaskDF11, S.LinkFlaskDF}, + {SMARTBUFF_FlaskDF11_q3, 30, SMARTBUFF_CONST_POTION, nil, SMARTBUFF_BFlaskDF11, S.LinkFlaskDF}, + + {SMARTBUFF_FlaskDF12_q1, 30, SMARTBUFF_CONST_POTION, nil, SMARTBUFF_BFlaskDF12, S.LinkFlaskDF}, + {SMARTBUFF_FlaskDF12_q2, 30, SMARTBUFF_CONST_POTION, nil, SMARTBUFF_BFlaskDF12, S.LinkFlaskDF}, + {SMARTBUFF_FlaskDF12_q3, 30, SMARTBUFF_CONST_POTION, nil, SMARTBUFF_BFlaskDF12, S.LinkFlaskDF}, + + -- the Elemental Chaos flask has 4 random effects changing every 60 seconds + {SMARTBUFF_FlaskDF13_q1, 60, SMARTBUFF_CONST_POTION, nil, SMARTBUFF_BFlaskDF13_1, S.LinkFlaskDF}, + {SMARTBUFF_FlaskDF13_q2, 60, SMARTBUFF_CONST_POTION, nil, SMARTBUFF_BFlaskDF13_1, S.LinkFlaskDF}, + {SMARTBUFF_FlaskDF13_q3, 60, SMARTBUFF_CONST_POTION, nil, SMARTBUFF_BFlaskDF13_1, S.LinkFlaskDF}, + + {SMARTBUFF_FlaskDF14_q1, 30, SMARTBUFF_CONST_POTION, nil, SMARTBUFF_BFlaskDF14, S.LinkFlaskDF}, + {SMARTBUFF_FlaskDF14_q2, 30, SMARTBUFF_CONST_POTION, nil, SMARTBUFF_BFlaskDF14, S.LinkFlaskDF}, + {SMARTBUFF_FlaskDF14_q3, 30, SMARTBUFF_CONST_POTION, nil, SMARTBUFF_BFlaskDF14, S.LinkFlaskDF}, + } - SMARTBUFF_AddMsgD("Spell list initialized"); -- LoadToys(); diff --git a/SmartBuff.lua b/SmartBuff.lua index 284d330..8838f9d 100644 --- a/SmartBuff.lua +++ b/SmartBuff.lua @@ -6,9 +6,9 @@ -- Cast the most important buffs on you, tanks or party/raid members/pets. ------------------------------------------------------------------------------- -SMARTBUFF_DATE = "191222"; +SMARTBUFF_DATE = "080123"; -SMARTBUFF_VERSION = "r15."..SMARTBUFF_DATE; +SMARTBUFF_VERSION = "r16alpha."..SMARTBUFF_DATE; SMARTBUFF_VERSIONNR = 100002; SMARTBUFF_TITLE = "SmartBuff"; SMARTBUFF_SUBTITLE = "Supports you in casting buffs"; @@ -22,7 +22,7 @@ local SmartbuffPrefix = "Smartbuff"; local SmartbuffSession = true; local SmartbuffVerCheck = false; -- for my use when checking guild users/testers versions :) local buildInfo = select(4, GetBuildInfo()) -local SmartbuffRevision = 15; +local SmartbuffRevision = 14; local SmartbuffVerNotifyList = {} local SG = SMARTBUFF_GLOBALS; @@ -39,7 +39,7 @@ local GlobalCd = 1.5; local maxSkipCoolDown = 3; local maxRaid = 40; local maxBuffs = 40; -local maxScrollButtons = 23; +local maxScrollButtons = 30; local numBuffs = 0; local isLoaded = false; @@ -120,7 +120,7 @@ local IconPaths = { ["Roles"] = "Interface\\LFGFrame\\UI-LFG-ICON-PORTRAITROLES", ["Classes"] = "Interface\\WorldStateFrame\\Icons-Classes", }; - + local Icons = { ["WARRIOR"] = { IconPaths.Classes, 0.00, 0.25, 0.00, 0.25 }, ["MAGE"] = { IconPaths.Classes, 0.25, 0.50, 0.00, 0.25 }, @@ -159,7 +159,7 @@ StaticPopupDialogs["SMARTBUFF_DATA_PURGE"] = { } --- Rounds a number to the given number of decimal places. +-- Rounds a number to the given number of decimal places. local r_mult; local function Round(num, idp) r_mult = 10^(idp or 0); @@ -211,13 +211,13 @@ end -- Finds a value in the table and returns the index local function tfind(t, s) - if (t and type(t) == "table" and s) then - for k, v in pairs(t) do - if (v and v == s) then + if (t and type(t) == "table" and s) then + for k, v in pairs(t) do + if (v and v == s) then return k; - end - end - end + end + end + end return false; end @@ -230,11 +230,11 @@ end local function IsVisibleToPlayer(self) if (not self) then return false; end - + local w, h = UIParent:GetWidth(), UIParent:GetHeight(); local x, y = self:GetLeft(), UIParent:GetHeight() - self:GetTop(); - - --print(format("w = %.0f, h = %.0f, x = %.0f, y = %.0f", w, h, x, y)); + + --print(format("w = %.0f, h = %.0f, x = %.0f, y = %.0f", w, h, x, y)); if (x >= 0 and x < (w - self:GetWidth()) and y >= 0 and y < (h - self:GetHeight())) then return true; end @@ -272,7 +272,7 @@ local function InitBuffSettings(cBI, reset) cBuff = B[CS()][CT()][buff]; reset = true; end - + if (reset) then wipe(cBuff); cBuff.EnableS = false; @@ -286,7 +286,7 @@ local function InitBuffSettings(cBI, reset) cBuff.RH = false; cBuff.Reminder = true; cBuff.RBTime = 0; - cBuff.ManaLimit = 0; + cBuff.ManaLimit = 0; if (cBI.Type == SMARTBUFF_CONST_GROUP or cBI.Type == SMARTBUFF_CONST_ITEMGROUP) then for n in pairs(cClasses) do if (cBI.Type == SMARTBUFF_CONST_GROUP and n <= 13 and not string.find(cBI.Params, cClasses[n])) then @@ -296,14 +296,14 @@ local function InitBuffSettings(cBI, reset) end end end - end - + end + -- Upgrades if (cBuff.RBTime == nil) then cBuff.Reminder = true; cBuff.RBTime = 0; end -- to 1.10g if (cBuff.ManaLimit == nil) then cBuff.ManaLimit = 0; end -- to 1.12b if (cBuff.SelfNot == nil) then cBuff.SelfNot = false; end -- to 2.0i if (cBuff.AddList == nil) then cBuff.AddList = { }; end -- to 2.1a - if (cBuff.IgnoreList == nil) then cBuff.IgnoreList = { }; end -- to 2.1a + if (cBuff.IgnoreList == nil) then cBuff.IgnoreList = { }; end -- to 2.1a if (cBuff.RH == nil) then cBuff.RH = false; end -- to 4.0b end @@ -312,7 +312,7 @@ local function InitBuffOrder(reset) if (B[CS()].Order == nil) then B[CS()].Order = { }; end - + local b; local i; local ord = B[CS()].Order; @@ -320,15 +320,15 @@ local function InitBuffOrder(reset) wipe(ord); SMARTBUFF_AddMsgD("Reset buff order"); end - + -- Remove not longer existing buffs in the order list for k, v in pairs(ord) do if (v and cBuffIndex[v] == nil) then SMARTBUFF_AddMsgD("Remove from buff order: "..v); tremove(ord, k); end - end - + end + i = 1; while (cBuffs[i] and cBuffs[i].BuffS) do b = false; @@ -348,7 +348,7 @@ local function InitBuffOrder(reset) end local function IsMinLevel(minLevel) - if (not minLevel) then + if (not minLevel) then return true; end if (minLevel > UnitLevel("player")) then @@ -370,6 +370,7 @@ local function SendSmartbuffVersion(player, unit) -- not announced, add the player and announce. tinsert(SmartbuffVerNotifyList, {player, unit, GetTime()}) C_ChatInfo.SendAddonMessage(SmartbuffPrefix, SmartbuffRevision, "WHISPER", player) + SMARTBUFF_AddMsgD(string.format("%s was sent version information.",player)) end -- TODO: Redesign if reactivated! @@ -377,7 +378,7 @@ local function IsTalentSkilled(t, i, name) local _, tName, _, _, tAvailable = GetTalentInfo(t, i); if (tName) then isTTreeLoaded = true; - SMARTBUFF_AddMsgD("Talent: "..tName..", Points = "..tAvailable); + SMARTBUFF_AddMsgD("Talent: "..tName..", Points = "..tAvailable); if (name and name == tName and tAvailable > 0) then SMARTBUFF_AddMsgD("Debuff talent found: "..name..", Points = "..tAvailable); return true, tAvailable; @@ -401,20 +402,20 @@ function SMARTBUFF_OnLoad(self) self:RegisterEvent("PLAYER_REGEN_DISABLED"); self:RegisterEvent("PLAYER_STARTED_MOVING"); -- added self:RegisterEvent("PLAYER_STOPPED_MOVING"); -- added - self:RegisterEvent("PLAYER_TALENT_UPDATE"); + self:RegisterEvent("PLAYER_TALENT_UPDATE"); self:RegisterEvent("SPELLS_CHANGED"); - self:RegisterEvent("ACTIONBAR_HIDEGRID"); + self:RegisterEvent("ACTIONBAR_HIDEGRID"); self:RegisterEvent("UNIT_AURA"); self:RegisterEvent("CHAT_MSG_ADDON"); self:RegisterEvent("CHAT_MSG_CHANNEL"); self:RegisterEvent("UPDATE_MOUSEOVER_UNIT"); self:RegisterEvent("UNIT_SPELLCAST_FAILED"); self:RegisterEvent("UNIT_SPELLCAST_SUCCEEDED"); - + --One of them allows SmartBuff to be closed with the Escape key tinsert(UISpecialFrames, "SmartBuffOptionsFrame"); UIPanelWindows["SmartBuffOptionsFrame"] = nil; - + SlashCmdList["SMARTBUFF"] = SMARTBUFF_command; SLASH_SMARTBUFF1 = "/sbo"; SLASH_SMARTBUFF2 = "/sbuff"; @@ -422,10 +423,10 @@ function SMARTBUFF_OnLoad(self) SlashCmdList["SMARTBUFFMENU"] = SMARTBUFF_OptionsFrame_Toggle; SLASH_SMARTBUFFMENU1 = "/sbm"; - + SlashCmdList["SmartReloadUI"] = function(msg) ReloadUI(); end; SLASH_SmartReloadUI1 = "/rui"; - + SMARTBUFF_InitSpellIDs(); --DEFAULT_CHAT_FRAME:AddMessage("SB OnLoad"); @@ -438,13 +439,16 @@ function SMARTBUFF_OnEvent(self, event, ...) local arg1, arg2, arg3, arg4, arg5 = ...; if ((event == "UNIT_NAME_UPDATE" and arg1 == "player") or event == "PLAYER_ENTERING_WORLD") then - if IsPlayerInGuild() and event == "PLAYER_ENTERING_WORLD" then + if IsPlayerInGuild() and event == "PLAYER_ENTERING_WORLD" then C_ChatInfo.SendAddonMessage(SmartbuffPrefix, SmartbuffRevision, "GUILD") end isPlayer = true; if (event == "PLAYER_ENTERING_WORLD" and isInit and O.Toggle) then isSetZone = true; tStartZone = GetTime(); + +-- elseif (event == "PLAYER_ENTERING_WORLD" and isLoaded and isPlayer and not isInit and not InCombatLockdown()) then +-- SMARTBUFF_Options_Init(self); end elseif(event == "ADDON_LOADED" and arg1 == SMARTBUFF_TITLE) then @@ -452,10 +456,10 @@ function SMARTBUFF_OnEvent(self, event, ...) end -- PLAYER_LOGIN - if event == "PLAYER_LOGIN" then - local prefixResult = C_ChatInfo.RegisterAddonMessagePrefix(SmartbuffPrefix) + if event == "PLAYER_LOGIN" then + local prefixResult = C_ChatInfo.RegisterAddonMessagePrefix(SmartbuffPrefix) end - + -- CHAT_MSG_ADDON if event == "CHAT_MSG_ADDON" then if arg1 == SmartbuffPrefix then @@ -465,29 +469,29 @@ function SMARTBUFF_OnEvent(self, event, ...) if arg2 > SmartbuffRevision and SmartbuffSession then DEFAULT_CHAT_FRAME:AddMessage(SMARTBUFF_MSG_NEWVER1..SMARTBUFF_VERSION..SMARTBUFF_MSG_NEWVER2..arg2..SMARTBUFF_MSG_NEWVER3) SmartbuffSession = false - end - if arg5 and arg5 ~= UnitName("player") and SmartbuffVerCheck then - DEFAULT_CHAT_FRAME:AddMessage("|cff00e0ffSmartbuff : |cffFFFF00"..arg5.." ("..arg3..")|cffffffff has revision |cffFFFF00r"..arg2.."|cffffffff installed.") + end + if arg5 and arg5 ~= UnitName("player") and SmartbuffVerCheck then + DEFAULT_CHAT_FRAME:AddMessage("|cff00e0ffSmartbuff : |cffFFFF00"..arg5.." ("..arg3..")|cffffffff has revision |cffFFFF00r"..arg2.."|cffffffff installed.") end end end end - + if (event == "SMARTBUFF_UPDATE" and isLoaded and isPlayer and not isInit and not InCombatLockdown()) then SMARTBUFF_Options_Init(self); -- print(buildInfo) end - + if (not isInit or O == nil) then return; end; - + if (event == "GROUP_ROSTER_UPDATE") then isSetUnits = true; - + elseif (event == "PLAYER_REGEN_DISABLED") then SMARTBUFF_Ticker(true); - + if (O.Toggle) then if (O.InCombat) then for spell, data in pairs(cBuffsCombat) do @@ -512,10 +516,10 @@ function SMARTBUFF_OnEvent(self, event, ...) SMARTBUFF_SyncBuffTimers(); SMARTBUFF_Check(1, true); end - + elseif (event == "PLAYER_REGEN_ENABLED") then SMARTBUFF_Ticker(true); - + if (O.Toggle) then if (O.InCombat) then SmartBuff_KeyButton:SetAttribute("type", nil); @@ -545,7 +549,7 @@ function SMARTBUFF_OnEvent(self, event, ...) SMARTBUFF_AddMsg(format(SMARTBUFF_MSG_SPECCHANGED, tostring(currentSpec)), true); isSetBuffs = true; end - + elseif (event == "SPELLS_CHANGED" or event == "ACTIONBAR_HIDEGRID") then isSetBuffs = true; end @@ -553,13 +557,13 @@ function SMARTBUFF_OnEvent(self, event, ...) if (not O.Toggle) then return; end; - + if (event == "UNIT_AURA") then - + if (UnitAffectingCombat("player") and (arg1 == "player" or string.find(arg1, "^party") or string.find(arg1, "^raid"))) then isSyncReq = true; end - + -- checks if aspect of cheetah or pack is active and cancel it if someone gets dazed if (sPlayerClass == "HUNTER" and O.AntiDaze and (arg1 == "player" or string.find(arg1, "^party") or string.find(arg1, "^raid") or string.find(arg1, "pet"))) then local _, _, stuntex = GetSpellInfo(1604); --get Dazed icon @@ -578,12 +582,12 @@ function SMARTBUFF_OnEvent(self, event, ...) end if (O.ToggleAutoChat) then SMARTBUFF_AddMsgWarn("!!! CANCEL "..buff.." !!!", true); - end + end end - end - end + end + end end - + if (event == "UI_ERROR_MESSAGE") then SMARTBUFF_AddMsgD(string.format("Error message: %s",arg1)); end @@ -599,28 +603,28 @@ function SMARTBUFF_OnEvent(self, event, ...) end end currentUnit = nil; - + elseif (event == "UNIT_SPELLCAST_SUCCEEDED") then if (arg1 and arg1 == "player") then local unit = nil; local spell = nil; local target = nil; - + if (arg1 and arg2) then if (not arg3) then arg3 = ""; end if (not arg4) then arg4 = ""; end - SMARTBUFF_AddMsgD("Spellcast succeeded: " .. arg1 .. ", " .. arg2 .. ", " .. arg3 .. ", " .. arg4) + SMARTBUFF_AddMsgD("Spellcast succeeded: target " .. arg1 .. ", spellID " .. arg3 .. " (" ..GetSpellInfo(arg3) .. "), " .. arg4) if (string.find(arg1, "party") or string.find(arg1, "raid")) then spell = arg2; - end + end --SMARTBUFF_SetButtonTexture(SmartBuff_KeyButton, imgSB); end - + if (currentUnit and currentSpell and currentUnit ~= "target") then unit = currentUnit; spell = currentSpell; end - + if (unit) then local name = UnitName(unit); if (cBuffTimer[unit] == nil) then @@ -633,14 +637,14 @@ function SMARTBUFF_OnEvent(self, event, ...) currentSpell = nil; end end - + if (isClearSplash) then isClearSplash = false; SMARTBUFF_Splash_Clear(); end - + end - + end end @@ -648,15 +652,15 @@ end function SMARTBUFF_OnUpdate(self, elapsed) - if not self.Elapsed then + if not self.Elapsed then self.Elapsed = 0.2 end self.Elapsed = self.Elapsed - elapsed - if self.Elapsed > 0 then - return + if self.Elapsed > 0 then + return end self.Elapsed = 0.2 - + if (not isInit) then if (isLoaded and GetTime() > tAutoBuff + 0.5) then tAutoBuff = GetTime(); @@ -664,7 +668,7 @@ function SMARTBUFF_OnUpdate(self, elapsed) if (specID) then SMARTBUFF_OnEvent(self, "SMARTBUFF_UPDATE"); end - end + end else if (isSetZone and GetTime() > (tStartZone + 4)) then SMARTBUFF_CheckLocation(); @@ -677,7 +681,7 @@ end function SMARTBUFF_Ticker(force) if (force or GetTime() > tTicker + 1) then tTicker = GetTime(); - + if (isSetUnits) then isSetUnits = false; SMARTBUFF_SetUnits(); @@ -687,13 +691,13 @@ function SMARTBUFF_Ticker(force) if (isSyncReq or tTicker > tSync + 10) then SMARTBUFF_SyncBuffTimers(); end - + if (isAuraChanged) then isAuraChanged = false; SMARTBUFF_Check(1, true); end - - end + + end end @@ -735,38 +739,67 @@ function SMARTBUFF_SetUnits() if (InCombatLockdown()) then isSetUnits = true; return; - end - if (SmartBuffOptionsFrame:IsVisible()) then return; end - + end + if (SmartBuffOptionsFrame:IsVisible()) then return; end + local i = 0; local n = 0; local j = 0; local s = nil; local psg = 0; local b = false; - local f = nil local iBFA = SMARTBUFF_IsActiveBattlefield(); if (iBFA > 0) then SMARTBUFF_CheckLocation(); end - + -- player -- pet -- party1-4 -- partypet1-4 -- raid1-40 -- raidpet1-40 - - iGroupSetup = -1; - if (IsInRaid()) then - iGroupSetup = 3; - elseif (GetNumSubgroupMembers() ~= 0) then - iGroupSetup = 2; - else - iGroupSetup = 1; + + Enum.SmartBuffGroup = { + Solo = 1, + Party = 2, + LFR = 3, + Raid = 4, + MythicKeystone = 5, + Battleground = 6, + Arena = 7, + VoTI = 8, + Custom1 = 9, + Custom2 = 10, + Custom3 = 11, + Custom4 = 12, + Custom5 = 13 + } + + local name, instanceType, difficultyID, difficultyName, maxPlayers, dynamicDifficulty, isDynamic, instanceID, instanceGroupSize, LfgDungeonID = GetInstanceInfo() + + iGroupSetup = Enum.SmartBuffGroup.Solo; + + if IsInRaid() then + iGroupSetup = Enum.SmartBuffGroup.Raid; + elseif IsInGroup() then + iGroupSetup = Enum.SmartBuffGroup.Party; + end + + -- check instance type (allows solo raid clearing, etc) + if instanceType == "raid" then + iGroupSetup = Enum.SmartBuffGroup.Raid; + if LfgDungeonID then + iGroupSetup = Enum.SmartBuffGroup.LFR; + end + elseif instanceType == "party" then + iGroupSetup = Enum.SmartBuffGroup.Party; + if ( difficultyID == 8 ) then + iGroupSetup = Enum.SmartBuffGroup.MythicKeystone; + end end - + if (iGroupSetup ~= iLastGroupSetup) then iLastGroupSetup = iGroupSetup; wipe(cBlacklist); @@ -776,31 +809,30 @@ function SMARTBUFF_SetUnits() end local tmp = SMARTBUFF_TEMPLATES[iGroupSetup]; if (O.AutoSwitchTemplate and currentTemplate ~= tmp and iBFA == 0) then - SMARTBUFF_AddMsg(SMARTBUFF_OFT_AUTOSWITCHTMP .. ": " .. currentTemplate .. " -> " .. tmp); + SMARTBUFF_AddMsg(SMARTBUFF_OFT_AUTOSWITCHTMP .. ": " .. currentTemplate .. " -> " .. tmp); currentTemplate = tmp; SMARTBUFF_SetBuffs(); end --SMARTBUFF_AddMsgD("Group type changed"); - end - + end + wipe(cUnits); wipe(cGroups); cClassGroups = nil; wipe(cAddUnitList); wipe(cIgnoreUnitList); - -- Raid Setup - if (iGroupSetup == 3) then + -- Raid Setup + if (iGroupSetup == Enum.SmartBuffGroup.Raid) then cClassGroups = { }; local name, server, rank, subgroup, level, class, classeng, zone, online, isDead; local sRUnit = nil; - + j = 1; for n = 1, maxRaid, 1 do name, rank, subgroup, level, class, classeng, zone, online, isDead = GetRaidRosterInfo(n); if (name) then server = nil; - f = name; i = string.find(name, "-", 1, true); if (i and i > 0) then server = string.sub(name, i + 1); @@ -808,17 +840,17 @@ function SMARTBUFF_SetUnits() SMARTBUFF_AddMsgD(name .. ", " .. server); end sRUnit = "raid"..n; - + --SMARTBUFF_AddMsgD(name .. ", " .. sRUnit .. ", " .. UnitName(sRUnit)); - + SMARTBUFF_AddUnitToClass("raid", n); SmartBuff_AddToUnitList(1, sRUnit, subgroup); SmartBuff_AddToUnitList(2, sRUnit, subgroup); - + if (name == sPlayerName and not server) then psg = subgroup; - end - + end + if (O.ToggleGrp[subgroup]) then s = ""; if (name == UnitName(sRUnit)) then @@ -831,44 +863,46 @@ function SMARTBUFF_SetUnits() end end -- attempt to announce the addon version (if they have it) --- if online and O.SendVerInfo then SendSmartbuffVersion(f, sRUnit) end + -- seems to be an issue with cross-realm, need to look at this later + -- but in the meantime I am disabling it... CM +-- if online then SendSmartbuffVersion(name, sRUnit) end end end --end for - + if (not b or B[CS()][currentTemplate].SelfFirst) then SMARTBUFF_AddSoloSetup(); --SMARTBUFF_AddMsgD("Player not in selected groups or buff self first"); end - + SMARTBUFF_AddMsgD("Raid Unit-Setup finished"); - + -- Party Setup - elseif (iGroupSetup == 2) then + elseif (iGroupSetup == Enum.SmartBuffGroup.Party) then cClassGroups = { }; if (B[CS()][currentTemplate].SelfFirst) then SMARTBUFF_AddSoloSetup(); --SMARTBUFF_AddMsgD("Buff self first"); end - + cGroups[1] = { }; cGroups[1][0] = "player"; SMARTBUFF_AddUnitToClass("player", 0); for j = 1, 4, 1 do cGroups[1][j] = "party"..j; - SMARTBUFF_AddUnitToClass("party", j); + SMARTBUFF_AddUnitToClass("party", j); SmartBuff_AddToUnitList(1, "party"..j, 1); SmartBuff_AddToUnitList(2, "party"..j, 1); name, _, _, _, _, _, _, online, _, _ = GetRaidRosterInfo(j); if name and online then SendSmartbuffVersion(name, "party") end end SMARTBUFF_AddMsgD("Party Unit-Setup finished"); - + -- Solo Setup - else + else SMARTBUFF_AddSoloSetup(); SMARTBUFF_AddMsgD("Solo Unit-Setup finished"); end - + --collectgarbage(); end @@ -886,7 +920,7 @@ function SMARTBUFF_AddUnitToClass(unit, i) end cUnits[1][i] = u; SMARTBUFF_AddMsgD("Unit added: " .. UnitName(u) .. ", " .. u); - + local _, uc = UnitClass(u); if (uc and not cClassGroups[uc]) then cClassGroups[uc] = { }; @@ -903,11 +937,11 @@ function SMARTBUFF_AddSoloSetup() cUnits[0] = { }; cUnits[0][0] = "player"; if (sPlayerClass == "HUNTER" or sPlayerClass == "WARLOCK" or sPlayerClass == "DEATHKNIGHT" or sPlayerClass == "MAGE") then cGroups[0][1] = "pet"; end - + if (B[CS()][currentTemplate] and B[CS()][currentTemplate].SelfFirst) then if (not cClassGroups) then cClassGroups = { }; - end + end cClassGroups[0] = { }; cClassGroups[0][0] = "player"; end @@ -917,25 +951,25 @@ end -- Get Spell ID from spellbook function SMARTBUFF_GetSpellID(spellname) - if (spellname) then + if (spellname) then spellname = string.lower(spellname); else return nil; end - + local i = 0; local nSpells = 0; local id = nil; local spellN, spellId, skillType; - + -- Get number of spells --for i = 1, GetNumSpellTabs() do -- Common and specialization for i = 1, GetNumSpellTabs() do local _, _, _, n = GetSpellTabInfo(i); nSpells = nSpells + n; - end - + end + i = 0; while (i < nSpells) do i = i + 1; @@ -947,7 +981,7 @@ function SMARTBUFF_GetSpellID(spellname) for j = 1, GetNumFlyouts() do local fid = GetFlyoutID(j); local name, description, numSlots, isKnown = GetFlyoutInfo(fid) - if (isKnown) then + if (isKnown) then for s = 1, numSlots do local flySpellID, overrideSpellID, isKnown, spellN, slotSpecID = GetFlyoutSlotInfo(fid, s); if (isKnown and string.lower(spellN) == spellname) then @@ -958,20 +992,20 @@ function SMARTBUFF_GetSpellID(spellname) end end end - + if (spellN ~= nil and string.lower(spellN) == spellname) then id = spellId; break; end end - + if (id) then if (IsPassiveSpell(id) or skillType == "FUTURESPELL" or not IsSpellKnown(id)) then id = nil; i = nil; - end + end end - + return id, i; end -- END SMARTBUFF_GetSpellID @@ -979,46 +1013,46 @@ end -- Set the buff array function SMARTBUFF_SetBuffs() if (B == nil) then return; end - + local n = 1; - local buff = nil; + local buff = nil; local ct = currentTemplate; - + if (B[CS()] == nil) then B[CS()] = { }; end - + SMARTBUFF_InitItemList(); SMARTBUFF_InitSpellList(); - + if (B[CS()][ct] == nil) then B[CS()][ct] = { }; B[CS()][ct].SelfFirst = false; end - + wipe(cBuffs); wipe(cBuffIndex); numBuffs = 0; - + for _, buff in pairs(SMARTBUFF_BUFFLIST) do n = SMARTBUFF_SetBuff(buff, n, true); - end + end for _, buff in pairs(SMARTBUFF_WEAPON) do n = SMARTBUFF_SetBuff(buff, n); - end + end for _, buff in pairs(SMARTBUFF_RACIAL) do n = SMARTBUFF_SetBuff(buff, n); end - + for _, buff in pairs(SMARTBUFF_TRACKING) do n = SMARTBUFF_SetBuff(buff, n); end - + for _, buff in pairs(SMARTBUFF_POTION) do n = SMARTBUFF_SetBuff(buff, n); - end + end for _, buff in pairs(SMARTBUFF_SCROLL) do n = SMARTBUFF_SetBuff(buff, n); @@ -1027,52 +1061,51 @@ function SMARTBUFF_SetBuffs() for _, buff in pairs(SMARTBUFF_FOOD) do n = SMARTBUFF_SetBuff(buff, n); end - + wipe(cBuffsCombat); SMARTBUFF_SetInCombatBuffs(); - + InitBuffOrder(); - + numBuffs = n - 1; isSetBuffs = false; end function SMARTBUFF_SetBuff(buff, i, ia) - if (buff == nil or buff[1] == nil) then return i; end - + if (buff == nil or buff[1] == nil) then return i; end cBuffs[i] = nil; - cBuffs[i] = { }; + cBuffs[i] = { }; cBuffs[i].BuffS = buff[1]; cBuffs[i].DurationS = ceil(buff[2] * 60); cBuffs[i].Type = buff[3]; cBuffs[i].CanCharge = false; + if (SMARTBUFF_IsSpell(cBuffs[i].Type)) then - --print(cBuffs[i].BuffS); cBuffs[i].IDS, cBuffs[i].BookID = SMARTBUFF_GetSpellID(cBuffs[i].BuffS); end if (cBuffs[i].IDS == nil and not(SMARTBUFF_IsItem(cBuffs[i].Type) or cBuffs[i].Type == SMARTBUFF_CONST_TRACK)) then cBuffs[i] = nil; return i; end - + --print(cBuffs[i].IDS); if (buff[4] ~= nil) then cBuffs[i].LevelsS = buff[4] else cBuffs[i].LevelsS = nil end if (buff[5] ~= nil) then cBuffs[i].Params = buff[5] else cBuffs[i].Params = SG.NIL end cBuffs[i].Links = buff[6]; cBuffs[i].Chain = buff[7]; - + -- Warlock Nether Ward fix --if (cBuffs[i].BuffS == SMARTBUFF_SHADOWWARD and IsTalentSkilled(3, 13, SMARTBUFF_NETHERWARD)) then -- cBuffs[i].BuffS = SMARTBUFF_NETHERWARD; --end - + if (cBuffs[i].IDS ~= nil) then cBuffs[i].IconS = GetSpellTexture(cBuffs[i].BuffS); else if (cBuffs[i].Type == SMARTBUFF_CONST_TRACK) then local b = false; - for n = 1, C_Minimap.GetNumTrackingTypes() do + for n = 1, C_Minimap.GetNumTrackingTypes() do local trackN, trackT, trackA, trackC = C_Minimap.GetTrackingInfo(n); if (trackN ~= nil) then --SMARTBUFF_AddMsgD(n..". "..trackN.." ("..trackC..")"); @@ -1082,28 +1115,28 @@ function SMARTBUFF_SetBuff(buff, i, ia) cBuffs[i].IDS = nil; cBuffs[i].IconS = trackT; end - end + end end if (not b) then cBuffs[i] = nil; - return i; + return i; end elseif (ia or cBuffs[i].Type == SMARTBUFF_CONST_ITEMGROUP) then -- itemName, itemLink, itemRarity, itemLevel, itemMinLevel, itemType, itemSubType, itemStackCount, itemEquipLoc, itemTexture, itemSellPrice local _, _, _, _, minLevel, _, _, _, _, texture = GetItemInfo(cBuffs[i].BuffS); if (not IsMinLevel(minLevel)) then cBuffs[i] = nil; - return i; + return i; end cBuffs[i].IconS = texture; else local _, _, _, _, minLevel = GetItemInfo(cBuffs[i].BuffS); if (not IsMinLevel(minLevel)) then cBuffs[i] = nil; - return i; + return i; end - local _, _, count, texture = SMARTBUFF_FindItem(cBuffs[i].BuffS, cBuffs[i].Chain); + if count then if (count <= 0) then cBuffs[i] = nil; @@ -1112,16 +1145,16 @@ function SMARTBUFF_SetBuff(buff, i, ia) else cBuffs[i] = nil; return i; - end + end cBuffs[i].IconS = texture; end end - + SMARTBUFF_AddMsgD("Add "..buff[1]); - + cBuffs[i].BuffG = nil; --buff[6]; -- Disabled for Cataclysm cBuffs[i].IDG = nil; --SMARTBUFF_GetSpellID(cBuffs[i].BuffG); - if (cBuffs[i].IDG ~= nil) then + if (cBuffs[i].IDG ~= nil) then cBuffs[i].IconG = GetSpellTexture(cBuffs[i].BuffG); else cBuffs[i].IconG = nil; @@ -1129,26 +1162,24 @@ function SMARTBUFF_SetBuff(buff, i, ia) --if (buff[7] ~= nil) then cBuffs[i].DurationG = ceil(buff[7] * 60); else cBuffs[i].DurationG = nil; end --if (buff[8] ~= nil) then cBuffs[i].LevelsG = buff[8]; else cBuffs[i].LevelsG = nil; end --if (buff[9] ~= nil) then cBuffs[i].ReagentG = buff[9]; else cBuffs[i].ReagentG = nil; end - + --[[ if (O.Debug) then local s = name; if (cBuffs[i].IDS) then s = s .. " ID = " .. cBuffs[i].IDS .. ", Icon = " .. cBuffs[i].IconS; else s = s .. " ID = nil"; end - if (cBuffs[i].BuffG ~= nil) then + if (cBuffs[i].BuffG ~= nil) then s = s .. " - " .. cBuffs[i].BuffG; if (cBuffs[i].IDG) then s = s .. " ID = " .. cBuffs[i].IDG .. ", Icon = " .. cBuffs[i].IconG; else s = s .. " ID = nil"; end end SMARTBUFF_AddMsgD(s); end ]]-- - cBuffIndex[cBuffs[i].BuffS] = i; if (cBuffs[i].IDG ~= nil) then cBuffIndex[cBuffs[i].BuffG] = i; end - InitBuffSettings(cBuffs[i]); - + return i + 1; end @@ -1195,7 +1226,7 @@ function SMARTBUFF_PreCheck(mode, force) end return false; end - + if (mode == 1 and not force) then if ((GetTime() - tLastCheck) < O.AutoTimer) then return false; @@ -1203,7 +1234,7 @@ function SMARTBUFF_PreCheck(mode, force) end --SMARTBUFF_AddMsgD(string.format("%.2f, %.2f", GetTime(), GetTime() - tLastCheck)); tLastCheck = GetTime(); - + -- If buffs can't casted, hide UI elements if (C_PetBattles.IsInBattle() or UnitInVehicle("player") or UnitHasVehicleUI("player")) then if (not InCombatLockdown() and SmartBuff_KeyButton:IsVisible()) then @@ -1213,10 +1244,10 @@ function SMARTBUFF_PreCheck(mode, force) else SMARTBUFF_ShowSAButton(); end - + SMARTBUFF_SetButtonTexture(SmartBuff_KeyButton, imgSB); - if (SmartBuffOptionsFrame:IsVisible()) then return false; end - + if (SmartBuffOptionsFrame:IsVisible()) then return false; end + -- check for mount-spells if (sPlayerClass == "PALADIN" and (IsMounted() or IsFlying()) and not SMARTBUFF_CheckBuff("player", SMARTBUFF_CRUSADERAURA)) then return true; @@ -1230,15 +1261,15 @@ function SMARTBUFF_PreCheck(mode, force) or (UnitInVehicle("player") or UnitHasVehicleUI("player")) --or (mode == 1 and (O.ToggleAutoRest and IsResting()) and not UnitIsPVP("player")) or (not O.BuffInCities and IsResting() and not UnitIsPVP("player"))) then - + if (UnitIsDeadOrGhost("player")) then SMARTBUFF_CheckBuffTimers(); - end - + end + return false; end --SMARTBUFF_AddMsgD("2: " .. GetTime() - tLastCheck); - + if (UnitAffectingCombat("player")) then isCombat = true; --SMARTBUFF_AddMsgD("In combat"); @@ -1246,15 +1277,15 @@ function SMARTBUFF_PreCheck(mode, force) isCombat = false; --SMARTBUFF_AddMsgD("Out of combat"); end - + if (not isCombat and isSetBuffs) then SMARTBUFF_SetBuffs(); isSyncReq = true; - end - + end + sMsgWarning = ""; isFirstError = true; - + return true; end @@ -1263,12 +1294,12 @@ end function SMARTBUFF_CheckBuffTimers() local n = 0; local ct = currentTemplate; - + --SMARTBUFF_AddMsgD("SMARTBUFF_CheckBuffTimers"); - + local cGrp = cUnits; for subgroup in pairs(cGrp) do - n = 0; + n = 0; if (cGrp[subgroup] ~= nil) then for _, unit in pairs(cGrp[subgroup]) do if (unit) then @@ -1293,7 +1324,7 @@ function SMARTBUFF_CheckUnitBuffTimers(unit) local fd = nil; if (uc == "HUNTER") then fd = SMARTBUFF_IsFeignDeath(unit); - end + end if (not fd) then if (cBuffTimer[unit]) then cBuffTimer[unit] = nil; @@ -1313,7 +1344,7 @@ end -- Reset the buff timers and set them to running out soon function SMARTBUFF_ResetBuffTimers() if (not isInit) then return; end - + local ct = currentTemplate; local t = GetTime(); local rbTime = 0; @@ -1325,12 +1356,12 @@ function SMARTBUFF_ResetBuffTimers() local unit = nil; local obj = nil; local uc = nil; - + local cGrp = cGroups; for subgroup in pairs(cGrp) do - n = 0; + n = 0; if (cGrp[subgroup] ~= nil) then - + for _, unit in pairs(cGrp[subgroup]) do if (unit and UnitExists(unit) and UnitIsConnected(unit) and UnitIsFriend("player", unit) and UnitIsPlayer(unit) and not UnitIsDeadOrGhost(unit)) then _, uc = UnitClass(unit); @@ -1340,25 +1371,25 @@ function SMARTBUFF_ResetBuffTimers() buff = nil; rbTime = 0; buffS = cBuffs[i].BuffS; - + rbTime = B[CS()][ct][buffS].RBTime; if (rbTime <= 0) then rbTime = O.RebuffTimer; end - + if (cBuffs[i].BuffG and B[CS()][ct][buffS].EnableG and cBuffs[i].IDG ~= nil and cBuffs[i].DurationG > 0) then d = cBuffs[i].DurationG; buff = cBuffs[i].BuffG; obj = subgroup; end - + if (d > 0 and buff) then if (not cBuffTimer[obj]) then cBuffTimer[obj] = { }; end cBuffTimer[obj][buff] = t - d + rbTime - 1; - end - + end + buff = nil; if (buffS and B[CS()][ct][buffS].EnableS and cBuffs[i].IDS ~= nil and cBuffs[i].DurationS > 0 and uc and B[CS()][ct][buffS][uc]) then @@ -1366,14 +1397,14 @@ function SMARTBUFF_ResetBuffTimers() buff = buffS; obj = unit; end - + if (d > 0 and buff) then if (not cBuffTimer[obj]) then cBuffTimer[obj] = { }; end cBuffTimer[obj][buff] = t - d + rbTime - 1; end - + i = i + 1; end @@ -1387,7 +1418,7 @@ end function SMARTBUFF_ShowBuffTimers() if (not isInit) then return; end - + local ct = currentTemplate; local t = GetTime(); local rbTime = 0; @@ -1395,11 +1426,11 @@ function SMARTBUFF_ShowBuffTimers() local d = 0; local tl = 0; local buffS = nil; - + for unit in pairs(cBuffTimer) do for buff in pairs(cBuffTimer[unit]) do - if (unit and buff and cBuffTimer[unit][buff]) then - + if (unit and buff and cBuffTimer[unit][buff]) then + d = -1; buffS = nil; if (cBuffIndex[buff]) then @@ -1413,7 +1444,7 @@ function SMARTBUFF_ShowBuffTimers() end i = i + 1; end - + if (buffS and B[CS()][ct][buffS] ~= nil) then if (d > 0) then rbTime = B[CS()][ct][buffS].RBTime; @@ -1421,7 +1452,7 @@ function SMARTBUFF_ShowBuffTimers() rbTime = O.RebuffTimer; end tl = cBuffTimer[unit][buff] + d - t; - if (tl >= 0) then + if (tl >= 0) then local s = ""; if (string.find(unit, "^party") or string.find(unit, "^raid") or string.find(unit, "^player") or string.find(unit, "^pet")) then local un = UnitName(unit); @@ -1446,11 +1477,11 @@ function SMARTBUFF_ShowBuffTimers() cBuffTimer[unit][buff] = nil; end end - + end end end - + end -- END SMARTBUFF_ResetBuffTimers @@ -1460,17 +1491,17 @@ function SMARTBUFF_SyncBuffTimers() if (not isInit or isSync or isSetBuffs or SMARTBUFF_IsTalentFrameVisible()) then return; end isSync = true; tSync = GetTime(); - - local ct = currentTemplate; + + local ct = currentTemplate; local rbTime = 0; local i = 0; local buffS = nil; local unit = nil; local uc = nil; - + local cGrp = cGroups; for subgroup in pairs(cGrp) do - n = 0; + n = 0; if (cGrp[subgroup] ~= nil) then for _, unit in pairs(cGrp[subgroup]) do if (unit and UnitExists(unit) and UnitIsConnected(unit) and UnitIsFriend("player", unit) and UnitIsPlayer(unit) and not UnitIsDeadOrGhost(unit)) then @@ -1479,26 +1510,26 @@ function SMARTBUFF_SyncBuffTimers() while (cBuffs[i] and cBuffs[i].BuffS) do rbTime = 0; buffS = cBuffs[i].BuffS; - + -- TOCHECK rbTime = B[CS()][ct][buffS].RBTime; if (rbTime <= 0) then rbTime = O.RebuffTimer; end - + if (buffS and B[CS()][ct][buffS].EnableS and cBuffs[i].IDS ~= nil and cBuffs[i].DurationS > 0) then if (cBuffs[i].Type ~= SMARTBUFF_CONST_SELF or (cBuffs[i].Type == SMARTBUFF_CONST_SELF and SMARTBUFF_IsPlayer(unit))) then SMARTBUFF_SyncBuffTimer(unit, unit, cBuffs[i]); end end - + i = i + 1; end -- END while end end -- END for end end -- END for - + isSync = false; isSyncReq = false; end @@ -1541,7 +1572,7 @@ function SMARTBUFF_IsShapeshifted() if (active and castable and name ~= SMARTBUFF_DRUID_TREANT) then return true, name; end - end + end end return false, nil; end @@ -1552,7 +1583,7 @@ local IsChecking = false; function SMARTBUFF_Check(mode, force) if (IsChecking or not SMARTBUFF_PreCheck(mode, force)) then return; end IsChecking = true; - + local ct = currentTemplate; local unit = nil; local units = nil; @@ -1574,23 +1605,23 @@ function SMARTBUFF_Check(mode, force) local rank; local reagent; local nGlobal = 0; - - SMARTBUFF_checkBlacklist(); - + + SMARTBUFF_checkBlacklist(); + -- 1. check in combat buffs if (InCombatLockdown()) then -- and O.InCombat for spell in pairs(cBuffsCombat) do if (spell) then local ret, actionType, spellName, slot, unit, buffType = SMARTBUFF_BuffUnit("player", 0, mode, spell) - --SMARTBUFF_AddMsgD("Check combat spell: " .. spell .. ", ret = " .. ret); + SMARTBUFF_AddMsgD("Check combat spell: " .. spell .. ", ret = " .. ret); if (ret and ret == 0) then IsChecking = false; return; end end - end + end end - + -- 2. buff target, if enabled if ((mode == 0 or mode == 5) and O.BuffTarget) then local actionType, spellName, slot, buffType; @@ -1601,9 +1632,9 @@ function SMARTBUFF_Check(mode, force) end IsChecking = false; return i, actionType, spellName, slot, "target", buffType; - end - end - + end + end + -- 3. check groups local cGrp = cGroups; local cOrd = cOrderGrp; @@ -1611,19 +1642,19 @@ function SMARTBUFF_Check(mode, force) for _, subgroup in pairs(cOrd) do --SMARTBUFF_AddMsgD("Checking subgroup " .. subgroup .. ", " .. GetTime()); if (cGrp[subgroup] ~= nil or (type(subgroup) == "number" and subgroup == 1)) then - + if (cGrp[subgroup] ~= nil) then units = cGrp[subgroup]; else units = nil; end - + if (cUnits and type(subgroup) == "number" and subgroup == 1) then unitsGrp = cUnits[1]; - else + else unitsGrp = units; end - + -- check buffs if (units) then for _, unit in pairs(units) do @@ -1644,11 +1675,11 @@ function SMARTBUFF_Check(mode, force) end end end - + end end -- for groups - - if (mode == 0) then + + if (mode == 0) then if (sMsgWarning == "" or sMsgWarning == " ") then SMARTBUFF_AddMsg(SMARTBUFF_MSG_NOTHINGTODO); else @@ -1689,18 +1720,18 @@ function SMARTBUFF_BuffUnit(unit, subgroup, mode, spell) local cBuff = nil; local iId = nil; local iSlot = -1; - + if (UnitIsPVP("player")) then isPvP = true end - - SMARTBUFF_CheckUnitBuffTimers(unit); - + + SMARTBUFF_CheckUnitBuffTimers(unit); + --SMARTBUFF_AddMsgD("Checking " .. unit); - + if (UnitExists(unit) and UnitIsFriend("player", unit) and not UnitIsDeadOrGhost(unit) and not UnitIsCorpse(unit) and UnitIsConnected(unit) and UnitIsVisible(unit) and not UnitOnTaxi(unit) and not cBlacklist[unit] and ((not UnitIsPVP(unit) and (not isPvP or O.BuffPvP)) or (UnitIsPVP(unit) and (isPvP or O.BuffPvP)))) then --and not SmartBuff_UnitIsIgnored(unit) - + --print("Prep Check"); _, uc = UnitClass(unit); @@ -1710,12 +1741,13 @@ function SMARTBUFF_BuffUnit(unit, subgroup, mode, spell) ucf = UnitCreatureFamily(unit); if (uct == nil) then uct = ""; end if (ucf == nil) then ucf = ""; end - --- if (un) then print("Grp "..subgroup.." checking "..un.." ("..unit.."/"..uc.."/"..ur.."/"..uct.."/"..ucf..")", 0, 1, 0.5); end + + --if (un) then print("Grp "..subgroup.." checking "..un.." ("..unit.."/"..uc.."/"..ur.."/"..uct.."/"..ucf..")", 0, 1, 0.5); end isShapeshifted, sShapename = SMARTBUFF_IsShapeshifted(); --while (cBuffs[i] and cBuffs[i].BuffS) do - for i, buffnS in pairs(B[CS()].Order) do + for i, buffnS in pairs(B[CS()].Order) do + --print(buffnS) if (isSetBuffs or SmartBuffOptionsFrame:IsVisible()) then break; end cBuff = cBuffs[cBuffIndex[buffnS]]; --buffnS = cBuff.BuffS; @@ -1727,23 +1759,22 @@ function SMARTBUFF_BuffUnit(unit, subgroup, mode, spell) bUsable = false; iId = nil; iSlot = -1; - + if (cBuff and bs) then bUsable = bs.EnableS end - + if (bUsable and spell and spell ~= buffnS) then bUsable = false; - --SMARTBUFF_AddMsgD("Exclusive check on " .. spell .. ", current spell = " .. buffnS); + SMARTBUFF_AddMsgD("Exclusive check on " .. spell .. ", current spell = " .. buffnS); end - if (bUsable and cBuff.Type == SMARTBUFF_CONST_SELF and not SMARTBUFF_IsPlayer(unit)) then bUsable = false end if (bUsable and not cBuff.Type == SMARTBUFF_CONST_TRACK and not SMARTBUFF_IsItem(cBuff.Type) and not IsUsableSpell(buffnS)) then bUsable = false end if (bUsable and bs.SelfNot and SMARTBUFF_IsPlayer(unit)) then bUsable = false end if (bUsable and cBuff.Params == SG.CheckFishingPole and SMARTBUFF_IsFishingPoleEquiped()) then bUsable = false end - + -- Check for buffs which depends on a pet if (bUsable and cBuff.Params == SG.CheckPet and UnitExists("pet")) then bUsable = false end if (bUsable and cBuff.Params == SG.CheckPetNeeded and not UnitExists("pet")) then bUsable = false end - + -- Check for mount auras if (bUsable and (sPlayerClass == "PALADIN" or sPlayerClass == "DEATHKNIGHT")) then isMounted = false; @@ -1756,29 +1787,29 @@ function SMARTBUFF_BuffUnit(unit, subgroup, mode, spell) isMounted = IsMounted(); if (buffnS ~= SMARTBUFF_PATHOFFROST and isMounted) then bUsable = false; - end + end end - end - + end + if (bUsable and not (cBuff.Type == SMARTBUFF_CONST_TRACK or SMARTBUFF_IsItem(cBuff.Type))) then -- check if you have enough mana/rage/energy to cast local isUsable, notEnoughMana = IsUsableSpell(buffnS); if (notEnoughMana) then bUsable = false; - --SMARTBUFF_AddMsgD("Buff " .. cBuff.BuffS .. ", not enough mana!"); + SMARTBUFF_AddMsgD("Buff " .. cBuff.BuffS .. ", not enough mana!"); elseif (mode ~= 1 and isUsable == nil and buffnS ~= SMARTBUFF_PWS) then bUsable = false; - --SMARTBUFF_AddMsgD("Buff " .. cBuff.BuffS .. " is not usable!"); + SMARTBUFF_AddMsgD("Buff " .. cBuff.BuffS .. " is not usable!"); end - end - + end + if (bUsable and bs.EnableS and (cBuff.IDS ~= nil or SMARTBUFF_IsItem(cBuff.Type) or cBuff.Type == SMARTBUFF_CONST_TRACK) and ((mode ~= 1 and ((isCombat and bs.CIn) or (not isCombat and bs.COut))) - or (mode == 1 and bs.Reminder and ((not isCombat and bs.COut) - or (isCombat and (bs.CIn or O.ToggleAutoCombat)))))) then - + or (mode == 1 and bs.Reminder and ((not isCombat and bs.COut) + or (isCombat and (bs.CIn or O.ToggleAutoCombat)))))) then + --print("Check: "..buffnS) - + if (not bs.SelfOnly or (bs.SelfOnly and SMARTBUFF_IsPlayer(unit))) then -- get current spell cooldown cd = 0; @@ -1789,21 +1820,22 @@ function SMARTBUFF_BuffUnit(unit, subgroup, mode, spell) if (cd < 0) then cd = 0; end - --SMARTBUFF_AddMsgD(buffnS.." cd = "..cd); + SMARTBUFF_AddMsgD(buffnS.." cd = "..cd); end - + -- check if spell has cooldown if (cd <= 0 or (mode == 1 and cd <= 1.5)) then if (cBuff.IDS and sMsgWarning == SMARTBUFF_MSG_CD) then sMsgWarning = " "; end - + rbTime = bs.RBTime; if (rbTime <= 0) then rbTime = O.RebuffTimer; end - - --SMARTBUFF_AddMsgD(uc.." "..CT()); + + SMARTBUFF_AddMsgD(uc.." "..CT()); + if (not SMARTBUFF_IsInList(unit, un, bs.IgnoreList) and (((cBuff.Type == SMARTBUFF_CONST_GROUP or cBuff.Type == SMARTBUFF_CONST_ITEMGROUP) and (bs[ur] or (bs.SelfOnly and SMARTBUFF_IsPlayer(unit)) @@ -1815,16 +1847,15 @@ function SMARTBUFF_BuffUnit(unit, subgroup, mode, spell) or SMARTBUFF_IsInList(unit, un, bs.AddList))) then buff = nil; - -- Tracking ability ------------------------------------------------------------------------ if (cBuff.Type == SMARTBUFF_CONST_TRACK) then --print("Check tracking: "..buffnS) local count = C_Minimap.GetNumTrackingTypes(); - for n = 1, C_Minimap.GetNumTrackingTypes() do + for n = 1, C_Minimap.GetNumTrackingTypes() do local trackN, trackT, trackA, trackC = C_Minimap.GetTrackingInfo(n); if (trackN ~= nil and not trackA) then - --SMARTBUFF_AddMsgD(n..". "..trackN.." ("..trackC..")"); + SMARTBUFF_AddMsgD(n..". "..trackN.." ("..trackC..")"); if (trackN == buffnS) then if (sPlayerClass == "DRUID" and buffnS == SMARTBUFF_DRUID_TRACK) then if (isShapeshifted and sShapename == SMARTBUFF_DRUID_CAT) then @@ -1841,57 +1872,57 @@ function SMARTBUFF_BuffUnit(unit, subgroup, mode, spell) buff = nil; end end - end + end end - + -- Food, Scroll, Potion or conjured items ------------------------------------------------------------------------ - elseif (cBuff.Type == SMARTBUFF_CONST_FOOD or cBuff.Type == SMARTBUFF_CONST_SCROLL or cBuff.Type == SMARTBUFF_CONST_POTION or - cBuff.Type == SMARTBUFF_CONST_ITEM or cBuff.Type == SMARTBUFF_CONST_ITEMGROUP) then - - if (cBuff.Type == SMARTBUFF_CONST_ITEM) then - bt = nil; - buff = nil; - if (cBuff.Params ~= SG.NIL) then - local cr = SMARTBUFF_CountReagent(cBuff.Params, cBuff.Chain); - --SMARTBUFF_AddMsgD(cr.." "..cBuff.Params.." found"); - if (cr == 0) then - buff = cBuff.Params; - end - end - + elseif (cBuff.Type == SMARTBUFF_CONST_FOOD or cBuff.Type == SMARTBUFF_CONST_SCROLL or cBuff.Type == SMARTBUFF_CONST_POTION or cBuff.Type == SMARTBUFF_CONST_ITEM or + cBuff.Type == SMARTBUFF_CONST_ITEMGROUP) then + + if (cBuff.Type == SMARTBUFF_CONST_ITEM) then + bt = nil; + buff = nil; + if (cBuff.Params ~= SG.NIL) then + local cr = SMARTBUFF_CountReagent(cBuff.Params, cBuff.Chain); + SMARTBUFF_AddMsgD(cr.." "..cBuff.Params.." found"); + if (cr == 0) then + buff = cBuff.Params; + end + end + -- dont attempt to use food while moving or we will waste them. elseif (cBuff.Type == SMARTBUFF_CONST_FOOD and isPlayerMoving == false) then if (not SMARTBUFF_IsPicnic(unit)) then buff, index, buffname, bt, charges = SMARTBUFF_CheckUnitBuffs(unit, SMARTBUFF_FOOD_AURA, cBuff.Type, cBuff.Links, cBuff.Chain); end else - if (cBuff.Params ~= SG.NIL) then - if (cBuff.Links and cBuff.Links == SG.CheckFishingPole) then - if (SMARTBUFF_IsFishingPoleEquiped()) then - buff, index, buffname, bt, charges = SMARTBUFF_CheckUnitBuffs(unit, cBuff.Params, cBuff.Type); - else - buff = nil; - end - else - buff, index, buffname, bt, charges = SMARTBUFF_CheckUnitBuffs(unit, cBuff.Params, cBuff.Type, cBuff.Links, cBuff.Chain); - end - --SMARTBUFF_AddMsgD("Buff time ("..cBuff.Params..") = "..tostring(bt)); - else - buff = nil; - end - end - + if (cBuff.Params ~= SG.NIL) then + if (cBuff.Links and cBuff.Links == SG.CheckFishingPole) then + if (SMARTBUFF_IsFishingPoleEquiped()) then + buff, index, buffname, bt, charges = SMARTBUFF_CheckUnitBuffs(unit, cBuff.Params, cBuff.Type); + else + buff = nil; + end + else + buff, index, buffname, bt, charges = SMARTBUFF_CheckUnitBuffs(unit, cBuff.Params, cBuff.Type, cBuff.Links, cBuff.Chain); + end + SMARTBUFF_AddMsgD("Buff time ("..cBuff.Params..") = "..tostring(bt)); + else + buff = nil; + end + end + if (buff == nil and cBuff.DurationS >= 1 and rbTime > 0) then if (charges == nil) then charges = -1; end if (charges > 1) then cBuff.CanCharge = true; end bufftarget = nil; end - + if (bt and bt <= rbTime) then buff = buffnS; bExpire = true; - end - + end + if (buff) then if (cBuff.Type ~= SMARTBUFF_CONST_ITEM) then local cr, iid = SMARTBUFF_CountReagent(buffnS, cBuff.Chain); @@ -1900,37 +1931,44 @@ function SMARTBUFF_BuffUnit(unit, subgroup, mode, spell) if (cBuff.Type == SMARTBUFF_CONST_ITEMGROUP or cBuff.Type == SMARTBUFF_CONST_SCROLL) then cds, cd = GetItemCooldown(iid); cd = (cds + cd) - GetTime(); - --SMARTBUFF_AddMsgD(cr.." "..buffnS.." found, cd = "..cd); + SMARTBUFF_AddMsgD(cr.." "..buffnS.." found, cd = "..cd); if (cd > 0) then buff = nil; end end - --SMARTBUFF_AddMsgD(cr .. " " .. buffnS .. " found"); + SMARTBUFF_AddMsgD(cr .. " " .. buffnS .. " found"); else - --SMARTBUFF_AddMsgD("No " .. buffnS .. " found"); + SMARTBUFF_AddMsgD("No " .. buffnS .. " found"); buff = nil; bExpire = false; end end end - + -- Weapon buff ------------------------------------------------------------------------ - elseif (cBuff.Type == SMARTBUFF_CONST_WEAPON or cBuff.Type == SMARTBUFF_CONST_INV) then - --SMARTBUFF_AddMsgD("Check weapon Buff"); - local bMh, tMh, cMh, _, bOh, tOh, cOh = GetWeaponEnchantInfo(); - + elseif (cBuff.Type == SMARTBUFF_CONST_WEAPON or cBuff.Type == SMARTBUFF_CONST_INV) then + SMARTBUFF_AddMsgD("Check weapon Buff"); + hasMainHandEnchant, mainHandExpiration, mainHandCharges, mainHandEnchantID, hasOffHandEnchant, offHandExpiration, offHandCharges, offHandEnchantID = GetWeaponEnchantInfo(); + bMh = hasMainHandEnchant; + tMh = mainHandExpiration; + cMh = mainHandCharges; + bOh = hasOffHandEnchant; + tOh = offHandExpiration; + cOh = offHandCharges; + + if (bs.MH) then - iSlot = 16; + iSlot = INVSLOT_MAINHAND; iId = GetInventoryItemID("player", iSlot); if (iId and SMARTBUFF_CanApplyWeaponBuff(buffnS, iSlot)) then if (bMh) then if (rbTime > 0 and cBuff.DurationS >= 1) then - --if (tMh == nil) then tMh = 0; end + --if (tMh == nil) then tMh = 0; end tMh = floor(tMh/1000); charges = cMh; if (charges == nil) then charges = -1; end if (charges > 1) then cBuff.CanCharge = true; end - --SMARTBUFF_AddMsgD(un .. " (WMH): " .. buffnS .. string.format(" %.0f sec left", tMh) .. ", " .. charges .. " charges left"); + SMARTBUFF_AddMsgD(un .. " (WMH): " .. buffnS .. string.format(" %.0f sec left", tMh) .. ", " .. charges .. " charges left"); if (tMh <= rbTime or (O.CheckCharges and cBuff.CanCharge and charges > 0 and charges <= O.MinCharges)) then buff = buffnS; bt = tMh; @@ -1942,12 +1980,12 @@ function SMARTBUFF_BuffUnit(unit, subgroup, mode, spell) buff = buffnS; end else - --SMARTBUFF_AddMsgD("Weapon Buff cannot be cast, no mainhand weapon equipped or wrong weapon/stone type"); + SMARTBUFF_AddMsgD("Weapon Buff cannot be cast, no mainhand weapon equipped or wrong weapon/stone type"); end end - - if (bs.OH and not bExpire and handtype == "") then - iSlot = 17; + + if (bs.OH and not bExpire and not buffloc) then + iSlot = INVSLOT_OFFHAND iId = GetInventoryItemID("player", iSlot); if (iId and SMARTBUFF_CanApplyWeaponBuff(buffnS, iSlot)) then if (bOh) then @@ -1957,49 +1995,48 @@ function SMARTBUFF_BuffUnit(unit, subgroup, mode, spell) charges = cOh; if (charges == nil) then charges = -1; end if (charges > 1) then cBuff.CanCharge = true; end - --SMARTBUFF_AddMsgD(un .. " (WOH): " .. buffnS .. string.format(" %.0f sec left", tOh) .. ", " .. charges .. " charges left"); + SMARTBUFF_AddMsgD(un .. " (WOH): " .. buffnS .. string.format(" %.0f sec left", tOh) .. ", " .. charges .. " charges left"); if (tOh <= rbTime or (O.CheckCharges and cBuff.CanCharge and charges > 0 and charges <= O.MinCharges)) then buff = buffnS; bt = tOh; - bExpire = true; - end + bExpire = true; + end end else handtype = "off"; buff = buffnS; end else - --SMARTBUFF_AddMsgD("Weapon Buff cannot be cast, no offhand weapon equipped or wrong weapon/stone type"); + SMARTBUFF_AddMsgD("Weapon Buff cannot be cast, no offhand weapon equipped or wrong weapon/stone type"); end end if (buff and cBuff.Type == SMARTBUFF_CONST_INV) then local cr = SMARTBUFF_CountReagent(buffnS, cBuff.Chain); if (cr > 0) then - --SMARTBUFF_AddMsgD(cr .. " " .. buffnS .. " found"); + SMARTBUFF_AddMsgD(cr .. " " .. buffnS .. " found"); else - --SMARTBUFF_AddMsgD("No " .. buffnS .. " found"); + SMARTBUFF_AddMsgD("No " .. buffnS .. " found"); buff = nil; end - end - + end -- Normal buff ------------------------------------------------------------------------ else local index = nil; - - -- check timer object + + -- check timer object buff, index, buffname, bt, charges = SMARTBUFF_CheckUnitBuffs(unit, buffnS, cBuff.Type, cBuff.Links, cBuff.Chain); if (charges == nil) then charges = -1; end if (charges > 1) then cBuff.CanCharge = true; end - - if (unit ~= "target" and buff == nil and cBuff.DurationS >= 1 and rbTime > 0) then + + if (unit ~= "target" and buff == nil and cBuff.DurationS >= 1 and rbTime > 0) then if (SMARTBUFF_IsPlayer(unit)) then if (cBuffTimer[unit] ~= nil and cBuffTimer[unit][buffnS] ~= nil) then local tbt = cBuff.DurationS - (time - cBuffTimer[unit][buffnS]); if (not bt or bt - tbt > rbTime) then bt = tbt; end - end + end --if (charges == nil) then charges = -1; end --if (charges > 1) then cBuff.CanCharge = true; end bufftarget = nil; @@ -2023,7 +2060,7 @@ function SMARTBUFF_BuffUnit(unit, subgroup, mode, spell) else bt = nil; end - + if ((bt and bt <= rbTime) or (O.CheckCharges and cBuff.CanCharge and charges > 0 and charges <= O.MinCharges)) then if (buffname) then buff = buffname; @@ -2033,7 +2070,7 @@ function SMARTBUFF_BuffUnit(unit, subgroup, mode, spell) bExpire = true; end end - + -- check if the group buff is active, in this case it is not possible to cast the single buff if (buffname and mode ~= 1 and buffname ~= buffnS) then buff = nil; @@ -2052,47 +2089,45 @@ function SMARTBUFF_BuffUnit(unit, subgroup, mode, spell) else if(cBuff.Params == SMARTBUFF_DRUID_CAT) then buff = nil; - end + end if (buff and mode ~= 1 and not O.InShapeshift and (sShapename ~= SMARTBUFF_DRUID_MOONKIN and sShapename ~= SMARTBUFF_DRUID_TREANT)) then --sMsgWarning = SMARTBUFF_MSG_SHAPESHIFT .. ": " .. sShapename; buff = nil; end end - else - if(cBuff.Params == SMARTBUFF_DRUID_CAT) then + elseif(cBuff.Params == SMARTBUFF_DRUID_CAT) then buff = nil; - end end end - + if (buff) then - -- we have a buff, set the cvar - this will be reverted back - -- once smartbuff has finished its work. If we are in combat - -- lockdown then keep it at 0 - + -- we have a buff, set the cvar - this will be reverted back + -- once smartbuff has finished its work. If we are in combat + -- lockdown then keep it at 0 + if not InCombatLockdown() and O.SBButtonFix then - SetCVar("ActionButtonUseKeyDown",1 ); - elseif O.SBButtonFix then - SetCVar("ActionButtonUseKeyDown", O.SBButtonDownVal ); + SetCVar("ActionButtonUseKeyDown",1 ); + elseif O.SBButtonFix then + SetCVar("ActionButtonUseKeyDown", O.SBButtonDownVal ); + end + + if (cBuff.IDS) then + SMARTBUFF_AddMsgD("Checking " ..i .. " - " .. cBuff.IDS .. " " .. buffnS); end - --if (cBuff.IDS) then - --SMARTBUFF_AddMsgD("Checking " ..i .. " - " .. cBuff.IDS .. " " .. buffnS); - --end - -- Cast mode --------------------------------------------------------------------------------------- if (mode == 0 or mode == 5) then currentUnit = nil; currentSpell = nil; - - --try to apply weapon buffs on main/off hand - if (cBuff.Type == SMARTBUFF_CONST_INV) then + + --try to apply weapon buffs on main/off hand + if (cBuff.Type == SMARTBUFF_CONST_INV) then if (iSlot and (handtype ~= "" or bExpire)) then local bag, slot, count = SMARTBUFF_FindItem(buffnS, cBuff.Chain); if (count > 0) then sMsgWarning = ""; - return 0, SMARTBUFF_ACTION_ITEM, buffnS, iSlot, "player", cBuff.Type; + return 0, SMARTBUFF_ACTION_ITEM, GetItemInfo(buffnS), iSlot, "player", cBuff.Type; end end r = 50; @@ -2101,9 +2136,9 @@ function SMARTBUFF_BuffUnit(unit, subgroup, mode, spell) sMsgWarning = ""; return 0, SMARTBUFF_ACTION_SPELL, buffnS, iSlot, "player", cBuff.Type; --return 0, SMARTBUFF_ACTION_SPELL, buffnS, iId, "player", cBuff.Type; - end + end r = 50; - + -- eat food or use scroll or potion elseif (cBuff.Type == SMARTBUFF_CONST_FOOD or cBuff.Type == SMARTBUFF_CONST_SCROLL or cBuff.Type == SMARTBUFF_CONST_POTION) then local bag, slot, count = SMARTBUFF_FindItem(buffnS, cBuff.Chain); @@ -2112,7 +2147,7 @@ function SMARTBUFF_BuffUnit(unit, subgroup, mode, spell) return 0, SMARTBUFF_ACTION_ITEM, buffnS, 0, "player", cBuff.Type; end r = 20; - + -- use item on a unit elseif (cBuff.Type == SMARTBUFF_CONST_ITEMGROUP) then local bag, slot, count = SMARTBUFF_FindItem(buffnS, cBuff.Chain); @@ -2121,11 +2156,11 @@ function SMARTBUFF_BuffUnit(unit, subgroup, mode, spell) return 0, SMARTBUFF_ACTION_ITEM, buffnS, 0, unit, cBuff.Type; end r = 20; - + -- create item elseif (cBuff.Type == SMARTBUFF_CONST_ITEM) then r = 20; - local bag, slot, count = SMARTBUFF_FindItem(buff, cBuff.Chain); + local bag, slot, count = SMARTBUFF_FindItem(buff, cBuff.Chain); if (count == 0) then r = SMARTBUFF_doCast(unit, cBuff.IDS, buffnS, cBuff.LevelsS, cBuff.Type); if (r == 0) then @@ -2133,7 +2168,7 @@ function SMARTBUFF_BuffUnit(unit, subgroup, mode, spell) currentSpell = buffnS; end end - + -- cast spell else r = SMARTBUFF_doCast(unit, cBuff.IDS, buffnS, cBuff.LevelsS, cBuff.Type); @@ -2142,16 +2177,16 @@ function SMARTBUFF_BuffUnit(unit, subgroup, mode, spell) currentSpell = buffnS; end end - + -- Check mode --------------------------------------------------------------------------------------- elseif (mode == 1) then currentUnit = nil; currentSpell = nil; if (bufftarget == nil) then bufftarget = un; end - + if (cBuff.IDS ~= nil or SMARTBUFF_IsItem(cBuff.Type) or cBuff.Type == SMARTBUFF_CONST_TRACK) then -- clean up buff timer, if expired - if (bt and bt < 0 and bExpire) then + if (bt and bt < 0 and bExpire) then bt = 0; if (cBuffTimer[unit] ~= nil and cBuffTimer[unit][buffnS] ~= nil) then cBuffTimer[unit][buffnS] = nil; @@ -2161,7 +2196,7 @@ function SMARTBUFF_BuffUnit(unit, subgroup, mode, spell) if (cBuffTimer[subgroup] ~= nil and cBuffTimer[subgroup][cBuff.BuffG] ~= nil) then cBuffTimer[subgroup][cBuff.BuffG] = nil; --SMARTBUFF_AddMsgD("Group " .. subgroup .. ": " .. buffnS .. " timer reset"); - end + end if (cBuffTimer[uc] ~= nil and cBuffTimer[uc][cBuff.BuffG] ~= nil) then cBuffTimer[uc][cBuff.BuffG] = nil; --SMARTBUFF_AddMsgD("Class " .. uc .. ": " .. cBuff.BuffG .. " timer reset"); @@ -2170,13 +2205,13 @@ function SMARTBUFF_BuffUnit(unit, subgroup, mode, spell) tLastCheck = time - O.AutoTimer + 0.5; return 0; end - + SMARTBUFF_SetMissingBuffMessage(bufftarget, buff, cBuff.IconS, cBuff.CanCharge, charges, bt, bExpire); SMARTBUFF_SetButtonTexture(SmartBuff_KeyButton, cBuff.IconS); return 0; end end - + if (r == 0) then -- target buffed -- Message will printed in the "SPELLCAST_STOP" event @@ -2225,7 +2260,7 @@ function SMARTBUFF_BuffUnit(unit, subgroup, mode, spell) if (mode == 0) then SMARTBUFF_AddMsgD(SMARTBUFF_MSG_CHAT); end end else - -- finished + -- finished if O.SBButtonFix then SetCVar("ActionButtonUseKeyDown", O.SBButtonDownVal ); end end else @@ -2241,9 +2276,8 @@ function SMARTBUFF_BuffUnit(unit, subgroup, mode, spell) end end -- group or self end - --i = i + 1; + --i = i + 1; end -- for buff - end return 3; end @@ -2269,8 +2303,8 @@ function SMARTBUFF_SetMissingBuffMessage(target, buff, icon, bCanCharge, nCharge local s; local sd = O.SplashDuration; local si = ""; - - if (OG.SplashIcon and icon) then + + if (OG.SplashIcon and icon) then local n = O.SplashIconSize; if (n == nil or n <= 0) then n = O.CurrentFontSize; @@ -2282,7 +2316,7 @@ function SMARTBUFF_SetMissingBuffMessage(target, buff, icon, bCanCharge, nCharge sd = 1; f:Clear(); end - + f:SetTimeVisible(sd); if (not nCharges) then nCharges = 0; end if (O.CheckCharges and bCanCharge and nCharges > 0 and nCharges <= O.MinCharges and bExpire) then @@ -2306,7 +2340,7 @@ function SMARTBUFF_SetMissingBuffMessage(target, buff, icon, bCanCharge, nCharge end f:AddMessage(s, O.ColSplashFont.r, O.ColSplashFont.g, O.ColSplashFont.b, 1.0); end - + -- show chat buff message if (O.ToggleAutoChat) then if (O.CheckCharges and bCanCharge and nCharges > 0 and nCharges <= O.MinCharges and bExpire) then @@ -2317,7 +2351,7 @@ function SMARTBUFF_SetMissingBuffMessage(target, buff, icon, bCanCharge, nCharge SMARTBUFF_AddMsgWarn(target.." "..SMARTBUFF_MSG_NEEDS.." "..buff, true); end end - + -- play sound if (O.ToggleAutoSound) then PlaySound(Sounds[O.AutoSoundSelection]); @@ -2335,7 +2369,7 @@ function SMARTBUFF_CanApplyWeaponBuff(buff, slot) else cWeaponTypes = SMARTBUFF_WEAPON_STANDARD; end - + local itemLink = GetInventoryItemLink("player", slot); local _, _, itemCode = string.find(itemLink, "(%d+):"); local _, _, _, _, _, itemType, itemSubType = GetItemInfo(itemCode); @@ -2343,7 +2377,7 @@ function SMARTBUFF_CanApplyWeaponBuff(buff, slot) --if (itemType and itemSubType) then -- SMARTBUFF_AddMsgD("Type: " .. itemType .. ", Subtype: " .. itemSubType); --end - + if (cWeaponTypes and itemSubType) then for _, weapon in pairs(cWeaponTypes) do --SMARTBUFF_AddMsgD(weapon); @@ -2353,7 +2387,7 @@ function SMARTBUFF_CanApplyWeaponBuff(buff, slot) end end - end + end return false; end -- END SMARTBUFF_CanApplyWeaponBuff @@ -2374,25 +2408,25 @@ end -- Casts a spell function SMARTBUFF_doCast(unit, id, spellName, levels, type) if (id == nil) then return 9; end - if (type == SMARTBUFF_CONST_TRACK and (GetTrackingTexture() ~= "Interface\\Minimap\\Tracking\\None")) then + if (type == SMARTBUFF_CONST_TRACK and (GetTrackingTexture() ~= "Interface\\Minimap\\Tracking\\None")) then --SMARTBUFF_AddMsgD("Track already enabled: " .. iconTrack); - return 7; + return 7; end - + -- check if spell has cooldown local _, cd = GetSpellCooldown(spellName) if (not cd) then -- move on elseif (cd > maxSkipCoolDown) then return 4; - elseif (cd > 0) then + elseif (cd > 0) then return 1; end - + -- Rangecheck --SMARTBUFF_AddMsgD("Spell has range: "..spellName.." = "..ChkS(SpellHasRange(spellName))); - if (type == SMARTBUFF_CONST_GROUP or type == SMARTBUFF_CONST_ITEMGROUP) then - if (SpellHasRange(spellName)) then + if (type == SMARTBUFF_CONST_GROUP or type == SMARTBUFF_CONST_ITEMGROUP) then + if (SpellHasRange(spellName)) then if (IsSpellInRange(spellName, unit) ~= 1) then return 3; end @@ -2400,7 +2434,7 @@ function SMARTBUFF_doCast(unit, id, spellName, levels, type) if (UnitInRange(unit) ~= 1) then return 3; end - end + end end -- check if you have enough mana/energy/rage to cast @@ -2408,7 +2442,7 @@ function SMARTBUFF_doCast(unit, id, spellName, levels, type) if (notEnoughMana) then return 6; end - + return 0; end -- END SMARTBUFF_doCast @@ -2437,7 +2471,7 @@ end -- Will return the name of the buff to cast function SMARTBUFF_CheckUnitBuffs(unit, buffN, buffT, buffL, buffC) if (not unit or (not buffN and not buffL)) then return end - + local i, n, v; local buff = nil; local defBuff = nil; @@ -2448,13 +2482,12 @@ function SMARTBUFF_CheckUnitBuffs(unit, buffN, buffT, buffL, buffC) local icon = nil; local time = GetTime(); local uname = UnitName(unit) or "?"; - if (buffN) then defBuff = buffN; else defBuff = buffL[1]; end - + -- Stance/Presence/Seal check, these are not in the aura list n = cBuffIndex[defBuff]; if (cBuffs[n] and cBuffs[n].Type == SMARTBUFF_CONST_STANCE) then @@ -2483,7 +2516,7 @@ function SMARTBUFF_CheckUnitBuffs(unit, buffN, buffT, buffL, buffC) end end return defBuff, nil, nil, nil, nil; - + --[[ count = tonumber(cBuffs[n].Params); if (count) then @@ -2496,7 +2529,7 @@ function SMARTBUFF_CheckUnitBuffs(unit, buffN, buffT, buffL, buffC) end ]]-- end - + -- Check linked buffs if (buffL) then if (not O.LinkSelfBuffCheck and buffT == SMARTBUFF_CONST_SELF) then @@ -2522,7 +2555,7 @@ function SMARTBUFF_CheckUnitBuffs(unit, buffN, buffT, buffL, buffC) end end end - + -- Check chained buffs if (defBuff and buffC and #buffC > 1) then local t = B[CS()].Order; @@ -2546,7 +2579,7 @@ function SMARTBUFF_CheckUnitBuffs(unit, buffN, buffT, buffL, buffC) end end end - + -- Check default buff if (defBuff) then SMARTBUFF_AddMsgD("Check default buff ("..uname.."): "..defBuff); @@ -2564,7 +2597,7 @@ function SMARTBUFF_CheckUnitBuffs(unit, buffN, buffT, buffL, buffC) SMARTBUFF_AddMsgD("Default buff found: "..buff..", "..timeleft..", "..icon); return nil, 0, defBuff, timeleft, count; end - end + end -- Buff not found, return default buff return defBuff, nil, nil, nil, nil; @@ -2626,7 +2659,7 @@ function SMARTBUFF_UpdateBuffDuration(buff, duration) if (i ~= nil and cBuffs[i] ~= nil and buff == cBuffs[i].BuffS) then if (cBuffs[i].DurationS ~= nil and cBuffs[i].DurationS > 0 and cBuffs[i].DurationS ~= duration) then SMARTBUFF_AddMsgD("Updated buff duration: "..buff.." = "..duration.."sec, old = "..cBuffs[i].DurationS); - cBuffs[i].DurationS = duration; + cBuffs[i].DurationS = duration; end end end @@ -2642,7 +2675,7 @@ function UnitAuraBySpellName(target,spellname,filter) end end -function SMARTBUFF_CheckBuff(unit, buffName, isMine) +function SMARTBUFF_CheckBuff(unit, buffName, isMine) if (not unit or not buffName) then return false, 0; end @@ -2670,13 +2703,13 @@ end -- END SMARTBUFF_CheckUnitBuffs --- Will return the name/description of the buff +-- Will return the name/description of the buff function SMARTBUFF_GetBuffName(unit, buffIndex, line) local i = buffIndex; local name = nil; if (i < 0 or i > maxBuffs) then return nil; - end + end --SmartBuffTooltip:SetOwner(SmartBuffFrame, "ANCHOR_NONE"); SmartBuffTooltip:ClearLines(); SmartBuffTooltip:SetUnitBuff(unit, i); @@ -2719,16 +2752,16 @@ end function SMARTBUFF_IsFishingPoleEquiped() if (not SG or not SG.FishingPole) then return false end - + local link = GetInventoryItemLink("player", GetInventorySlotInfo("MainHandSlot")); if (not link) then return false end - + local _, _, _, _, _, _, subType = GetItemInfo(link); if (not subType) then return false end - + --print(SG.FishingPole.." - "..subType); if (SG.FishingPole == subType) then return true end - + return false; end -- END SMARTBUFF_IsFishing @@ -2754,7 +2787,7 @@ function SMARTBUFF_IsDebuffTexture(unit, debufftex) -- name,rank,icon,count,type = UnitDebuff("unit", id or "name"[,"rank"]) while (UnitDebuff(unit, i)) do name, icon, _, _ = UnitDebuff(unit, i); - --SMARTBUFF_AddMsgD(i .. ". " .. name .. ", " .. icon); + --SMARTBUFF_AddMsgD(i .. ". " .. name .. ", " .. icon); if (string.find(icon, debufftex)) then active = true; break @@ -2767,74 +2800,70 @@ end -- Returns the number of a reagent currently in player's bag +-- we now search on ItemLink in addition to itemText, in order to support Dragonflight item qualities function SMARTBUFF_CountReagent(reagent, chain) if (reagent == nil) then return -1, nil; end - if(O.IncludeToys) then - local toy = SG.Toybox[reagent]; + local _,link = GetItemInfo(reagent) -- itemlink + local toy = SG.Toybox[link]; if (toy) then return 1, toy[1]; end end - - local n = 0; + + local total = 0; local id = nil; local bag = 0; local slot = 0; - local tmpItem, itemName, count; - if (chain == nil) then chain = { reagent }; end + if not (chain) then chain = { reagent }; end for bag = 0, NUM_BAG_FRAMES do for slot = 1, C_Container.GetContainerNumSlots(bag) do - tmpItem = C_Container.GetContainerItemLink(bag, slot); --- if tmpItem then print(tmpItem) end - if (tmpItem ~= nil) then + bagItemID = C_Container.GetContainerItemID(bag, slot) + if bagItemID then + containerInfo = C_Container.GetContainerItemInfo(bag, slot); + --SMARTBUFF_AddMsgD("Reagent found: " .. C_Container.GetContainerItemLink(bag.slot)); for i = 1, #chain, 1 do - --print(chain[i]); - if (chain[i] and string.find(tmpItem, "["..chain[i].."]", 1, true)) then --- print("Item found: "..chain[i]); - containerInfo = C_Container.GetContainerItemInfo(bag, slot); - count = containerInfo.stackCount; - id = C_Container.GetContainerItemID(bag, slot); - n = n + count; + local buffItemID = tonumber(string.match(chain[i], "item:(%d+)")) + if bagItemID == buffItemID then + id = buffItemID + total = total + containerInfo.stackCount; end end end end end - return n, id; + return total, id; end +-- these two functions are basically identical and should be merged function SMARTBUFF_FindItem(reagent, chain) if (reagent == nil) then return nil, nil, -1, nil; end - + if(O.IncludeToys) then - local toy = SG.Toybox[reagent]; - if (toy) then - return 999, toy[1], 1, toy[2]; - end + local _,link = GetItemInfo(reagent) -- itemlink + local toy = SG.Toybox[link]; + if (toy) then + return 999, toy[1], 1, toy[2]; + end end - + local n = 0; local bag = 0; local slot = 0; - local tmpItem, itemName, texture, count; - if (chain == nil) then chain = { reagent }; end + if not (chain) then chain = { reagent }; end for bag = 0, NUM_BAG_FRAMES do for slot = 1, C_Container.GetContainerNumSlots(bag) do - tmpItem = C_Container.GetContainerItemLink(bag, slot); - if (tmpItem ~= nil) then - --SMARTBUFF_AddMsgD("Reagent found: " .. tmpItem); + bagItemID = C_Container.GetContainerItemID(bag, slot); + if (bagItemID) then + --SMARTBUFF_AddMsgD("Reagent found: " .. C_Container.GetContainerItemLink(bag.slot)); for i = 1, #chain, 1 do - --print(chain[i]); --- if (chain[i] and string.find(itemName, chain[i], 1, true)) then - if (chain[i] and string.find(tmpItem, "["..chain[i].."]", 1, true)) then --- print("Item found: "..chain[i]); - containerInfo = C_Container.GetContainerItemInfo(bag, slot); - return bag, slot, containerInfo.stackCount, containerInfo.iconFileID; + if tonumber(string.match(chain[i], "item:(%d+)")) == bagItemID then + containerInfo = C_Container.GetContainerItemInfo(bag, slot); + return bag, slot, containerInfo.stackCount, containerInfo.iconFileID; end end end @@ -2848,8 +2877,11 @@ end -- check the current zone and set buff template function SMARTBUFF_CheckLocation() if (not O.AutoSwitchTemplate and not O.AutoSwitchTemplateInst) then return; end - - local zone = GetRealZoneText(); + + -- if in LFR, we don't want to use specific instance templates + if currentTemplate == SMARTBUFF_TEMPLATES[Enum.SmartBuffGroup.LFR] then return; end + + local zone = GetRealZoneText(); if (zone == nil) then SMARTBUFF_AddMsgD("No zone found, try again..."); tStartZone = GetTime(); @@ -2860,14 +2892,14 @@ function SMARTBUFF_CheckLocation() isSetZone = false; local tmp = nil; local b = false; - + SMARTBUFF_AddMsgD("Current zone: "..zone..", last zone: "..sLastZone); if (zone ~= sLastZone) then sLastZone = zone; if (IsActiveBattlefieldArena()) then - tmp = SMARTBUFF_TEMPLATES[5]; + tmp = SMARTBUFF_TEMPLATES[Enum.SmartBuffGroup.Arena]; elseif (SMARTBUFF_IsActiveBattlefield(zone) == 1) then - tmp = SMARTBUFF_TEMPLATES[4]; + tmp = SMARTBUFF_TEMPLATES[Enum.SmartBuffGroup.Battleground]; else if (O.AutoSwitchTemplateInst) then local i = 1; @@ -2880,20 +2912,20 @@ function SMARTBUFF_CheckLocation() end tmp = nil; if (b) then - if (SMARTBUFF_TEMPLATES[i + 5] ~= nil) then - tmp = SMARTBUFF_TEMPLATES[i + 5] + if SMARTBUFF_TEMPLATES[i + Enum.SmartBuffGroup.Arena] then + tmp = SMARTBUFF_TEMPLATES[i + Enum.SmartBuffGroup.Arena] end end end end - - --SMARTBUFF_AddMsgD("Current tmpl: " .. currentTemplate .. " - new tmpl: " .. tmp); + + SMARTBUFF_AddMsgD("Current tmpl: " .. currentTemplate or "nil" .. " - new tmpl: " .. tmp or "nil"); if (tmp and currentTemplate ~= tmp) then SMARTBUFF_AddMsg(SMARTBUFF_OFT_AUTOSWITCHTMP .. ": " .. currentTemplate .. " -> " .. tmp); currentTemplate = tmp; SMARTBUFF_SetBuffs(); end - end + end end -- END SMARTBUFF_CheckLocation @@ -2910,7 +2942,7 @@ function SMARTBUFF_IsActiveBattlefield(zone) end if (status and status == "active" and map) then if (teamSize and type(teamSize) == "number" and teamSize > 0) then - return 2; + return 2; end return 1; end @@ -2957,33 +2989,32 @@ end -- Init the SmartBuff variables --------------------------------------------------------------------------------------- function SMARTBUFF_Options_Init(self) - + if (isInit) then return; end - + self:UnregisterEvent("CHAT_MSG_CHANNEL"); self:UnregisterEvent("UPDATE_MOUSEOVER_UNIT"); - + --DebugChatFrame:AddMessage("Starting init SB"); - + _, sPlayerClass = UnitClass("player"); sRealmName = GetRealmName(); sPlayerName = UnitName("player"); sID = sRealmName .. ":" .. sPlayerName; --AutoSelfCast = GetCVar("autoSelfCast"); - + SMARTBUFF_PLAYERCLASS = sPlayerClass; - - + + if (not SMARTBUFF_Buffs) then SMARTBUFF_Buffs = { }; end B = SMARTBUFF_Buffs; if (not SMARTBUFF_Options) then SMARTBUFF_Options = { }; end O = SMARTBUFF_Options; - + SMARTBUFF_BROKER_SetIcon(); - - - if (O.Toggle == nil) then O.Toggle = true; end - if (O.SendVerInfo == nil) then O.SendVerInfo = true; end + + + if (O.Toggle == nil) then O.Toggle = true; end if (O.ToggleAuto == nil) then O.ToggleAuto = true; end if (O.AutoTimer == nil) then O.AutoTimer = 5; end if (O.BlacklistTimer == nil) then O.BlacklistTimer = 5; end @@ -2997,19 +3028,19 @@ function SMARTBUFF_Options_Init(self) if (O.RebuffTimer == nil) then O.RebuffTimer = 20; end if (O.SplashDuration == nil) then O.SplashDuration = 2; end if (O.SplashIconSize == nil) then O.SplashIconSize = 16; end - + if (O.BuffTarget == nil) then O.BuffTarget = false; end if (O.BuffPvP == nil) then O.BuffPvP = false; end if (O.BuffInCities == nil) then O.BuffInCities = true; end if (O.LinkSelfBuffCheck == nil) then O.LinkSelfBuffCheck = true; end if (O.LinkGrpBuffCheck == nil) then O.LinkGrpBuffCheck = true; end if (O.AntiDaze == nil) then O.AntiDaze = true; end - + if (O.ScrollWheel ~= nil and O.ScrollWheelUp == nil) then O.ScrollWheelUp = O.ScrollWheel; end if (O.ScrollWheel ~= nil and O.ScrollWheelDown == nil) then O.ScrollWheelDown = O.ScrollWheel; end if (O.ScrollWheelUp == nil) then O.ScrollWheelUp = true; end if (O.ScrollWheelDown == nil) then O.ScrollWheelDown = true; end - + if (O.InCombat == nil) then O.InCombat = true; end if (O.IncludeToys == nil) then O.IncludeToys = false; end if (O.AutoSwitchTemplate == nil) then O.AutoSwitchTemplate = true; end @@ -3017,28 +3048,28 @@ function SMARTBUFF_Options_Init(self) if (O.InShapeshift == nil) then O.InShapeshift = true; end O.ToggleGrp = {true, true, true, true, true, true, true, true}; - + if (O.ToggleMsgNormal == nil) then O.ToggleMsgNormal = false; end if (O.ToggleMsgWarning == nil) then O.ToggleMsgWarning = false; end if (O.ToggleMsgError == nil) then O.ToggleMsgError = false; end - + if (O.HideMmButton == nil) then O.HideMmButton = false; end if (O.HideSAButton == nil) then O.HideSAButton = false; end - + if (O.SBButtonFix == nil) then O.SBButtonFix = false; end if (O.SBButtonDownVal == nil) then O.SBButtonDownVal = GetCVarBool("ActionButtonUseKeyDown"); end - - if (O.MinCharges == nil) then + + if (O.MinCharges == nil) then if (sPlayerClass == "SHAMAN" or sPlayerClass == "PRIEST") then O.MinCharges = 1; else O.MinCharges = 3; end end - + if (not O.AddList) then O.AddList = { }; end if (not O.IgnoreList) then O.IgnoreList = { }; end - + if (O.LastTemplate == nil) then O.LastTemplate = SMARTBUFF_TEMPLATES[1]; end local b = false; while (SMARTBUFF_TEMPLATES[i] ~= nil) do @@ -3048,18 +3079,18 @@ function SMARTBUFF_Options_Init(self) end i = i + 1; end - if (not b) then + if (not b) then O.LastTemplate = SMARTBUFF_TEMPLATES[1]; - end - + end + currentTemplate = O.LastTemplate; - currentSpec = GetSpecialization(); - + currentSpec = GetSpecialization(); + if (O.OldWheelUp == nil) then O.OldWheelUp = ""; end if (O.OldWheelDown == nil) then O.OldWheelDown = ""; end - + SMARTBUFF_InitActionButtonPos(); - + if (O.SplashX == nil) then O.SplashX = 100; end if (O.SplashY == nil) then O.SplashY = -100; end if (O.CurrentFont == nil) then O.CurrentFont = 9; end @@ -3067,19 +3098,19 @@ function SMARTBUFF_Options_Init(self) O.ColSplashFont = { }; O.ColSplashFont.r = 1.0; O.ColSplashFont.g = 1.0; - O.ColSplashFont.b = 1.0; + O.ColSplashFont.b = 1.0; end iCurrentFont = O.CurrentFont; - + if (O.Debug == nil) then O.Debug = false; end - + -- Cosmos support - if(EarthFeature_AddButton) then + if(EarthFeature_AddButton) then EarthFeature_AddButton( { id = SMARTBUFF_TITLE; name = SMARTBUFF_TITLE; subtext = SMARTBUFF_TITLE; - tooltip = ""; + tooltip = ""; icon = imgSB; callback = SMARTBUFF_OptionsFrame_Toggle; test = nil; @@ -3089,20 +3120,20 @@ function SMARTBUFF_Options_Init(self) end if (IsAddOnLoaded("Parrot")) then - isParrot = true; + isParrot = true; end - - SMARTBUFF_FindItem("ScanBagsForSBInit"); - + + SMARTBUFF_FindItem("ScanBagsForSBInit"); + SMARTBUFF_AddMsg(SMARTBUFF_VERS_TITLE .. " " .. SMARTBUFF_MSG_LOADED, true); SMARTBUFF_AddMsg("/sbm - " .. SMARTBUFF_OFT_MENU, true); isInit = true; - + SMARTBUFF_CheckMiniMapButton(); SMARTBUFF_MinimapButton_OnUpdate(SmartBuff_MiniMapButton); SMARTBUFF_ShowSAButton(); SMARTBUFF_Splash_Hide(); - + if (O.UpgradeToDualSpec == nil) then for n = 1, GetNumSpecGroups(), 1 do if (B[n] == nil) then @@ -3122,40 +3153,40 @@ function SMARTBUFF_Options_Init(self) end end O.UpgradeToDualSpec = true; - SMARTBUFF_AddMsg("Upgraded to dual spec", true); + SMARTBUFF_AddMsg("Upgraded to dual spec", true); end - + for k, v in pairs(cClasses) do if (SMARTBUFF_CLASSES[k] == nil) then SMARTBUFF_CLASSES[k] = v; end end - + if (O.VersionNr == nil or O.VersionNr < SMARTBUFF_VERSIONNR) then O.VersionNr = SMARTBUFF_VERSIONNR; SMARTBUFF_SetBuffs(); InitBuffOrder(true); print("Upgraded SmartBuff to "..SMARTBUFF_VERSION); end - + if (SMARTBUFF_OptionsGlobal == nil) then SMARTBUFF_OptionsGlobal = { }; end OG = SMARTBUFF_OptionsGlobal; if (OG.SplashIcon == nil) then OG.SplashIcon = true; end if (OG.SplashMsgShort == nil) then OG.SplashMsgShort = false; end if (OG.FirstStart == nil) then OG.FirstStart = "V0"; end - + SMARTBUFF_Splash_ChangeFont(0); if (OG.FirstStart ~= SMARTBUFF_VERSION) then OG.FirstStart = SMARTBUFF_VERSION; SMARTBUFF_OptionsFrame_Open(true); - + if (OG.Tutorial == nil) then OG.Tutorial = SMARTBUFF_VERSIONNR; SMARTBUFF_ToggleTutorial(); end - + SmartBuffWNF_lblText:SetText(SMARTBUFF_WHATSNEW); - SmartBuffWNF:Show(); + SmartBuffWNF:Show(); else SMARTBUFF_SetBuffs(); end @@ -3164,16 +3195,16 @@ function SMARTBUFF_Options_Init(self) SmartBuff_KeyButton:ClearAllPoints(); SmartBuff_KeyButton:SetPoint("CENTER", UIParent, "CENTER", 0, 100); end - + SMARTBUFF_SetUnits(); SMARTBUFF_RebindKeys(); isSyncReq = true; end -- END SMARTBUFF_Options_Init -function SMARTBUFF_InitActionButtonPos() +function SMARTBUFF_InitActionButtonPos() if (InCombatLockdown()) then return end - + isInitBtn = true; if (O.ActionBtnX == nil) then SMARTBUFF_SetButtonPos(SmartBuff_KeyButton); @@ -3184,7 +3215,7 @@ function SMARTBUFF_InitActionButtonPos() --print(format("x = %.0f, y = %.0f", O.ActionBtnX, O.ActionBtnY)); end -function SMARTBUFF_ResetAll() +function SMARTBUFF_ResetAll() wipe(SMARTBUFF_Buffs); wipe(SMARTBUFF_Options); ReloadUI(); @@ -3203,19 +3234,19 @@ function SMARTBUFF_RebindKeys() for i = 1, GetNumBindings(), 1 do local s = ""; local command, key1, key2 = GetBinding(i); - + --if (command and key1) then -- SMARTBUFF_AddMsgD(i .. " = " .. command .. " - " .. key1; --end - + if (key1 and key1 == "MOUSEWHEELUP" and command ~= "SmartBuff_KeyButton") then O.OldWheelUp = command; --SMARTBUFF_AddMsgD("Old wheel up: " .. command); elseif (key1 and key1 == "MOUSEWHEELDOWN" and command ~= "SmartBuff_KeyButton") then O.OldWheelDown = command; --SMARTBUFF_AddMsgD("Old wheel down: " .. command); - end - + end + if (command and command == "SMARTBUFF_BIND_TRIGGER") then --s = i .. " = " .. command; if (key1) then @@ -3230,7 +3261,7 @@ function SMARTBUFF_RebindKeys() break; end end - + if (O.ScrollWheelUp) then isKeyUpChanged = true; SetOverrideBindingClick(SmartBuffFrame, false, "MOUSEWHEELUP", "SmartBuff_KeyButton", "MOUSEWHEELUP"); @@ -3242,7 +3273,7 @@ function SMARTBUFF_RebindKeys() --SMARTBUFF_AddMsgD("Set old wheel up: " .. O.OldWheelUp); end end - + if (O.ScrollWheelDown) then isKeyDownChanged = true; SetOverrideBindingClick(SmartBuffFrame, false, "MOUSEWHEELDOWN", "SmartBuff_KeyButton", "MOUSEWHEELDOWN"); @@ -3282,7 +3313,7 @@ function SMARTBUFF_command(msg) SMARTBUFF_AddMsgWarn(SMARTBUFF_VERS_TITLE.." not initialized correctly!", true); return; end - + if(msg == "toggle" or msg == "t") then SMARTBUFF_OToggle(); SMARTBUFF_SetUnits(); @@ -3296,9 +3327,9 @@ function SMARTBUFF_command(msg) if (SMARTBUFF_PreCheck(0)) then SMARTBUFF_checkBlacklist(); SMARTBUFF_BuffUnit("target", 0, 0); - end + end elseif (msg == "debug") then - O.Debug = SMARTBUFF_toggleBool(O.Debug, "Debug active = "); + O.Debug = SMARTBUFF_toggleBool(O.Debug, "Debug active = "); elseif (msg == "open") then SMARTBUFF_OptionsFrame_Open(true); elseif (msg == "sync") then @@ -3316,7 +3347,7 @@ function SMARTBUFF_command(msg) SmartBuffOptionsFrame:ClearAllPoints(); SmartBuffOptionsFrame:SetPoint("CENTER", UIParent, "CENTER"); elseif (msg == "test") then - + -- Test Code ****************************************** -- **************************************************** --local spellname = "Mind--numbing Poison"; @@ -3327,7 +3358,7 @@ function SMARTBUFF_command(msg) --SMARTBUFF_AddMsg("Modified: " .. spellname, true); -- **************************************************** -- **************************************************** - + else --SMARTBUFF_Check(0); SMARTBUFF_AddMsg(SMARTBUFF_VERS_TITLE, true); @@ -3453,8 +3484,8 @@ function SMARTBUFF_OToggleBuff(s, i) local bs = GetBuffSettings(cBuffs[i].BuffS); if (bs == nil) then return; - end - + end + if (s == "S") then bs.EnableS = not bs.EnableS; --SMARTBUFF_AddMsgD("OToggleBuff = "..cBuffs[i].BuffS..", "..tostring(bs.EnableS)); @@ -3468,7 +3499,7 @@ function SMARTBUFF_OToggleBuff(s, i) elseif (s == "G") then bs.EnableG = not bs.EnableG; end - + end function SMARTBUFF_OToggleDebug() @@ -3482,20 +3513,20 @@ end function SMARTBUFF_OptionsFrame_Toggle() if (not isInit) then return; end - + if(SmartBuffOptionsFrame:IsVisible()) then if(iLastBuffSetup > 0) then SmartBuff_BuffSetup:Hide(); iLastBuffSetup = -1; SmartBuff_PlayerSetup:Hide(); - end + end SmartBuffOptionsFrame:Hide(); else SmartBuffOptionsCredits_lblText:SetText(SMARTBUFF_CREDITS); SmartBuffOptionsFrame:Show(); SmartBuff_PlayerSetup:Hide(); end - + SMARTBUFF_MinimapButton_CheckPos(); end @@ -3521,17 +3552,17 @@ function SmartBuff_BuffSetup_Show(i) SmartBuff_PlayerSetup:Hide(); return; end - + if(SmartBuff_BuffSetup:IsVisible() and i == iLastBuffSetup) then SmartBuff_BuffSetup:Hide(); iLastBuffSetup = -1; SmartBuff_PlayerSetup:Hide(); return; - else + else if (btype == SMARTBUFF_CONST_GROUP or btype == SMARTBUFF_CONST_ITEMGROUP) then hidden = false; end - + if (icon2 and bs.EnableG) then SmartBuff_BuffSetup_BuffIcon2:SetNormalTexture(icon2); SmartBuff_BuffSetup_BuffIcon2:Show(); @@ -3550,7 +3581,7 @@ function SmartBuff_BuffSetup_Show(i) SmartBuff_BuffSetup_BuffIcon1:SetPoint("TOPLEFT", 24, -30); SmartBuff_BuffSetup_BuffIcon1:Hide(); end - + local obj = SmartBuff_BuffSetup_BuffText; if (name) then obj:SetText(name); @@ -3558,7 +3589,7 @@ function SmartBuff_BuffSetup_Show(i) else obj:SetText(""); end - + SmartBuff_BuffSetup_cbSelf:SetChecked(bs.SelfOnly); SmartBuff_BuffSetup_cbSelfNot:SetChecked(bs.SelfNot); SmartBuff_BuffSetup_cbCombatIn:SetChecked(bs.CIn); @@ -3568,8 +3599,8 @@ function SmartBuff_BuffSetup_Show(i) SmartBuff_BuffSetup_cbRH:SetChecked(bs.RH); SmartBuff_BuffSetup_cbReminder:SetChecked(bs.Reminder); SmartBuff_BuffSetup_txtManaLimit:SetNumber(bs.ManaLimit); - - --SMARTBUFF_AddMsgD("Test Buff setup show 1"); + + --SMARTBUFF_AddMsgD("Test Buff setup show 1"); if (cBuffs[i].DurationS > 0) then SmartBuff_BuffSetup_RBTime:SetMinMaxValues(0, cBuffs[i].DurationS); _G[SmartBuff_BuffSetup_RBTime:GetName().."High"]:SetText(cBuffs[i].DurationS); @@ -3589,7 +3620,7 @@ function SmartBuff_BuffSetup_Show(i) SmartBuff_BuffSetup_RBTime:Hide(); end --SMARTBUFF_AddMsgD("Test Buff setup show 2"); - + SmartBuff_BuffSetup_txtManaLimit:Hide(); if (cBuffs[i].Type == SMARTBUFF_CONST_INV or cBuffs[i].Type == SMARTBUFF_CONST_WEAPON) then SmartBuff_BuffSetup_cbMH:Show(); @@ -3604,12 +3635,12 @@ function SmartBuff_BuffSetup_Show(i) --SMARTBUFF_AddMsgD("Show ManaLimit"); end end - + if (cBuffs[i].Type == SMARTBUFF_CONST_GROUP or cBuffs[i].Type == SMARTBUFF_CONST_ITEMGROUP) then SmartBuff_BuffSetup_cbSelf:Show(); SmartBuff_BuffSetup_cbSelfNot:Show(); SmartBuff_BuffSetup_btnPriorityList:Show(); - SmartBuff_BuffSetup_btnIgnoreList:Show(); + SmartBuff_BuffSetup_btnIgnoreList:Show(); else SmartBuff_BuffSetup_cbSelf:Hide(); SmartBuff_BuffSetup_cbSelfNot:Hide(); @@ -3617,7 +3648,7 @@ function SmartBuff_BuffSetup_Show(i) SmartBuff_BuffSetup_btnIgnoreList:Hide(); SmartBuff_PlayerSetup:Hide(); end - + local cb = nil; local btn = nil; n = 0; @@ -3626,7 +3657,7 @@ function SmartBuff_BuffSetup_Show(i) n = n + 1; cb = _G["SmartBuff_BuffSetup_cbClass"..n]; btn = _G["SmartBuff_BuffSetup_ClassIcon"..n]; - if (hidden) then + if (hidden) then cb:Hide(); btn:Hide(); else @@ -3638,11 +3669,11 @@ function SmartBuff_BuffSetup_Show(i) iLastBuffSetup = i; --SMARTBUFF_AddMsgD("Test Buff setup show 4"); SmartBuff_BuffSetup:Show(); - + if (SmartBuff_PlayerSetup:IsVisible()) then SmartBuff_PS_Show(iCurrentList); end - end + end end function SmartBuff_BuffSetup_ManaLimitChanged(self) @@ -3663,7 +3694,7 @@ function SmartBuff_BuffSetup_OnClick() end local name = cBuffs[i].BuffS; local cBuff = GetBuffSettings(name); - + cBuff.SelfOnly = SmartBuff_BuffSetup_cbSelf:GetChecked(); cBuff.SelfNot = SmartBuff_BuffSetup_cbSelfNot:GetChecked(); cBuff.CIn = SmartBuff_BuffSetup_cbCombatIn:GetChecked(); @@ -3672,10 +3703,10 @@ function SmartBuff_BuffSetup_OnClick() cBuff.OH = SmartBuff_BuffSetup_cbOH:GetChecked(); cBuff.RH = SmartBuff_BuffSetup_cbRH:GetChecked(); cBuff.Reminder = SmartBuff_BuffSetup_cbReminder:GetChecked(); - + cBuff.RBTime = SmartBuff_BuffSetup_RBTime:GetValue(); _G[SmartBuff_BuffSetup_RBTime:GetName().."Text"]:SetText(cBuff.RBTime .. "\nsec"); - + if (cBuffs[i].Type == SMARTBUFF_CONST_GROUP or cBuffs[i].Type == SMARTBUFF_CONST_ITEMGROUP) then local n = 0; local cb = nil; @@ -3696,7 +3727,7 @@ function SmartBuff_BuffSetup_ToolTip(mode) local ids = cBuffs[i].IDS; local idg = cBuffs[i].IDG; local btype = cBuffs[i].Type - + GameTooltip:ClearLines(); if (SMARTBUFF_IsItem(btype)) then local bag, slot, count, texture = SMARTBUFF_FindItem(cBuffs[i].BuffS, cBuffs[i].Chain); @@ -3731,16 +3762,16 @@ function SMARTBUFF_Options_OnShow() local bottom = GetScreenHeight() - math.abs(SmartBuffOptionsFrame:GetBottom()); local left = SmartBuffOptionsFrame:GetLeft(); local right = SmartBuffOptionsFrame:GetRight(); - + --SMARTBUFF_AddMsgD("X: " .. GetScreenWidth() .. ", " .. left .. ", " .. right); --SMARTBUFF_AddMsgD("Y: " .. GetScreenHeight() .. ", " .. top .. ", " .. bottom); - + if (GetScreenWidth() < left + 20 or GetScreenHeight() < top + 20 or right < 20 or bottom < 20) then SmartBuffOptionsFrame:SetPoint("TOPLEFT", UIParent, "CENTER", -SmartBuffOptionsFrame:GetWidth() / 2, SmartBuffOptionsFrame:GetHeight() / 2); end - + SmartBuff_ShowControls("SmartBuffOptionsFrame", true); - + SmartBuffOptionsFrame_cbSB:SetChecked(O.Toggle); SmartBuffOptionsFrame_cbAuto:SetChecked(O.ToggleAuto); SmartBuffOptionsFrameAutoTimer:SetValue(O.AutoTimer); @@ -3749,7 +3780,7 @@ function SMARTBUFF_Options_OnShow() SmartBuffOptionsFrame_cbAutoChat:SetChecked(O.ToggleAutoChat); SmartBuffOptionsFrame_cbAutoSplash:SetChecked(O.ToggleAutoSplash); SmartBuffOptionsFrame_cbAutoSound:SetChecked(O.ToggleAutoSound); - + --SmartBuffOptionsFrame_cbCheckCharges:SetChecked(O.ToggleCheckCharges); --SmartBuffOptionsFrame_cbAutoRest:SetChecked(O.ToggleAutoRest); SmartBuffOptionsFrame_cbAutoSwitchTmp:SetChecked(O.AutoSwitchTemplate); @@ -3757,13 +3788,13 @@ function SMARTBUFF_Options_OnShow() SmartBuffOptionsFrame_cbBuffPvP:SetChecked(O.BuffPvP); SmartBuffOptionsFrame_cbBuffTarget:SetChecked(O.BuffTarget); SmartBuffOptionsFrame_cbBuffInCities:SetChecked(O.BuffInCities); - SmartBuffOptionsFrame_cbInShapeshift:SetChecked(O.InShapeshift); + SmartBuffOptionsFrame_cbInShapeshift:SetChecked(O.InShapeshift); SmartBuffOptionsFrame_cbFixBuffIssue:SetChecked(O.SBButtonFix); - + SmartBuffOptionsFrame_cbAntiDaze:SetChecked(O.AntiDaze); SmartBuffOptionsFrame_cbLinkGrpBuffCheck:SetChecked(O.LinkGrpBuffCheck); SmartBuffOptionsFrame_cbLinkSelfBuffCheck:SetChecked(O.LinkSelfBuffCheck); - + SmartBuffOptionsFrame_cbScrollWheelUp:SetChecked(O.ScrollWheelUp); SmartBuffOptionsFrame_cbScrollWheelDown:SetChecked(O.ScrollWheelDown); SmartBuffOptionsFrame_cbInCombat:SetChecked(O.InCombat); @@ -3773,18 +3804,18 @@ function SMARTBUFF_Options_OnShow() SmartBuffOptionsFrame_cbMsgError:SetChecked(O.ToggleMsgError); SmartBuffOptionsFrame_cbHideMmButton:SetChecked(O.HideMmButton); SmartBuffOptionsFrame_cbHideSAButton:SetChecked(O.HideSAButton); - + SmartBuffOptionsFrameRebuffTimer:SetValue(O.RebuffTimer); SmartBuff_SetSliderText(SmartBuffOptionsFrameRebuffTimer, SMARTBUFF_OFT_REBUFFTIMER, O.RebuffTimer, INT_SPELL_DURATION_SEC); SmartBuffOptionsFrameBLDuration:SetValue(O.BlacklistTimer); SmartBuff_SetSliderText(SmartBuffOptionsFrameBLDuration, SMARTBUFF_OFT_BLDURATION, O.BlacklistTimer, INT_SPELL_DURATION_SEC); SMARTBUFF_SetCheckButtonBuffs(0); - + SmartBuffOptionsFrame_cbSelfFirst:SetChecked(B[CS()][currentTemplate].SelfFirst); - + SMARTBUFF_Splash_Show(); - + SMARTBUFF_AddMsgD("Option frame updated: " .. currentTemplate); end @@ -3806,7 +3837,7 @@ function SMARTBUFF_Options_OnHide() SmartBuffOptionsFrame:SetHeight(SMARTBUFF_OPTIONSFRAME_HEIGHT); --SmartBuff_BuffSetup:SetHeight(SMARTBUFF_OPTIONSFRAME_HEIGHT); wipe(cBuffsCombat); - SMARTBUFF_SetInCombatBuffs(); + SMARTBUFF_SetInCombatBuffs(); SmartBuff_BuffSetup:Hide(); SmartBuff_PlayerSetup:Hide(); SMARTBUFF_SetUnits(); @@ -3845,9 +3876,9 @@ function SmartBuffOptionsFrameSlider_OnLoad(self, low, high, step, labels) self:SetMinMaxValues(low, high); self:SetValueStep(step); self:SetStepsPerPage(step); - + if (step < 1) then return; end - + self.GetValueBase = self.GetValue; self.GetValue = function() local n = self:GetValueBase(); @@ -3859,7 +3890,7 @@ function SmartBuffOptionsFrameSlider_OnLoad(self, low, high, step, labels) return r; end return low; - end; + end; end function SmartBuff_SetSliderText(self, text, value, valformat, setval) @@ -3878,7 +3909,7 @@ function SmartBuff_BuffSetup_RBTime_OnValueChanged(self) _G[SmartBuff_BuffSetup_RBTime:GetName().."Text"]:SetText(WH..format("%.0f", self:GetValue()).."\nsec|r"); end -function SMARTBUFF_SetCheckButtonBuffs(mode) +function SMARTBUFF_SetCheckButtonBuffs(mode) local objS; local objG; local i = 1; @@ -3887,24 +3918,24 @@ function SMARTBUFF_SetCheckButtonBuffs(mode) if (mode == 0) then SMARTBUFF_SetBuffs(); end - + SmartBuffOptionsFrame_cbAntiDaze:Hide(); - - if (sPlayerClass == "HUNTER" or sPlayerClass == "ROGUE" or sPlayerClass == "WARRIOR") then + + if (sPlayerClass == "HUNTER" or sPlayerClass == "ROGUE" or sPlayerClass == "WARRIOR") then SmartBuffOptionsFrameBLDuration:Hide(); if (sPlayerClass == "HUNTER") then SmartBuffOptionsFrame_cbLinkGrpBuffCheck:Hide(); SmartBuffOptionsFrame_cbAntiDaze:Show(); end end - + if (sPlayerClass == "DRUID" or sPlayerClass == "SHAMAN") then SmartBuffOptionsFrame_cbInShapeshift:Show(); else SmartBuffOptionsFrame_cbInShapeshift:Hide(); end - - SMARTBUFF_BuffOrderOnScroll(); + + SMARTBUFF_BuffOrderOnScroll(); end @@ -3939,14 +3970,14 @@ end function SMARTBUFF_DropDownTemplate_OnClick(self) local i = self.value; local tmp = nil; - UIDropDownMenu_SetSelectedValue(SmartBuffOptionsFrame_ddTemplates, i); + UIDropDownMenu_SetSelectedValue(SmartBuffOptionsFrame_ddTemplates, i); tmp = SMARTBUFF_TEMPLATES[i]; --SMARTBUFF_AddMsgD("Selected/Current Buff-Template: " .. tmp .. "/" .. currentTemplate); if (currentTemplate ~= tmp) then SmartBuff_BuffSetup:Hide(); iLastBuffSetup = -1; SmartBuff_PlayerSetup:Hide(); - + currentTemplate = tmp; SMARTBUFF_Options_OnShow(); O.LastTemplate = currentTemplate; @@ -3957,7 +3988,7 @@ end -- Splash screen functions --------------------------------------------------------------------------------------- function SMARTBUFF_Splash_Show() - if (not isInit) then return; end + if (not isInit) then return; end SMARTBUFF_Splash_ChangeFont(1); SmartBuffSplashFrame:EnableMouse(true); SmartBuffSplashFrame:Show(); @@ -3966,7 +3997,7 @@ function SMARTBUFF_Splash_Show() end function SMARTBUFF_Splash_Hide() - if (not isInit) then return; end + if (not isInit) then return; end SMARTBUFF_Splash_Clear(); SMARTBUFF_Splash_ChangePos(); SmartBuffSplashFrame:EnableMouse(false); @@ -3989,9 +4020,9 @@ end function SMARTBUFF_Splash_ChangeFont(mode) local f = SmartBuffSplashFrame; - + if (mode > 1) then - SMARTBUFF_Splash_ChangePos(); + SMARTBUFF_Splash_ChangePos(); iCurrentFont = iCurrentFont + 1; end if (not cFonts[iCurrentFont]) then @@ -4000,7 +4031,7 @@ function SMARTBUFF_Splash_ChangeFont(mode) O.CurrentFont = iCurrentFont; f:ClearAllPoints(); f:SetPoint("TOPLEFT", O.SplashX, O.SplashY); - + local fo = f:GetFontObject(); local fName, fHeight, fFlags = _G[cFonts[iCurrentFont]]:GetFont(); if (mode > 1 or O.CurrentFontSize == nil) then @@ -4008,12 +4039,12 @@ function SMARTBUFF_Splash_ChangeFont(mode) end fo:SetFont(fName, O.CurrentFontSize, fFlags); SmartBuffSplashFrameOptions.size:SetValue(O.CurrentFontSize); - + f:SetInsertMode("TOP"); f:SetJustifyV("MIDDLE"); if (mode > 0) then local si = ""; - if (OG.SplashIcon) then + if (OG.SplashIcon) then local n = O.SplashIconSize; if (n == nil or n <= 0) then n = O.CurrentFontSize; @@ -4042,7 +4073,7 @@ end function SmartBuff_PS_GetList() if (iLastBuffSetup <= 0) then return { } end - + local name = cBuffs[iLastBuffSetup].BuffS; if (name) then if (iCurrentList == 1) then @@ -4083,7 +4114,7 @@ function SmartBuff_PS_Show(i) obj:ClearFocus(); SmartBuff_PlayerSetup_EditBox:ClearFocus(); SmartBuff_PlayerSetup:Show(); - SmartBuff_PS_SelectPlayer(0); + SmartBuff_PS_SelectPlayer(0); end function SmartBuff_PS_AddPlayer() @@ -4092,7 +4123,7 @@ function SmartBuff_PS_AddPlayer() if (un and UnitIsPlayer("target") and (UnitInRaid("target") or UnitInParty("target") or O.Debug)) then if (not cList[un]) then cList[un] = true; - SmartBuff_PS_SelectPlayer(0); + SmartBuff_PS_SelectPlayer(0); end end end @@ -4106,14 +4137,14 @@ function SmartBuff_PS_RemovePlayer() cList[player] = nil; break; end - end - SmartBuff_PS_SelectPlayer(0); + end + SmartBuff_PS_SelectPlayer(0); end function SmartBuff_AddToUnitList(idx, unit, subgroup) iCurrentList = idx; local cList = SmartBuff_PS_GetList(); - local cUnitList = SmartBuff_PS_GetUnitList(); + local cUnitList = SmartBuff_PS_GetUnitList(); if (unit and subgroup) then local un = UnitName(unit); if (un and cList[un]) then @@ -4127,19 +4158,19 @@ function SmartBuff_PS_SelectPlayer(iOp) local idx = iLastPlayer + iOp; local cList = SmartBuff_PS_GetList(); local s = ""; - + local tn = 0; for player in pairs(cList) do tn = tn + 1; s = s .. player .. "\n"; end - + -- update list in textbox if (iOp == 0) then SmartBuff_PlayerSetup_EditBox:SetText(s); --SmartBuff_PlayerSetup_EditBox:ClearFocus(); end - + -- highlight selected player if (tn > 0) then if (idx > tn) then idx = tn; end @@ -4164,7 +4195,7 @@ end function SmartBuff_PS_Resize() local h = SmartBuffOptionsFrame:GetHeight(); local b = true; - + if (h < 200) then SmartBuffOptionsFrame:SetHeight(SMARTBUFF_OPTIONSFRAME_HEIGHT); --SmartBuff_BuffSetup:SetHeight(SMARTBUFF_OPTIONSFRAME_HEIGHT); @@ -4174,7 +4205,7 @@ function SmartBuff_PS_Resize() --SmartBuff_BuffSetup:SetHeight(40); b = false; end - SmartBuff_ShowControls("SmartBuffOptionsFrame", b); + SmartBuff_ShowControls("SmartBuffOptionsFrame", b); if (b) then SMARTBUFF_SetCheckButtonBuffs(1); end @@ -4202,30 +4233,30 @@ end local lastBuffType = ""; function SMARTBUFF_OnPreClick(self, button, down) - if (not isInit) then return end + if (not isInit) then return end local mode = 0; if (button) then if (button == "MOUSEWHEELUP" or button == "MOUSEWHEELDOWN") then mode = 5; end end - + if (not InCombatLockdown()) then - + self:SetAttribute("type", nil); self:SetAttribute("unit", nil); self:SetAttribute("spell", nil); self:SetAttribute("item", nil); self:SetAttribute("macrotext", nil); - self:SetAttribute("target-slot", nil); + self:SetAttribute("target-slot", nil); self:SetAttribute("target-item", nil); self:SetAttribute("action", nil); - + end - + --sScript = self:GetScript("OnClick"); --self:SetScript("OnClick", SMARTBUFF_OnClick); - + local td; if (lastBuffType == "") then td = 0.8; @@ -4233,28 +4264,28 @@ function SMARTBUFF_OnPreClick(self, button, down) td = GlobalCd; end --SMARTBUFF_AddMsgD("Last buff type: " .. lastBuffType .. ", set cd: " .. td); - + if (UnitCastingInfo("player")) then --print("Channeling...reset AutoBuff timer"); tAutoBuff = GetTime() + 0.7; return; end - + if (GetTime() < (tAutoBuff + td)) then return end - + --SMARTBUFF_AddMsgD("next buff check"); tAutoBuff = GetTime(); lastBuffType = ""; currentUnit = nil; - currentSpell = nil; - + currentSpell = nil; + if (not InCombatLockdown()) then local ret, actionType, spellName, slot, unit, buffType = SMARTBUFF_Check(mode); if (ret and ret == 0 and actionType and spellName and unit) then lastBuffType = buffType; self:SetAttribute("type", actionType); self:SetAttribute("unit", unit); - if (actionType == SMARTBUFF_ACTION_SPELL) then + if (actionType == SMARTBUFF_ACTION_SPELL) then if (slot and slot > 0 and unit == "player") then self:SetAttribute("type", "macro"); self:SetAttribute("macrotext", string.format("/use %s\n/use %i\n/click StaticPopup1Button1", spellName, slot)); @@ -4263,12 +4294,12 @@ function SMARTBUFF_OnPreClick(self, button, down) else self:SetAttribute("spell", spellName); end - + if (cBuffIndex[spellName]) then currentUnit = unit; currentSpell = spellName; end - + elseif (actionType == SMARTBUFF_ACTION_ITEM and slot) then self:SetAttribute("item", spellName); if (slot > 0) then @@ -4280,7 +4311,7 @@ function SMARTBUFF_OnPreClick(self, button, down) else SMARTBUFF_AddMsgD("Preclick: not supported actiontype -> " .. actionType); end - + --isClearSplash = true; tLastCheck = GetTime() - O.AutoTimer + GlobalCd; end @@ -4288,7 +4319,7 @@ function SMARTBUFF_OnPreClick(self, button, down) end function SMARTBUFF_OnPostClick(self, button, down) - if (not isInit) then return end + if (not isInit) then return end if (button) then if (button == "MOUSEWHEELUP") then CameraZoomIn(1); @@ -4296,9 +4327,9 @@ function SMARTBUFF_OnPostClick(self, button, down) CameraZoomOut(1); end end - + if (InCombatLockdown()) then return end - + self:SetAttribute("type", nil); self:SetAttribute("unit", nil); self:SetAttribute("spell", nil); @@ -4307,16 +4338,16 @@ function SMARTBUFF_OnPostClick(self, button, down) self:SetAttribute("target-item", nil); self:SetAttribute("macrotext", nil); self:SetAttribute("action", nil); - + SMARTBUFF_SetButtonTexture(SmartBuff_KeyButton, imgSB); - + --SMARTBUFF_AddMsgD("Button reseted, " .. button); --self:SetScript("OnClick", sScript); end function SMARTBUFF_SetButtonTexture(button, texture, text) --if (InCombatLockdown()) then return; end - + if (button and texture and texture ~= sLastTexture) then sLastTexture = texture; button:SetNormalTexture(texture); @@ -4337,41 +4368,41 @@ function SMARTBUFF_CheckMiniMapButton() else SmartBuff_MiniMapButton:SetNormalTexture(imgIconOff); end - + if (O.HideMmButton) then SmartBuff_MiniMapButton:Hide(); else SmartBuff_MiniMapButton:Show(); end - + -- Update the Titan Panel icon if (TitanPanelBarButton and TitanPanelSmartBuffButton_SetIcon ~= nil) then TitanPanelSmartBuffButton_SetIcon(); end - + -- Update the FuBar icon if (IsAddOnLoaded("FuBar") and IsAddOnLoaded("FuBar_SmartBuffFu") and SMARTBUFF_Fu_SetIcon ~= nil) then SMARTBUFF_Fu_SetIcon(); end - + -- Update the Broker icon if (IsAddOnLoaded("Broker_SmartBuff") and SMARTBUFF_BROKER_SetIcon ~= nil) then SMARTBUFF_BROKER_SetIcon(); end - + end function SMARTBUFF_MinimapButton_CheckPos() if (not isInit or not SmartBuff_MiniMapButton) then return; end local x = SmartBuff_MiniMapButton:GetLeft(); - local y = SmartBuff_MiniMapButton:GetTop(); + local y = SmartBuff_MiniMapButton:GetTop(); if (x == nil or y == nil) then return; end x = x - Minimap:GetLeft(); - y = y - Minimap:GetTop(); + y = y - Minimap:GetTop(); if (math.abs(x) < 180 and math.abs(y) < 180) then O.MMCPosX = x; O.MMCPosY = y; - --SMARTBUFF_AddMsgD("x = " .. O.MMCPosX .. ", y = " .. O.MMCPosY); + --SMARTBUFF_AddMsgD("x = " .. O.MMCPosX .. ", y = " .. O.MMCPosY); end end @@ -4392,13 +4423,13 @@ self:ClearAllPoints() pos = math.deg(math.atan2(ypos,xpos)); r = math.sqrt(xpos*xpos + ypos*ypos); --SMARTBUFF_AddMsgD("x = " .. xpos .. ", y = " .. ypos .. ", r = " .. r .. ", pos = " .. pos); - + if (r < 75) then r = 75; elseif(r > 105) then r = 105; end - + xpos = 52-r*cos(pos); ypos = r*sin(pos)-52; O.MMCPosX = xpos; @@ -4441,11 +4472,11 @@ local function CreateScrollButton(name, parent, cBtn, onClick, onDragStop) --btn:RegisterForClicks("LeftButtonUp"); btn:SetScript("OnClick", onClick); -- btn:SetScript("OnMouseUp", onClick); - + if (onDragStop ~= nil) then btn:SetMovable(true); btn:RegisterForDrag("LeftButton"); - btn:SetScript("OnDragStart", function(self, b) + btn:SetScript("OnDragStart", function(self, b) StartY = self:GetTop(); self:StartMoving(); end @@ -4466,7 +4497,7 @@ local function CreateScrollButton(name, parent, cBtn, onClick, onDragStop) --text:SetAllPoints(btn); text:SetPoint("TOPLEFT", btn, "TOPLEFT", ScrBtnSize, 0); text:SetWidth(parent:GetWidth()-ScrBtnSize); - text:SetHeight(ScrBtnSize); + text:SetHeight(ScrBtnSize); btn:SetFontString(text); btn:SetHighlightFontObject("GameFontHighlight"); @@ -4475,7 +4506,7 @@ local function CreateScrollButton(name, parent, cBtn, onClick, onDragStop) highlight:SetPoint("TOPLEFT", btn, "TOPLEFT", 0, -2); highlight:SetWidth(parent:GetWidth()); highlight:SetHeight(ScrLineHeight-3); - + highlight:SetTexture("Interface/QuestFrame/UI-QuestTitleHighlight"); btn:SetHighlightTexture(highlight); @@ -4497,13 +4528,13 @@ end local function OnScroll(self, cData, sBtnName) local num = #cData; local n, numToDisplay; - + if (num <= maxScrollButtons) then numToDisplay = num-1; else numToDisplay = maxScrollButtons; end - + FauxScrollFrame_Update(self, num, floor(numToDisplay/3+0.5), ScrLineHeight); local t = B[CS()][CT()]; for i = 1, maxScrollButtons, 1 do @@ -4512,7 +4543,7 @@ local function OnScroll(self, cData, sBtnName) if (btn) then if (n <= num) then btn:SetNormalFontObject("GameFontNormalSmall"); - btn:SetHighlightFontObject("GameFontHighlightSmall"); + btn:SetHighlightFontObject("GameFontHighlightSmall"); btn:SetText(cData[n]); btn:SetChecked(t[cData[n]].EnableS); btn:Show(); @@ -4534,11 +4565,11 @@ function SMARTBUFF_BuffOrderOnScroll(self, arg1) cScrBtnBO = { }; CreateScrollButtons(self, cScrBtnBO, name, SMARTBUFF_BuffOrderBtnOnClick, SMARTBUFF_BuffOrderBtnOnDragStop); end - + if (B[CS()].Order == nil) then B[CS()].Order = { }; - end - + end + local t = { }; for _, v in pairs(B[CS()].Order) do if (v) then @@ -4554,7 +4585,7 @@ function SMARTBUFF_BuffOrderBtnOnClick(self, button) --SMARTBUFF_AddMsgD("Buff OnClick = "..n..", "..button); if (button == "LeftButton") then SMARTBUFF_OToggleBuff("S", i); - else + else SmartBuff_BuffSetup_Show(i); end end @@ -4584,13 +4615,13 @@ local HelpPlateList = { function SMARTBUFF_ToggleTutorial(close) local helpPlate = HelpPlateList; if (not helpPlate) then return end; - + local b = HelpPlate_IsShowing(helpPlate); if (close) then HelpPlate_Hide(false); return; end - + if (not b) then HelpPlate_Show(helpPlate, SmartBuffOptionsFrame, SmartBuffOptionsFrame_TutorialButton, true); else diff --git a/SmartBuff.toc b/SmartBuff.toc index 48d6ccc..2feb7b2 100644 --- a/SmartBuff.toc +++ b/SmartBuff.toc @@ -1,7 +1,8 @@ ## Interface: 100002 ## Title: SmartBuff |cffffffff(Retail)|r by |cff00ff00Codermik & Aeldra|r -## Version: 15.100002 +## Version: 16.100002 ## Author: |cff20d2ffCodermik & Aeldra|r (EU-Proudmoore) +## Contributing Author: |cff20d2ffSpeedwaystar ## Notes: Cast the most important buffs on you or party/raid members/pets. Use /sbm for options menu. ## DefaultState: Enabled ## LoadOnDemand: 0 diff --git a/SmartBuff.xml b/SmartBuff.xml index 322e23d..2a38020 100644 --- a/SmartBuff.xml +++ b/SmartBuff.xml @@ -52,7 +52,7 @@ - + @@ -3114,7 +3114,7 @@ - + diff --git a/localization.en.lua b/localization.en.lua index 3496eb6..182350e 100644 --- a/localization.en.lua +++ b/localization.en.lua @@ -4,13 +4,45 @@ -- Whats new info SMARTBUFF_WHATSNEW = "\n\n|cffffffff Whats new:|r\n\n" - .." |cffffffffDragonflight version by Codermik.|cff00e0ff\n\n\n" - .." Changes in r15.191222:\n\n" - .." * Added Warlock's Inquisitor's Gaze.\n\n" - .."\n\n" + .." |cffffffffDragonflight version by Codermik.\n" + .." (+Speedwaystar)|cff00e0ff\n\n\n" + .." Changes in r16beta.080123:\n\n" + .." + Initial support for buff quality tiers.\n\n" + .." + Dragonflight meals.\n" + .." Timely Demise, Filet of Fangs,\n" + .." Seamoth Surprise meal, Salt-Baked Fishcake,\n" + .." Feisty Fish Sticks, Aromatic Seafood Platter,\n" + .." Sizzling Seafood Medley, Revenge Served Cold,\n" + .." Thousandbone Tongueslicer,\n" + .." Great Cerulean Sea, Fated Fortune Cookie.\n\n" + .." + Dragonflight feasts.\n" + .." Grand Banquet of the Kalu'ak,\n" + .." Hoard of Draconic Delicacies.\n\n" + .." + Dragonflight runes.\n" + .." Draconic Augment Rune,\n" + .." Vault of the Incarnates vantus rune.\n\n" + .." + Dragonflight weapon buffs.\n" + .." Buzzing Rune, Chirping Rune, Howling Rune,\n" + .." Primal Weightstone, Primal Whetstone,\n" + .." Completely Safe Rockets.\n\n" + .." + Dragonflight Phials.\n" + .." Eye in the Storm, Still Air, Icy Preservation,\n" + .." Corrupting Rage, Charged Isolation,\n" + .." Glacial Fury, Static Empowerment, Versatility,\n" + .." Deftness, Finesse, Alacrity, Perception,\n" + .." Elemental Chaos, Quick Hands\n\n" + .." + Hunter and Warlock pets.\n\n" + .." + New toys:\n" + .." Wayfarer's Compass, Golden Dragon Goblet,\n" + .." Lucky Duck.\n\n" + .." - REMOVED: obsolete smart groups.\n\n" + .." + New smart groups.\n" + .." LFR, Mythic Keystones,\n" + .." Castle Nathria, Sanctum of Domination,\n" + .." Sepulcher of the First Ones,\n" + .." Vault of the Incarnates.\n\n\n\n" .." |c0000FF96Many thanks to Chris S. and Samantha R. for\n" - .." their very kind donations - thanks a lot.\n\n" - .."\n\n" + .." their very kind donations - thanks a lot.\n" ; SMARTBUFF_CREDITS = "|cffffffff" @@ -23,7 +55,7 @@ SMARTBUFF_CREDITS = "|cffffffff" ; -- Weapon types -SMARTBUFF_WEAPON_STANDARD = {"Daggers", "Axes", "Swords", "Maces", "Staves", "Fist Weapons", "Polearms", "Thrown"}; +SMARTBUFF_WEAPON_STANDARD = {"Daggers", "Axes", "Swords", "Maces", "Staves", "Fist Weapons", "Polearms", "Thrown", "Crossbows", "Bows"}; SMARTBUFF_WEAPON_BLUNT = {"Maces", "Staves", "Fist Weapons"}; SMARTBUFF_WEAPON_BLUNT_PATTERN = "Weightstone$"; SMARTBUFF_WEAPON_SHARP = {"Daggers", "Axes", "Swords", "Polearms"}; @@ -41,9 +73,8 @@ SMARTBUFF_UNDEAD = "Undead"; SMARTBUFF_CLASSES = {"Druid", "Hunter", "Mage", "Paladin", "Priest", "Rogue", "Shaman", "Warlock", "Warrior", "Death Knight", "Monk", "Demon Hunter", "Evoker", "Hunter Pet", "Warlock Pet", "Death Knight Pet", "Tank", "Healer", "Damage Dealer"}; -- Templates and Instances -SMARTBUFF_TEMPLATES = {"Solo", "Party", "Raid", "Battleground", "Arena", "ICC", "TOC", "Ulduar", "MC", "Ony", "BWL", "Naxx", "AQ", "ZG", "Custom 1", "Custom 2", "Custom 3", "Custom 4", "Custom 5"}; -SMARTBUFF_INSTANCES = {"Icecrown Citadel", "Trial of the Crusader", "Ulduar", "Molten Core", "Onyxia's Lair", "Blackwing Lair", "Naxxramas", "Ahn'Qiraj", "Zul'Gurub"}; - +SMARTBUFF_TEMPLATES = {"Solo", "Party", "LFR", "Raid", "Mythic Keystone", "Battleground", "Arena", "Castle Nathria", "Sanctum of Domination", "Sepulcher of the First Ones", "Vault of the Incarnates", "Custom 1", "Custom 2", "Custom 3", "Custom 4", "Custom 5"}; +SMARTBUFF_INSTANCES = {"Castle Nathria", "Sanctum of Domination", "Sepulcher of the First Ones", "Vault of the Incarnates"}; -- Mount SMARTBUFF_MOUNT = "Increases speed by (%d+)%%."; @@ -224,7 +255,7 @@ SMARTBUFF_DEBUFF_TT = "Shift-Left drag: Move frame\n|cff20d2ff- S butto -- ä : \195\164 ñ : \195\177 ö : \195\182 -- æ : \195\166 ø : \195\184 -- ç : \195\167 œ : \197\147 --- +-- -- Ä : \195\132 -- Ö : \195\150 -- Ü : \195\156 From 4ee7030240a239ea2b29c51dec23855239bd3584 Mon Sep 17 00:00:00 2001 From: speedwaystar Date: Mon, 9 Jan 2023 19:48:45 +0800 Subject: [PATCH 02/12] fix broker icon toggle --- SmartBuff.lua | 3 --- 1 file changed, 3 deletions(-) diff --git a/SmartBuff.lua b/SmartBuff.lua index 8838f9d..2df570a 100644 --- a/SmartBuff.lua +++ b/SmartBuff.lua @@ -4386,10 +4386,7 @@ function SMARTBUFF_CheckMiniMapButton() end -- Update the Broker icon - if (IsAddOnLoaded("Broker_SmartBuff") and SMARTBUFF_BROKER_SetIcon ~= nil) then SMARTBUFF_BROKER_SetIcon(); - end - end function SMARTBUFF_MinimapButton_CheckPos() From df8ba0ec7dc748e0f7b65607e304655b98186ca1 Mon Sep 17 00:00:00 2001 From: speedwaystar Date: Mon, 9 Jan 2023 20:16:06 +0800 Subject: [PATCH 03/12] weapon buffs default to mainHand enabled --- SmartBuff.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SmartBuff.lua b/SmartBuff.lua index 2df570a..a40c07e 100644 --- a/SmartBuff.lua +++ b/SmartBuff.lua @@ -281,7 +281,7 @@ local function InitBuffSettings(cBI, reset) cBuff.SelfNot = false; cBuff.CIn = false; cBuff.COut = true; - cBuff.MH = false; + cBuff.MH = true; -- default to checked cBuff.OH = false; cBuff.RH = false; cBuff.Reminder = true; From a1aa3826c89f749bd397c61a53e78718487979f4 Mon Sep 17 00:00:00 2001 From: speedwaystar Date: Mon, 9 Jan 2023 20:24:39 +0800 Subject: [PATCH 04/12] Version change triggers a BuffOrderReset() --- SmartBuff.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/SmartBuff.lua b/SmartBuff.lua index a40c07e..6e9ed70 100644 --- a/SmartBuff.lua +++ b/SmartBuff.lua @@ -3165,6 +3165,7 @@ function SMARTBUFF_Options_Init(self) if (O.VersionNr == nil or O.VersionNr < SMARTBUFF_VERSIONNR) then O.VersionNr = SMARTBUFF_VERSIONNR; SMARTBUFF_SetBuffs(); + SMARTBUFF_BuffOrderReset(); InitBuffOrder(true); print("Upgraded SmartBuff to "..SMARTBUFF_VERSION); end @@ -3187,6 +3188,7 @@ function SMARTBUFF_Options_Init(self) SmartBuffWNF_lblText:SetText(SMARTBUFF_WHATSNEW); SmartBuffWNF:Show(); + else SMARTBUFF_SetBuffs(); end From 19c6b5000fc94236acf5fb9d1284205b42c48eb0 Mon Sep 17 00:00:00 2001 From: speedwaystar Date: Mon, 9 Jan 2023 22:00:29 +0800 Subject: [PATCH 05/12] added slashcommands: /sb changes, /sb reload Signed-off-by: speedwaystar --- SmartBuff.lua | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/SmartBuff.lua b/SmartBuff.lua index 6e9ed70..3674572 100644 --- a/SmartBuff.lua +++ b/SmartBuff.lua @@ -420,6 +420,7 @@ function SMARTBUFF_OnLoad(self) SLASH_SMARTBUFF1 = "/sbo"; SLASH_SMARTBUFF2 = "/sbuff"; SLASH_SMARTBUFF3 = "/smartbuff"; + SLASH_SMARTBUFF3 = "/sb"; SlashCmdList["SMARTBUFFMENU"] = SMARTBUFF_OptionsFrame_Toggle; SLASH_SMARTBUFFMENU1 = "/sbm"; @@ -3165,7 +3166,6 @@ function SMARTBUFF_Options_Init(self) if (O.VersionNr == nil or O.VersionNr < SMARTBUFF_VERSIONNR) then O.VersionNr = SMARTBUFF_VERSIONNR; SMARTBUFF_SetBuffs(); - SMARTBUFF_BuffOrderReset(); InitBuffOrder(true); print("Upgraded SmartBuff to "..SMARTBUFF_VERSION); end @@ -3177,6 +3177,7 @@ function SMARTBUFF_Options_Init(self) if (OG.FirstStart == nil) then OG.FirstStart = "V0"; end SMARTBUFF_Splash_ChangeFont(0); + SMARTBUFF_BuffOrderReset(); if (OG.FirstStart ~= SMARTBUFF_VERSION) then OG.FirstStart = SMARTBUFF_VERSION; SMARTBUFF_OptionsFrame_Open(true); @@ -3360,7 +3361,13 @@ function SMARTBUFF_command(msg) --SMARTBUFF_AddMsg("Modified: " .. spellname, true); -- **************************************************** -- **************************************************** - + elseif (msg == "changes") then + SMARTBUFF_OptionsFrame_Open(true); + SmartBuffWNF_lblText:SetText(SMARTBUFF_WHATSNEW); + SmartBuffWNF:Show(); + elseif (msg == "reload") then + SMARTBUFF_BuffOrderReset(); + SMARTBUFF_OptionsFrame_Open(true); else --SMARTBUFF_Check(0); SMARTBUFF_AddMsg(SMARTBUFF_VERS_TITLE, true); @@ -3373,6 +3380,8 @@ function SMARTBUFF_command(msg) SMARTBUFF_AddMsg("rafp - " .. "Reset all frame positions", true); SMARTBUFF_AddMsg("sync - " .. "Sync buff timers with UI", true); SMARTBUFF_AddMsg("rb - " .. "Reset key/mouse bindings", true); + SMARTBUFF_AddMsg("changes - " .. "Display changelog", true); + SMARTBUFF_AddMsg("reload - " .. "Reset buff list", true) end end -- END SMARTBUFF_command From ebbee7fb7c8d76b1c1055445ca2ee1ca9344b59c Mon Sep 17 00:00:00 2001 From: speedwaystar Date: Mon, 9 Jan 2023 22:11:10 +0800 Subject: [PATCH 06/12] helper functions: enum(t), dict(t), tinvert(t), switch(case), printd(...), printf(f,...), dump(t, startkey) --- SmartBuff.globals.lua | 153 +++++++++++++++++++++++++++++++++++------- 1 file changed, 128 insertions(+), 25 deletions(-) diff --git a/SmartBuff.globals.lua b/SmartBuff.globals.lua index 7512d1c..c5d3ef2 100644 --- a/SmartBuff.globals.lua +++ b/SmartBuff.globals.lua @@ -21,34 +21,137 @@ SMARTBUFF_CONST_AUTOSOUND = "Deathbind Sound"; --SMARTBUFF_CONST_AUTOSOUND = "GLUECREATECHARACTERBUTTON"; --[[ -SystemFont -GameFontNormal -GameFontNormalSmall -GameFontNormalLarge -GameFontHighlight -GameFontHighlightSmall -GameFontHighlightSmallOutline -GameFontHighlightLarge -GameFontDisable -GameFontDisableSmall -GameFontDisableLarge -GameFontGreen -GameFontGreenSmall -GameFontGreenLarge -GameFontRed -GameFontRedSmall -GameFontRedLarge -GameFontWhite -GameFontDarkGraySmall -NumberFontNormalYellow -NumberFontNormalSmallGray -QuestFontNormalSmall +SystemFont +GameFontNormal +GameFontNormalSmall +GameFontNormalLarge +GameFontHighlight +GameFontHighlightSmall +GameFontHighlightSmallOutline +GameFontHighlightLarge +GameFontDisable +GameFontDisableSmall +GameFontDisableLarge +GameFontGreen +GameFontGreenSmall +GameFontGreenLarge +GameFontRed +GameFontRedSmall +GameFontRedLarge +GameFontWhite +GameFontDarkGraySmall +NumberFontNormalYellow +NumberFontNormalSmallGray +QuestFontNormalSmall DialogButtonHighlightText -ErrorFont -TextStatusBarText -CombatLogFont +ErrorFont +TextStatusBarText +CombatLogFont NumberFontNormalLarge NumberFontNormalHuge ]]-- +---------------------------------------------------------------------------- +-- Creates a table `t` indexed by both sequentially numbered `keys` _and_ `values`, +-- thus supporting reverse lookup. Assumes numeric 'keys' and alphanumeric 'valuee'. +-- ## Example +-- ```lua +-- t = enum( "foo", "bar" ); +-- print(t.hello) -- prints the integer 1 +-- print(t[1]) -- prints the string "foo" +-- ``` +---@param t table +---@return table +function enum(t) + for i = 1, #t do + local v = t[i] + --t[i] = nil + t[v] = i + end + return t +end + +-- Creates a table `t` of self-indexed values +-- ## Example +-- ```lua +-- t = dict( "foo", "bar") +-- print(t.foo) -- prints the string "foo" +-- ``` +---@param list table +---@return table +function dict(list) + for k, v in pairs(list) do + list[k] = nil + list[v] = v + end + return list +end + +-- Returns a copy of `list` with `keys` and `values` inverted +-- ## Example +---``` +---t = { "foo" = 1, "bar" = 2}; +---s = tinvert(t); +---print(t.foo); -- prints the number 1 +---print(s[1]); -- prints the string "foo"; +---``` +---@generic T +---@param list T[] +---@return T out +function table.invert(list) + local out = {} + for k, v in pairs(list) do + out[v] = k + end + return out +end + +local Default, Nil = {}, function () end -- for uniqueness +---@param case any +---@return any +-- Implements a `switch` statement in Lua. +-- ## Example +-- ``` +-- switch(case) = { +-- [1] = function() print("one") end, +-- [2] = print, +-- [3] = math.sin, +-- default = function() print("default") end, +-- } +-- ``` +function switch (case) + return setmetatable({ case }, { + __call = function (t, cases) + local item = #t == 0 and Nil or t[1] + return (cases[item] or cases[Default] or Nil) + end + }) +end + +-- Prints debuggin information using a formatted version of its variable +-- number of arguments following the description given in its first argument. +--- +---[View documents](command:extension.lua.doc?["en-us/51/manual.html/pdf-string.format"]) +---@param s any +---@param ... any +function printf(s, ...) + print(" ",addonName,"::",string.format(s, ...)) +end + +-- Prints debug information to `stdout`. Receives any number of arguments, +-- converting each argument to a string following the same rules of +-- [tostring](command:extension.lua.doc?["en-us/51/manual.html/pdf-tostring"]). +--- +--- [View documents](command:extension.lua.doc?["en-us/51/manual.html/pdf-print"]) +--- +function printd(...) + print(" ",addonName,"::",...) +end + +--- Prints the value of any global variable, table value, frame, function result, or any valid Lua expression. Output is color coded for easier reading. Tables display up to 30 values, the rest are skipped and a message is shown. +---@param t any +---@param startkey? any +function dump(t, startkey) + DevTools_Dump(t, startkey) +end From a6b941c07d6a84abf4bc9ffe0bedecb4c51f1d89 Mon Sep 17 00:00:00 2001 From: speedwaystar Date: Fri, 13 Jan 2023 00:21:47 +0800 Subject: [PATCH 07/12] adjusted scrollbar height --- SmartBuff.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SmartBuff.xml b/SmartBuff.xml index 2a38020..bde154e 100644 --- a/SmartBuff.xml +++ b/SmartBuff.xml @@ -1418,7 +1418,7 @@ - + From e95be75194cf98566f66788d5ed9aae15f38b474 Mon Sep 17 00:00:00 2001 From: speedwaystar Date: Fri, 13 Jan 2023 19:12:46 +0800 Subject: [PATCH 08/12] updated enumeration utility functions Signed-off-by: speedwaystar --- SmartBuff.globals.lua | 63 ++++++++++++++++++++++++------------------- 1 file changed, 36 insertions(+), 27 deletions(-) diff --git a/SmartBuff.globals.lua b/SmartBuff.globals.lua index c5d3ef2..df030da 100644 --- a/SmartBuff.globals.lua +++ b/SmartBuff.globals.lua @@ -53,39 +53,49 @@ NumberFontNormalHuge ---------------------------------------------------------------------------- --- Creates a table `t` indexed by both sequentially numbered `keys` _and_ `values`, --- thus supporting reverse lookup. Assumes numeric 'keys' and alphanumeric 'valuee'. --- ## Example --- ```lua --- t = enum( "foo", "bar" ); --- print(t.hello) -- prints the integer 1 --- print(t[1]) -- prints the string "foo" --- ``` ----@param t table +-- Returns an unumerated table. +---## Example +---``` +---Enum.Animals = Enum.MakeEnum ( "Dog", "Cat", "Rabbit" ) +---print( Enum.Animals.Cat ) -- prints "Cat" +---``` +---@param ... ... ---@return table -function enum(t) - for i = 1, #t do - local v = t[i] - --t[i] = nil - t[v] = i +function Enum.MakeEnum(...) + return tInvert({...}) + -- for i = 1, #t do + -- local v = t[i] + -- --t[i] = nil + -- t[v] = i + -- end + -- return t end - return t + +-- Returns an unumerated table from an existing table. +---## Example +---``` +---Fish = { "Loach", "Pike", "Herring" } +---Enum.Fish = Enum.MakeEnumFromTable(Fish) +---print(Enum.Fish.Herring) -- prints "Herring" +---``` +function Enum.MakeEnumFromTable(t) + return tInvert(t) end --- Creates a table `t` of self-indexed values +-- Returns a table `t` of self-indexed values -- ## Example -- ```lua -- t = dict( "foo", "bar") -- print(t.foo) -- prints the string "foo" -- ``` ----@param list table +---@param tbl table ---@return table -function dict(list) - for k, v in pairs(list) do - list[k] = nil - list[v] = v +function Enum.MakeDict(tbl) + local t = {}; + for k, v in ipairs(tbl) do + t[v] = v; end - return list + return t; end -- Returns a copy of `list` with `keys` and `values` inverted @@ -96,12 +106,11 @@ end ---print(t.foo); -- prints the number 1 ---print(s[1]); -- prints the string "foo"; ---``` ----@generic T ----@param list T[] ----@return T out -function table.invert(list) +---@param tbl table +---@return table out +function table.invert(tbl) local out = {} - for k, v in pairs(list) do + for k, v in pairs(tbl) do out[v] = k end return out From d3755497f137aaba5c361329a168d3b69ce63ca4 Mon Sep 17 00:00:00 2001 From: speedwaystar Date: Fri, 13 Jan 2023 19:18:24 +0800 Subject: [PATCH 09/12] added .vscode metafiles to repository for convenience --- .vscode/settings.json | 110 +++++++++++++++++++++++++++++++++++++++ SmartBuff.code-workspace | 16 ++++++ 2 files changed, 126 insertions(+) create mode 100644 .vscode/settings.json create mode 100644 SmartBuff.code-workspace diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..31fe11c --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,110 @@ +{ + "Lua.diagnostics.globals": [ + "switch", + "tinsert", + "ceil", + "enum", + "dict", + "dictionary", + "myprint", + "printd", + "getValueFromKey", + "keyFromValue", + "valueToKey", + "test", + "keys", + "__key", + "tprint", + "tfindKey", + "tfindkey", + "printf", + "SmartBuff_KeyButton", + "SmartBuffOptionsFrame", + "SmartBuffSplashFrame", + "Parrot", + "LootFrame", + "SmartBuffTooltip", + "NUM_BAG_FRAMES", + "EarthFeature_AddButton", + "Cosmos_RegisterButton", + "SmartBuff_MiniMapButton", + "SmartBuffWNF_lblText", + "SmartBuffWNF", + "SmartBuffFrame", + "SmartBuff_BuffSetup", + "SmartBuff_PlayerSetup", + "SmartBuffOptionsCredits_lblText", + "SmartBuff_BuffSetup_BuffIcon2", + "SmartBuff_BuffSetup_BuffIcon1", + "SmartBuff_BuffSetup_cbSelf", + "SmartBuff_BuffSetup_cbSelfNot", + "SmartBuff_BuffSetup_cbCombatIn", + "SmartBuff_BuffSetup_cbCombatOut", + "SmartBuff_BuffSetup_cbMH", + "SmartBuff_BuffSetup_cbOH", + "SmartBuff_BuffSetup_cbReminder", + "SmartBuff_BuffSetup_cbRH", + "SmartBuff_BuffSetup_txtManaLimit", + "SmartBuff_BuffSetup_RBTime", + "SmartBuff_BuffSetup_btnPriorityList", + "SmartBuff_BuffSetup_btnIgnoreList", + "SmartBuff_BuffSetup_BuffText", + "SmartBuffOptionsFrame_cbSB", + "SmartBuffOptionsFrame_cbAuto", + "SmartBuffOptionsFrameAutoTimer", + "SmartBuffOptionsFrame_cbAutoCombat", + "SmartBuffOptionsFrame_cbAutoChat", + "SmartBuffOptionsFrame_cbAutoSplash", + "SmartBuffOptionsFrame_cbAutoSound", + "SmartBuffOptionsFrame_cbAutoSwitchTmp", + "SmartBuffOptionsFrame_cbBuffTarget", + "SmartBuffOptionsFrame_cbBuffPvP", + "SmartBuffOptionsFrame_cbAutoSwitchTmpInst", + "SmartBuffOptionsFrame_cbBuffInCities", + "SmartBuffOptionsFrame_cbInShapeshift", + "SmartBuffOptionsFrame_cbFixBuffIssue", + "SmartBuffOptionsFrame_cbAntiDaze", + "SmartBuffOptionsFrame_cbLinkSelfBuffCheck", + "SmartBuffOptionsFrame_cbLinkGrpBuffCheck", + "SmartBuffOptionsFrame_cbScrollWheelUp", + "SmartBuffOptionsFrame_cbScrollWheelDown", + "SmartBuffOptionsFrame_cbMsgNormal", + "SmartBuffOptionsFrame_cbMsgError", + "SmartBuffOptionsFrame_cbInCombat", + "SmartBuffOptionsFrame_cbIncludeToys", + "SmartBuffOptionsFrame_cbMsgWarning", + "SmartBuffOptionsFrame_cbHideMmButton", + "SmartBuffOptionsFrame_cbHideSAButton", + "SmartBuffOptionsFrameRebuffTimer", + "SmartBuffOptionsFrameBLDuration", + "SmartBuffOptionsFrame_cbSelfFirst", + "UIDropDownMenu_Initialize", + "UIDropDownMenu_SetSelectedValue", + "UIDropDownMenu_SetWidth", + "SmartBuffOptionsFrame_ddTemplates", + "UIDropDownMenu_CreateInfo", + "UIDropDownMenu_AddButton", + "SmartBuffSplashFrameOptions", + "SmartBuff_PlayerSetup_EditBox", + "SmartBuff_PlayerSetup_Title", + "TitanPanelBarButton", + "TitanPanelSmartBuffButton_SetIcon", + "SMARTBUFF_Fu_SetIcon", + "SmartBuffOptionsFrame_ScrollFrameBuffs", + "dump", + "ALL", + "SmartBuffOptionsFrame_TutorialButton", + "FauxScrollFrame_Update", + "HelpPlate_IsShowing", + "HelpPlate_Hide", + "HelpPlate_Show" + ], + "Lua.diagnostics.disable": [ + // "unused-function", + "need-check-nil", + "cast-local-type", + // "undefined-field", + // "param-type-mismatch" + ], + "explorer.excludeGitIgnore": true +} \ No newline at end of file diff --git a/SmartBuff.code-workspace b/SmartBuff.code-workspace new file mode 100644 index 0000000..69522b4 --- /dev/null +++ b/SmartBuff.code-workspace @@ -0,0 +1,16 @@ +{ + "folders": [ + { + "path": "." + }, + { + "path": "Libs" + }, + { + "path": "../../_WoW_API" + } + ], + "settings": { + "todo-tree.tree.scanMode": "workspace only" + } +} \ No newline at end of file From 51cafbb7a7c29226e5ffcb530c93998a5e13546c Mon Sep 17 00:00:00 2001 From: speedwaystar Date: Fri, 13 Jan 2023 19:19:30 +0800 Subject: [PATCH 10/12] added changelog.txt, again for convenience --- changelog.txt | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 changelog.txt diff --git a/changelog.txt b/changelog.txt new file mode 100644 index 0000000..bc6292c --- /dev/null +++ b/changelog.txt @@ -0,0 +1,71 @@ +development (alpha) branch + +* rewrite to use itemID instead of itemLink, still WIP +* extensive code refactoring, still WIP +* added WoW API meta support for sumneko's VS CODE lua-language-server which provides intellisense, snippets, dynamic type checking, diagnostics, syntax checking, autocompletion, code formatting and hover to view details on variables and functions. + +main (stable) branch + +* all items use itemLinks instead of plaintext itemNames +* FOOD: added Timely Demise (70 Haste) +* FOOD: added Filet of Fangs (70 Crit) +* FOOD: added Seamoth Surprise (70 Vers) +* FOOD: added Salt-Baked Fishcake (70 Mastery) +* FOOD: added Feisty Fish Sticks (45 Haste/Crit) +* FOOD: added Aromatic Seafood Platter (45 Haste/Vers) +* FOOD: added Sizzling Seafood Medley (45 Haste/Mastery) +* FOOD: added Revenge, Served Cold (45 Crit/Verst) +* FOOD: added Thousandbone Tongueslicer (45 Crit/Mastery) +* FOOD: added Great Cerulean Sea (45 Vers/Mastery) +* FOOD: added Fated Fortune Cookie (76 primary stat) +* FOOD: added Feast: Grand Banquet of the Kalu'ak (76 primary stat) +* FOOD: added Feast: Hoard of Draconic Delicacies (76 primary stat) +* AUGMENT RUNE: added Draconic Augment Rune +* VANTUS RUNE: added Vantus Rune: Vault of the Incarnates +* WEAPON BUFF: added Buzzing Rune +* WEAPON BUFF: added Chirping Rune +* WEAPON BUFF: added Howling Rune +* WEAPON BUFF: added Primal Weightstone +* WEAPON BUFF: added Primal Whetstone +* WEAPON BUFF: added Completely Safe Rockets +* FLASK added Phial of the Eye in the Storm +* FLASK: added Phial of Still Air +* FLASK: added Phial of Icy Preservation +* FLASK: added Iced Phial of Corrupting Rage +* FLASK: added Phial of Charged Isolation +* FLASK: added Phial of Glacial Fury +* FLASK: added Phial of Static Empowerment +* FLASK: added Phial of Tepid Versatility +* FLASK: added Aerated Phial of Deftness +* FLASK: added Steaming Phial of Finesse +* FLASK: added Charged Phial of Alacrity +* FLASK: added Crystalline Phial of Perception +* FLASK: added Phial of Elemental Chaos +* FLASK: added Aerated Phial of Quick Hands +* WARLOCK PET: added Summon Imp +* WARLOCK PET: added Summon Fellhunter +* WARLOCK PET: added Summon Voidwalker +* WARLOCK PET: added Summon Succubus +* WARLOCK PET: added Summon Infernal +* WARLOCK PET: added Summon Doomguard +* WARLOCK PET: added Summon Felguard +* WARLOCK PET: added Summon Fel Imp +* WARLOCK PET: added Summon Voidlord +* WARLOCK PET: added Summon Shivarra +* WARLOCK PET: added Summon Observer +* WARLOCK PET: added Summon Wrathguard +* HUNTER PET: added Call Pet 1 +* HUNTER PET: added Call Pet 2 +* HUNTER PET: added Call Pet 3 +* HUNTER PET: added Call Pet 4 +* HUNTER PET: added Call Pet 5 +* TOY: added Wayfarer's Compass +* TOY: added Golden Dragon Goblet +* TOY: added Lucky Duck +* GROUPS: removed old custom locations: Icecrown Citadel, Trial of the Crusader, Ulduar, Molten Core, Onyxia's Lair, Blackwing Lair, Naxxramas, Ahn'Qiraj, Zul'Gurub +* GROUPS: added LFR, Mythic Keystone, Castle Nathria, Sanctum of Domination, Sepulcher of the First Ones, Vault of the Incarnates +* increased size of SmartBuff splash window to allow for longer itemLink text +* tidied up some code and re-indented the most egregious examples nested IF statements +* TODO: non-English localization +* TODO: rewrite to use itemID instead of itemLink +* TODO: add new buffs from Dragonlands class talent trees From aaeae3a78b3c1986ec6cfe20fae67d7433940491 Mon Sep 17 00:00:00 2001 From: speedwaystar Date: Sun, 15 Jan 2023 13:49:17 +0800 Subject: [PATCH 11/12] library metas for vs code --- Libs/.vscode/settings.json | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 Libs/.vscode/settings.json diff --git a/Libs/.vscode/settings.json b/Libs/.vscode/settings.json new file mode 100644 index 0000000..a367771 --- /dev/null +++ b/Libs/.vscode/settings.json @@ -0,0 +1,20 @@ +{ + "Lua.diagnostics.globals": [ + "LibStub", + "LibStub", + "SMARTBUFF_TITLE", + "SMARTBUFF_TITLE", + "SMARTBUFF_Options", + "SMARTBUFF_Options", + "SMARTBUFF_OToggleBuff", + "SMARTBUFF_OToggleBuff", + "SMARTDEBUFF_ToggleSF", + "SMARTDEBUFF_ToggleSF", + "SMARTBUFF_OptionsFrame_Toggle", + "SMARTBUFF_OptionsFrame_Toggle", + "SMARTBUFF_TITAN_TT", + "SMARTBUFF_TITAN_TT", + "SMARTBUFF_OToggle", + "SMARTBUFF_OToggle" + ] +} \ No newline at end of file From b489a6fb0d77246cfad244f6986e22037c2974b0 Mon Sep 17 00:00:00 2001 From: speedwaystar Date: Sun, 15 Jan 2023 20:06:12 +0800 Subject: [PATCH 12/12] version bumped to r16beta.100002 --- SmartBuff.lua | 4 ++-- SmartBuff.toc | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/SmartBuff.lua b/SmartBuff.lua index 3674572..cd1c285 100644 --- a/SmartBuff.lua +++ b/SmartBuff.lua @@ -6,9 +6,9 @@ -- Cast the most important buffs on you, tanks or party/raid members/pets. ------------------------------------------------------------------------------- -SMARTBUFF_DATE = "080123"; +SMARTBUFF_DATE = "150123"; -SMARTBUFF_VERSION = "r16alpha."..SMARTBUFF_DATE; +SMARTBUFF_VERSION = "r16beta."..SMARTBUFF_DATE; SMARTBUFF_VERSIONNR = 100002; SMARTBUFF_TITLE = "SmartBuff"; SMARTBUFF_SUBTITLE = "Supports you in casting buffs"; diff --git a/SmartBuff.toc b/SmartBuff.toc index 2feb7b2..e76dbef 100644 --- a/SmartBuff.toc +++ b/SmartBuff.toc @@ -1,6 +1,6 @@ ## Interface: 100002 ## Title: SmartBuff |cffffffff(Retail)|r by |cff00ff00Codermik & Aeldra|r -## Version: 16.100002 +## Version: 16.beta ## Author: |cff20d2ffCodermik & Aeldra|r (EU-Proudmoore) ## Contributing Author: |cff20d2ffSpeedwaystar ## Notes: Cast the most important buffs on you or party/raid members/pets. Use /sbm for options menu.