Skip to content

Commit

Permalink
Additional WOTLK Fixes
Browse files Browse the repository at this point in the history
Fixed more issues since client 30401.
  • Loading branch information
Softrix committed Jan 18, 2023
1 parent a7e2618 commit 4da6fa4
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 36 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: 38.11403
## Version: 40.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
19 changes: 0 additions & 19 deletions SmartBuff-TBC.toc

This file was deleted.

20 changes: 8 additions & 12 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 = "180122";
SMARTBUFF_VERSION = "r39."..SMARTBUFF_DATE;
SMARTBUFF_DATE = "180123";
SMARTBUFF_VERSION = "r40."..SMARTBUFF_DATE;
SMARTBUFF_VERSIONMIN = 11403; -- min version
SMARTBUFF_VERSIONNR = 30401; -- max version
SMARTBUFF_TITLE = "SmartBuff";
Expand All @@ -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 = 39;
local SmartbuffRevision = 40;
local SmartbuffVerNotifyList = {}

-- Smartbuff now uses LibRangeCheck-2.0 by Mitchnull, not fully implemented
Expand Down Expand Up @@ -2118,10 +2118,10 @@ function SMARTBUFF_BuffUnit(unit, subgroup, mode, spell)
if (cBuff.Type == SMARTBUFF_CONST_TRACK) then
if wowTOC >= 20502 then
-- assume we are TBC Classic or higher
local count = (GetNumTrackingTypes())+1; -- GetNumTrackingTypes doesnt count "none" so add one to include it.
local count = (C_Minimap.GetNumTrackingTypes())+1; -- GetNumTrackingTypes doesnt count "none" so add one to include it.
local trackingFound;
for n = 1, count do
local trackN, trackT, trackA, trackC = GetTrackingInfo(n);
local trackN, trackT, trackA, trackC = C_Minimap.GetTrackingInfo(n);
if trackN == buffnS and trackA then
trackingFound = true;
break;
Expand Down Expand Up @@ -3088,22 +3088,19 @@ function SMARTBUFF_CountReagent(reagent, chain)
local id = nil;
local bag = 0;
local slot = 0;
local itemsInfo;
local itemLink, itemName, count;
if (chain == nil) then chain = { reagent }; end
for bag = 0, NUM_BAG_FRAMES do
for slot = 1, C_Container.GetContainerNumSlots(bag) do
itemLink = C_Container.GetContainerItemLink(bag, slot);
if (itemLink ~= nil) then
itemName = string.match(itemLink, "%[.-%]");
--print(bag, slot, itemName);
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(itemLink, "["..chain[i].."]", 1, true)) then
--print("Item found: "..chain[i]);
_, count = C_Container.GetContainerItemInfo(bag, slot);
itemsInfo = C_Container.GetContainerItemInfo(bag, slot);
id = C_Container.GetContainerItemID(bag, slot);
n = n + count;
n = n + itemsInfo.stackCount;
end
end
end
Expand All @@ -3123,7 +3120,6 @@ function SMARTBUFF_FindItem(reagent, chain)
local itemsInfo;
local itemLink, itemName, texture, count;
if (chain == nil) then chain = { reagent }; end

for bag = 0, NUM_BAG_FRAMES do
for slot = 1, C_Container.GetContainerNumSlots(bag) do
itemLink = C_Container.GetContainerItemLink(bag, slot);
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: 30401
## Title: |TInterface\Addons\Smartbuff\Icons\IconEnabled:0|t SmartBuff |cffffffff(WOTLK Classic)|r
## Version: 39.30401
## Version: 40.30401
## 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
5 changes: 2 additions & 3 deletions localization.en.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +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 r39:\n\n"
.." Changes in r40:\n\n"
.." * Fixed LUA errors caused by recent API changes \n"
.." in client 30401.\n\n"
.." * Updated TOC to 30401. \n\n\n\n"
.." in client 30401.\n\n\n\n"
.." Note that this is a quick fix to get addon working,\n"
.." there are additional fixes incoming later today or\n"
.." tomorrow.. please be patient.\n"
Expand Down

0 comments on commit 4da6fa4

Please sign in to comment.