Skip to content

Commit c92febb

Browse files
committed
0.3.1: solo/party selfie buffs fixed
1 parent fdc2ac4 commit c92febb

6 files changed

Lines changed: 33 additions & 25 deletions

File tree

Buffalo/Buffalo-Classic.toc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Title: Buffalo - One-button buffing
22
## Notes: Smart addon to buff party / raid members
3-
## Version: 0.3.0
3+
## Version: 0.3.1
44
## Author: Mimma @ <EU-Pyrewood Village>
55
## Interface: 11403
66
## SavedVariables: Buffalo_Options

Buffalo/Buffalo-Configuration.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ function Buffalo_InitializeBuffMatrix()
196196
["ICONID"] = 135932,
197197
["SPELLID"] = Buffalo_GetSpellID(BUFFALO_BUFF_Mage_ArcaneIntellect_Name),
198198
["CLASSES"] = BUFFALO_CLASS_MANAUSERS,
199-
["PRIORITY"] = 51,
199+
["PRIORITY"] = 53,
200200
["GROUP"] = false,
201201
["PARENT"] = "Arcane Brilliance"
202202
};
@@ -207,7 +207,7 @@ function Buffalo_InitializeBuffMatrix()
207207
["ICONID"] = 135869,
208208
["SPELLID"] = Buffalo_GetSpellID(BUFFALO_BUFF_Mage_ArcaneBrilliance_Name),
209209
["CLASSES"] = BUFFALO_CLASS_MANAUSERS,
210-
["PRIORITY"] = 51,
210+
["PRIORITY"] = 53,
211211
["GROUP"] = true
212212
};
213213

@@ -228,7 +228,7 @@ function Buffalo_InitializeBuffMatrix()
228228
["ICONID"] = 136006,
229229
["SPELLID"] = Buffalo_GetSpellID(BUFFALO_BUFF_Mage_DampenMagic_Name),
230230
["CLASSES"] = BUFFALO_CLASS_ALL,
231-
["PRIORITY"] = 53,
231+
["PRIORITY"] = 51,
232232
["GROUP"] = false,
233233
["FAMILY"] = "AmplifyDampen"
234234
};

Buffalo/Buffalo.lua

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -610,22 +610,30 @@ local function Buffalo_ScanRaid()
610610
if grouptype == "solo" then
611611
unitid = "player"
612612
roster[unitid] = { ["Group"]=1, ["IsOnline"]=true, ["IsDead"]=nil, ["BuffMask"]=0, ["ClassMask"]=BUFFALO_CLASS_ALL };
613-
else
613+
614+
elseif grouptype == "party" then
615+
unitid = "player";
616+
for raidIndex = startNum, endNum, 1 do
617+
if raidIndex > 0 then
618+
unitid = grouptype..raidIndex;
619+
end;
620+
621+
local isOnline = 0 and UnitIsConnected(unitid) and 1;
622+
local isDead = 0 and UnitIsDead(unitid) and 1;
623+
local _, classname = UnitClass(unitid);
624+
625+
roster[unitid] = { ["Group"]=1, ["IsOnline"]=isOnline, ["IsDead"]=isDead, ["BuffMask"]=0, ["ClassMask"]=CLASS_MATRIX[classname] };
626+
end;
627+
628+
else -- Raid
614629
for raidIndex = 1, 40, 1 do
615630
local name, rank, subgroup, level, _, filename, zone, online, dead, role, isML = GetRaidRosterInfo(raidIndex);
616631
if name then
617632
local isOnline = 0 and online and 1;
618633
local isDead = 0 and dead and 1;
619634

620-
if grouptype == "raid" then
621-
unitid = grouptype..raidIndex;
622-
else
623-
unitid = "player"
624-
if raidIndex > 1 then
625-
unitid = grouptype..(raidIndex - 1);
626-
end;
627-
end;
628-
635+
unitid = grouptype..raidIndex;
636+
629637
-- Find unitid on current player:
630638
if name == playername then
631639
currentUnitid = unitid;
@@ -712,8 +720,7 @@ local function Buffalo_ScanRaid()
712720

713721
-- If groupMask is 0 then this group does not have any buffs to apply.
714722
if groupMask > 0 then
715-
716-
--echo(string.format("Group=%s, mask=%s", groupIndex, combiMask));
723+
--echo(string.format("Group=%s, mask=%s", groupIndex, groupMask));
717724
-- We have found an assigned group now.
718725
-- Search through the buffs, and count each buff per group and unit combo:
719726
for buffName, buffInfo in next, BUFF_MATRIX do
@@ -723,7 +730,7 @@ local function Buffalo_ScanRaid()
723730

724731
-- Skip buffs which we haven't committed to do. That includes GREATER/PRAYER buffs:
725732
if(bit.band(buffInfo["BITMASK"], groupMask) > 0) and not buffInfo["GROUP"] then
726-
--echo(string.format("Buff=%s, bmask=%d, group=%d, gmask=%d", buffName, bitMask, groupIndex, combiMask));
733+
--echo(string.format("Buff=%s, bmask=%d, group=%d, gmask=%d", buffName, bitMask, groupIndex, groupMask));
727734
local waitForCooldown = false;
728735
if buffInfo["COOLDOWN"] then
729736
local start, duration, enabled = GetSpellCooldown(buffName);
@@ -737,12 +744,11 @@ local function Buffalo_ScanRaid()
737744
if raidIndex > 0 then unitid = grouptype .. raidIndex; end;
738745
unitname = Buffalo_GetPlayerAndRealm(unitid);
739746

740-
--local unitIsCurrentPlayer = (unitname == castingPlayerAndRealm);
741747
local rosterInfo = roster[unitid];
742-
748+
743749
-- Check 1: Target must be online and alive:
744750
if rosterInfo and rosterInfo["IsOnline"] and not rosterInfo["IsDead"] then
745-
--echo(string.format("Checking %s (%s) in group %s", unitname, unitid, groupIndex));
751+
--echo(string.format("Checking %s (%s) in group %s", unitname, unitid, groupIndex));
746752
-- Check 2: Target must be in the current group:
747753
if rosterInfo["Group"] == groupIndex then
748754
groupMemberCounter = groupMemberCounter + 1;
@@ -767,9 +773,6 @@ local function Buffalo_ScanRaid()
767773
if (bit.band(groupMask, buffInfo["BITMASK"]) > 0) then -- Raid buff
768774
buffMissingCounter = buffMissingCounter + 1;
769775
local priority = buffInfo["PRIORITY"];
770-
--if unitIsCurrentPlayer then
771-
-- priority = priority + CONFIG_PlayerBuffPriority;
772-
--end;
773776
--echo(string.format("Adding: unit=%s, group=%d, buff=%s", unitname, groupIndex, buffName));
774777
MissingBuffsInGroup[buffMissingCounter] = { unitid, buffName, buffInfo["ICONID"], priority };
775778
end;
@@ -836,7 +839,7 @@ local function Buffalo_ScanRaid()
836839
--echo(string.format("Found missing buff, unit=%s, group=%d, buff=%s", UnitName(unitid), groupIndex, buffName));
837840

838841
if (bit.band(groupMask, buffInfo["BITMASK"]) > 0) then
839-
--echo(string.format("Adding: unit=%s, group=%d, buff=%s", unitname, groupIndex, buffName));
842+
--echo(string.format("Adding: unitid=%s, unit=%s, group=%d, buff=%s", unitid, unitname, groupIndex, buffName));
840843
missingBuffIndex = missingBuffIndex + 1;
841844
local priority = buffInfo["PRIORITY"];
842845
if not buffInfo["GROUP"] then

Buffalo/Buffalo.toc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Title: Buffalo - One-button buffing
22
## Notes: Smart addon to buff party / raid members
3-
## Version: 0.3.0
3+
## Version: 0.3.1
44
## Author: Mimma @ <EU-Pyrewood Village>
55
## Interface: 20504
66
## SavedVariables: Buffalo_Options

Buffalo/ReadMe.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,11 @@ Priest PowerWordFortitude 53
7979

8080
Version history
8181
---------------
82+
Version 0.3.1
83+
* Fixed selfie buffs in Solo and Party.
84+
* Reordered buff display order in UI.
85+
86+
8287
Version 0.3.0
8388
* Updated class priority
8489
* Fixed prayer priority

Releases/Buffalo-0.3.1.zip

18.2 KB
Binary file not shown.

0 commit comments

Comments
 (0)