From 668c8b724acd76d84d89649ad4415d0b3270ba16 Mon Sep 17 00:00:00 2001 From: Gene Nazarov Date: Thu, 3 Oct 2024 23:36:31 -0700 Subject: [PATCH] Issues fixing this should deal with #14 and #45 --- SmartBuff.buffs.lua | 4 +++- SmartBuff.lua | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/SmartBuff.buffs.lua b/SmartBuff.buffs.lua index 1d038f5..158d524 100644 --- a/SmartBuff.buffs.lua +++ b/SmartBuff.buffs.lua @@ -705,7 +705,8 @@ function SMARTBUFF_InitSpellIDs() SMARTBUFF_FLAMETONGUEW = getSpellBookItemByName(318038); --"Flametongue Weapon" SMARTBUFF_EVERLIVINGW = getSpellBookItemByName(382021); --"Everliving Weapon" SMARTBUFF_SKYFURY = getSpellBookItemByName(462854); --"Skyfury" - SMARTBUFF_TSWARD = getSpellBookItemByName(462742); --"Thunderstrike Ward" -- Shield!!! + SMARTBUFF_TSWARD = getSpellBookItemByName(462742); --"Thunderstrike Ward" -- Shield + SMARTBUFF_TIDEGUARD = getSpellBookItemByName(445033); --"Tidecaller's Guard" -- Shield. Replaces Flametongue Weapon -- Shaman buff links S.ChainShamanShield = { SMARTBUFF_LIGHTNINGSHIELD, SMARTBUFF_WATERSHIELD, SMARTBUFF_EARTHSHIELD }; @@ -1201,6 +1202,7 @@ function SMARTBUFF_InitSpellList() {SMARTBUFF_WINDFURYW, 60, SMARTBUFF_CONST_WEAPON}, {SMARTBUFF_FLAMETONGUEW, 60, SMARTBUFF_CONST_WEAPON}, {SMARTBUFF_TSWARD, 60, SMARTBUFF_CONST_WEAPON}, + {SMARTBUFF_TIDEGUARD, 60, SMARTBUFF_CONST_WEAPON}, {SMARTBUFF_EVERLIVINGW, 60, SMARTBUFF_CONST_WEAPON}, {SMARTBUFF_EARTHSHIELD, 10, SMARTBUFF_CONST_GROUP, {50,60,70,75,80}, "WARRIOR;DEATHKNIGHT;DRUID;SHAMAN;HUNTER;ROGUE;MAGE;PRIEST;PALADIN;WARLOCK;MONK;DEMONHUNTER;EVOKER;HPET;WPET;DKPET"}, {SMARTBUFF_UNLEASHFLAME, 0.333, SMARTBUFF_CONST_SELF}, diff --git a/SmartBuff.lua b/SmartBuff.lua index e252b34..1a41f1f 100644 --- a/SmartBuff.lua +++ b/SmartBuff.lua @@ -471,6 +471,7 @@ function SMARTBUFF_OnLoad(self) self:RegisterEvent("UPDATE_MOUSEOVER_UNIT"); self:RegisterEvent("UNIT_SPELLCAST_FAILED"); self:RegisterEvent("UNIT_SPELLCAST_SUCCEEDED"); + self:RegisterEvent("PLAYER_LEVEL_UP"); --auto template events self:RegisterEvent("ZONE_CHANGED_NEW_AREA") self:RegisterEvent("GROUP_ROSTER_UPDATE") @@ -706,7 +707,8 @@ function SMARTBUFF_OnEvent(self, event, ...) -- TODO: This is a blizzard bug workaround that spams GROUP_ROSTER_UPDATE during delves local name, instanceType, difficultyID, difficultyName, maxPlayers, dynamicDifficulty, isDynamic, instanceID, instanceGroupSize, LfgDungeonID = GetInstanceInfo() - if event == "ZONE_CHANGED_NEW_AREA" or (event == "GROUP_ROSTER_UPDATE" and instanceType ~= "scenario") then + -- Any other event here + if event == "ZONE_CHANGED_NEW_AREA" or (event == "GROUP_ROSTER_UPDATE" and instanceType ~= "scenario") or event == PLAYER_LEVEL_UP then SMARTBUFF_SetTemplate() end end