diff --git a/SmartBuff.buffs.lua b/SmartBuff.buffs.lua index 65ec4ed..e8db436 100644 --- a/SmartBuff.buffs.lua +++ b/SmartBuff.buffs.lua @@ -84,6 +84,11 @@ function SMARTBUFF_InitItemList() SMARTBUFF_SUPERIORMANAOIL = GetItemInfo(22521); -- Brilliant Mana Oil SMARTBUFF_SUPERIORWIZARDOIL = GetItemInfo(22522); -- Superior Wizard Oil SMARTBUFF_EXCEPTIONALWIZARDOIL = GetItemInfo(36900); -- Exceptional Wizard Oil + SMARTBUFF_LOCKSPELLSTONE1 = GetItemInfo(41192); -- Warlock Create Spellstone 1 + SMARTBUFF_LOCKSPELLSTONE2 = GetItemInfo(41193); -- Warlock Create Spellstone 2 + SMARTBUFF_LOCKSPELLSTONE3 = GetItemInfo(41194); -- Warlock Create Spellstone 3 + SMARTBUFF_LOCKSPELLSTONE4 = GetItemInfo(41195); -- Warlock Create Spellstone 4 + SMARTBUFF_LOCKSPELLSTONE5 = GetItemInfo(41196); -- Warlock Create Spellstone 5 SMARTBUFF_OILOFIMMOLATION = GetItemInfo(8956); -- Oil of Immolation SMARTBUFF_SOLIDWSTONE = GetItemInfo(7965); -- Solid Weighstone @@ -261,6 +266,7 @@ function SMARTBUFF_InitSpellIDs() -- Misc SMARTBUFF_KIRUSSOV = GetSpellInfo(46302); --"K'iru's Song of Victory" SMARTBUFF_FISHING = GetSpellInfo(7620) or GetSpellInfo(111541); --"Fishing" + SMARTBUFF_FELINTELLIGENCE = GetSpellInfo(54424) -- "Fel Intelligence" -- Druid SMARTBUFF_DRUID_CAT = GetSpellInfo(768); --"Cat Form" @@ -675,12 +681,11 @@ function SMARTBUFF_InitSpellList() {SMARTBUFF_CREATESS, 0.03, SMARTBUFF_CONST_ITEM, nil, SMARTBUFF_SOULSTONEGEM}, {SMARTBUFF_CREATESSLES, 0.03, SMARTBUFF_CONST_ITEM, nil, SMARTBUFF_SOULSTONEGEM}, {SMARTBUFF_CREATESSMIN, 0.03, SMARTBUFF_CONST_ITEM, nil, SMARTBUFF_SOULSTONEGEM}, - {SMARTBUFF_SPELLSTONE6, 60, SMARTBUFF_CONST_INV}, - {SMARTBUFF_SPELLSTONE5, 60, SMARTBUFF_CONST_INV}, - {SMARTBUFF_SPELLSTONE4, 60, SMARTBUFF_CONST_INV}, - {SMARTBUFF_SPELLSTONE3, 60, SMARTBUFF_CONST_INV}, - {SMARTBUFF_SPELLSTONE2, 60, SMARTBUFF_CONST_INV}, - {SMARTBUFF_SPELLSTONE1, 60, SMARTBUFF_CONST_INV}, + {SMARTBUFF_LOCKSPELLSTONE5, 60, SMARTBUFF_CONST_INV}, + {SMARTBUFF_LOCKSPELLSTONE4, 60, SMARTBUFF_CONST_INV}, + {SMARTBUFF_LOCKSPELLSTONE3, 60, SMARTBUFF_CONST_INV}, + {SMARTBUFF_LOCKSPELLSTONE2, 60, SMARTBUFF_CONST_INV}, + {SMARTBUFF_LOCKSPELLSTONE1, 60, SMARTBUFF_CONST_INV}, {SMARTBUFF_FIRESTONE7, 60, SMARTBUFF_CONST_INV}, {SMARTBUFF_FIRESTONE6, 60, SMARTBUFF_CONST_INV}, {SMARTBUFF_FIRESTONE5, 60, SMARTBUFF_CONST_INV}, diff --git a/SmartBuff.lua b/SmartBuff.lua index 494d2c1..5ecb1f6 100644 --- a/SmartBuff.lua +++ b/SmartBuff.lua @@ -6,7 +6,7 @@ -- Cast the most important buffs on you, tanks or party/raid members/pets. ------------------------------------------------------------------------------- -SMARTBUFF_DATE = "210922 Dev"; +SMARTBUFF_DATE = "260922"; SMARTBUFF_VERSION = "r35."..SMARTBUFF_DATE; SMARTBUFF_VERSIONMIN = 11403; -- min version SMARTBUFF_VERSIONNR = 30400; -- max version @@ -23,7 +23,7 @@ local SmartbuffSession = true; local SmartbuffVerCheck = false; -- for my use when checking guild users/testers versions :) local wowVersionString, wowBuild, _, wowTOC = GetBuildInfo(); local isWOTLKC = (_G.WOW_PROJECT_ID == WOW_PROJECT_WRATH_CLASSIC and wowTOC >= 30400); -local SmartbuffRevision = 34; +local SmartbuffRevision = 35; local SmartbuffVerNotifyList = {} -- Smartbuff now uses LibRangeCheck-2.0 by Mitchnull, not fully implemented @@ -1029,7 +1029,7 @@ function SMARTBUFF_AddSoloSetup() cUnits[0] = { }; cUnits[0][0] = "player"; if (sPlayerClass == "HUNTER" or sPlayerClass == "WARLOCK" or sPlayerClass == "MAGE") then cGroups[0][1] = "pet"; end - if (B[CS()][currentTemplate]) then + if (B[CS()][currentTemplate] and B[CS()][currentTemplate].SelfFirst) then if (not cClassGroups) then cClassGroups = { }; end @@ -2009,7 +2009,7 @@ function SMARTBUFF_BuffUnit(unit, subgroup, mode, spell) if (bUsable) then bUsable = IsPowerLimitOk(bs); 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 @@ -2037,7 +2037,14 @@ function SMARTBUFF_BuffUnit(unit, subgroup, mode, spell) bUsable = false; end end - + + -- check for Fel Intelligence + if (bUsable and CheckForBuff(SMARTBUFF_FELINTELLIGENCE) and (sPlayerClass == "PRIEST" or sPlayerClass == "MAGE")) then + if (buffnS == SMARTBUFF_AI or buffnS == SMARTBUFF_ABRB1 or buffnS == SMARTBUFF_DS or buffnS == SMARTBUFF_POSRB1) 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 local isUsable, notEnoughMana = IsUsableSpell(buffnS); @@ -3779,6 +3786,9 @@ function SMARTBUFF_OHideSAButton() O.HideSAButton = not O.HideSAButton; SMARTBUFF_ShowSAButton(); end +function SMARTBUFF_OSelfFirst() + B[CS()][currentTemplate].SelfFirst = not B[CS()][currentTemplate].SelfFirst; +end function SMARTBUFF_OWarnWhenMountedButton() O.WarnWhileMounted = not O.WarnWhileMounted; end @@ -4117,6 +4127,8 @@ function SMARTBUFF_Options_OnShow() SMARTBUFF_ShowSubGroupsOptions(); SMARTBUFF_SetCheckButtonBuffs(0); + + SmartBuffOptionsFrame_cbSelfFirst:SetChecked(B[CS()][currentTemplate].SelfFirst); SMARTBUFF_Splash_Show(); diff --git a/SmartBuff.xml b/SmartBuff.xml index da6dcc6..c825d24 100644 --- a/SmartBuff.xml +++ b/SmartBuff.xml @@ -1457,6 +1457,37 @@ + + + + + + + + + + + + + + + + + getglobal(self:GetName().."Text"):SetText(SMARTBUFF_OFT_SELFFIRST); + getglobal(self:GetName().."Text"):SetFontObject(GameFontNormalSmall); + + + SMARTBUFF_OSelfFirst(); + + + GameTooltip:SetOwner(self, "ANCHOR_RIGHT"); + GameTooltip:SetText(SMARTBUFF_OFTT_SELFFIRST, SMARTBUFF_TTC_R, SMARTBUFF_TTC_G, SMARTBUFF_TTC_B, SMARTBUFF_TTC_A); + + + GameTooltip:Hide(); + + +