Skip to content

Commit

Permalink
Fixed LUA error if group buff was not learned yet.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sentilix committed Nov 6, 2022
1 parent 6f5a2fa commit 45ad696
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Buffalo/Buffalo-Classic.toc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Title: Buffalo - One-button buffing
## Notes: Smart addon to buff party / raid members
## Version: 0.5.2
## Version: 0.5.3
## Author: Mimma @ <EU-Pyrewood Village>
## Interface: 11403
## SavedVariables: Buffalo_Options
Expand Down
2 changes: 1 addition & 1 deletion Buffalo/Buffalo-Wrath.toc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Title: Buffalo - One-button buffing
## Notes: Smart addon to buff party / raid members
## Version: 0.5.2
## Version: 0.5.3
## Author: Mimma @ <EU-Pyrewood Village>
## Interface: 30400
## SavedVariables: Buffalo_Options
Expand Down
10 changes: 6 additions & 4 deletions Buffalo/Buffalo.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1186,10 +1186,12 @@ local function Buffalo_ScanRaid()
-- If this is a group buff, and enough people are missing it, use the big one instead!
if buffInfo["PARENT"] and buffMissingCounter >= CONFIG_GroupBuffThreshold then
local parentBuffInfo = BUFF_MATRIX[buffInfo["PARENT"]];
local bufferUnitid = MissingBuffsInGroup[1][1];
missingBuffIndex = missingBuffIndex + 1;
local priority = parentBuffInfo["PRIORITY"] + (buffMissingCounter / groupMemberCounter * 5) + groupMemberCounter;
MissingBuffs[missingBuffIndex] = { bufferUnitid, buffInfo["PARENT"], parentBuffInfo["ICONID"], priority, 0 };
if parentBuffInfo then
local bufferUnitid = MissingBuffsInGroup[1][1];
missingBuffIndex = missingBuffIndex + 1;
local priority = parentBuffInfo["PRIORITY"] + (buffMissingCounter / groupMemberCounter * 5) + groupMemberCounter;
MissingBuffs[missingBuffIndex] = { bufferUnitid, buffInfo["PARENT"], parentBuffInfo["ICONID"], priority, 0 };
end;
else
-- Use single target buffing:
for missingIndex = 1, buffMissingCounter, 1 do
Expand Down
2 changes: 1 addition & 1 deletion Buffalo/Buffalo.toc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Title: Buffalo - One-button buffing
## Notes: Smart addon to buff party / raid members
## Version: 0.5.2
## Version: 0.5.3
## Author: Mimma @ <EU-Pyrewood Village>
## Interface: 30400
## SavedVariables: Buffalo_Options
Expand Down
4 changes: 4 additions & 0 deletions Buffalo/ReadMe.txt
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ Priest PowerWordFortitude 53

Version history
---------------
Version 0.5.3
* Bugfix: Repeating LUA errors when a parent group buff had not been learned yet.


Version 0.5.2
* Bugfix: Molten Armor (mage) buff caused Classic Era version to fail.

Expand Down
Binary file added Releases/Buffalo-0.5.3.zip
Binary file not shown.

0 comments on commit 45ad696

Please sign in to comment.