Skip to content

Commit

Permalink
Added additional K'iru Song Checks
Browse files Browse the repository at this point in the history
The daily island buff on mages and priests was preventing the addon from moving forward through buff lists.
  • Loading branch information
Softrix committed Sep 15, 2022
1 parent f569459 commit 4f7ed46
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 9 deletions.
2 changes: 1 addition & 1 deletion SmartBuff-Classic.toc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Interface: 11403
## Title: |TInterface\Addons\Smartbuff\Icons\IconEnabled:0|t SmartBuff |cffffffff(Classic Version)|r
## Version: 32.11403
## Version: 33.11403
## Author: |cff20d2ffCodermik (Mik / Castanova on EU-Mirage Raceway) & Aeldra|r (EU-Proudmoore)
## Notes: Cast the most important buffs on you or party, raid, pets and assigned tanks. Use /sbm for options menu.
## DefaultState: Enabled
Expand Down
2 changes: 1 addition & 1 deletion SmartBuff-Wrath.toc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Interface: 30400
## Title: |TInterface\Addons\Smartbuff\Icons\IconEnabled:0|t SmartBuff |cffffffff(Classic Version)|r
## Version: 32.30400
## Version: 33.30400
## Author: |cff20d2ffCodermik (Mik / Castanova on EU-Mirage Raceway) & Aeldra|r (EU-Proudmoore)
## Notes: Cast the most important buffs on you or party, raid, pets and assigned tanks. Use /sbm for options menu.
## DefaultState: Enabled
Expand Down
23 changes: 21 additions & 2 deletions SmartBuff.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
-- Cast the most important buffs on you, tanks or party/raid members/pets.
-------------------------------------------------------------------------------

SMARTBUFF_DATE = "140922";
SMARTBUFF_VERSION = "r32."..SMARTBUFF_DATE;
SMARTBUFF_DATE = "150922 Dev";
SMARTBUFF_VERSION = "r33."..SMARTBUFF_DATE;
SMARTBUFF_VERSIONMIN = 11403; -- min version
SMARTBUFF_VERSIONNR = 30400; -- max version
SMARTBUFF_TITLE = "SmartBuff";
Expand Down Expand Up @@ -325,6 +325,17 @@ local function CT()
return currentTemplate;
end

-- check for K'iru's Song of Victory
local function CheckKirusSongBuff()
for i=1,40 do
name, rank, icon, count, debuffType, duration, expirationTime, unitCaster, isStealable, shouldConsolidate, spellId = UnitAura("player",i);
if name == SMARTBUFF_KIRUSSOV then
return true;
end
end
return false;
end

local function GetBuffSettings(buff)
if (B and buff) then
return B[CS()][CT()][buff];
Expand Down Expand Up @@ -2046,6 +2057,14 @@ function SMARTBUFF_BuffUnit(unit, subgroup, mode, spell)
bUsable = false;
end
end

-- check if daily island buff is active
if (bUsable and CheckKirusSongBuff() and (sPlayerClass == "PRIEST" or sPlayerClass == "MAGE")) then
-- island buff is more powerful than the class buffs which prevents the addon moving past this.
if (buffnS == SMARTBUFF_AI or buffnS == SMARTBUFF_ABRB1 or buffnS == SMARTBUFF_PWF or buffnS == SMARTBUFF_POFRB1) then
bUsable = false;
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
Expand Down
2 changes: 1 addition & 1 deletion SmartBuff.toc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Interface: 20504
## Title: |TInterface\Addons\Smartbuff\Icons\IconEnabled:0|t SmartBuff |cffffffff(Classic Version)|r
## Version: 32.20504
## Version: 33.20504
## Author: |cff20d2ffCodermik (Mik / Castanova on EU-Mirage Raceway) & Aeldra|r (EU-Proudmoore)
## Notes: Cast the most important buffs on you or party, raid, pets and assigned tanks. Use /sbm for options menu.
## DefaultState: Enabled
Expand Down
8 changes: 4 additions & 4 deletions localization.en.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
SMARTBUFF_WHATSNEW = "\n\n|cffffffff Whats new:|r\n\n"
.." |cffffffffClassic version by Codermik\n"
.." Please report any issues on Curse or Discord.|r\n\n\n"
.." Changes in r32:\n\n"
.." * Added Hunter's 'Call Pet' which needed some\n"
.." additional logic as its not a buff.\n"
.." Changes in r33:\n\n"
.." * Added additional checking for the daily island\n"
.." K'iru Song buff that causes buffing issues.\n"
.."\n\n"
.." |c0000FF96Many thanks to Chris S. for his donation and\n"
.." supporting my addon development.\n\n"
Expand Down Expand Up @@ -199,7 +199,7 @@ SMARTBUFF_MSG_OOR = "is out of range to buff!";
SMARTBUFF_MSG_CD = "Global cooldown!";
SMARTBUFF_MSG_CHAT = "not possible in chat mode!";
SMARTBUFF_MSG_SHAPESHIFT = "Casting is not allowed in shapeshift form!";
SMARTBUFF_MSG_NOACTIONSLOT = "needs a slot in an actionbar to working properly!";
SMARTBUFF_MSG_NOACTIONSLOT = "needs a slot in an actionbar to work properly!";
SMARTBUFF_MSG_GROUP = "Group";
SMARTBUFF_MSG_NEEDS = "needs";
SMARTBUFF_MSG_OOM = "Not enough mana/rage/energy!";
Expand Down

0 comments on commit 4f7ed46

Please sign in to comment.