-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from prowley/dev
Dev
- Loading branch information
Showing
10 changed files
with
347 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ Libs\embeds.xml | |
|
||
debug.lua | ||
util.lua | ||
wordlist.lua | ||
buffs.lua | ||
settings.lua | ||
optionsgui.lua | ||
raid.lua | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
local addonName, addonData = ... | ||
|
||
City = { | ||
"WarChief's Blessing", | ||
"Rallying Cry of the Dragonslayer", | ||
"Spirit of Zandalar", | ||
} | ||
|
||
DarkMoon = { | ||
"Sayge's Dark Fortune of Damage", | ||
"Sayge's Dark Fortune of Resistance", | ||
"Sayge's Dark Fortune of Armor", | ||
"Sayge's Dark Fortune of Intelligence", | ||
"Sayge's Dark Fortune of Spirit", | ||
"Sayge's Dark Fortune of Stamina", | ||
"Sayge's Dark Fortune of Strength", | ||
"Sayge's Dark Fortune of Agility", | ||
} | ||
|
||
DireMaul = { | ||
"Mol'dar's Moxie", | ||
"Fengus' Ferocity", | ||
"Slip'kik's Savvy", | ||
} | ||
|
||
Felwood = { | ||
"Songflower Serenade", | ||
"Windblossom Berries", | ||
"Whipper Root Tuber", | ||
"Night Dragon's Breath", | ||
} | ||
|
||
BlastedLands = { | ||
"R.O.I.D.S.", | ||
"Ground Scorpak Assay", | ||
"Lung Juice Cocktail", | ||
"Cerebral Cortex Compound", | ||
"Gizzard Gum", | ||
} | ||
|
||
Winterspring = { | ||
"Juju Might", | ||
"Juju Power", | ||
"Juju Flurry", | ||
"Juju Gulie", | ||
"Juju Escape", | ||
"Juju Chill", | ||
"Juju Ember" | ||
} | ||
|
||
TimeSensitive = { | ||
City, | ||
DarkMoon, | ||
DireMaul, | ||
Felwood | ||
} | ||
|
||
buffs = { | ||
buffs = {}, | ||
|
||
init = function(self) | ||
addonData.debug:registerCategory("buffs") | ||
-- build the buff table | ||
for _, set in pairs(TimeSensitive) do | ||
for _, b in pairs(set) do | ||
db("registering buff", b) | ||
self.buffs[b] = 1 | ||
end | ||
end | ||
end, | ||
|
||
report = function(self, player) | ||
local out, index = {}, 1 | ||
|
||
while true do | ||
local name, rank, icon, count, debuffType, duration, | ||
expirationTime, unitCaster, isStealable, | ||
shouldConsolidate, spellId | ||
= UnitBuff(player, index) | ||
|
||
index = index + 1 | ||
|
||
if name == nil then | ||
break | ||
end | ||
|
||
db("buffs", player, "has buff", name) | ||
if self.buffs[name] then | ||
db("buffs", name, "is of interest") | ||
out[index] = {name, icon, (GetTime() - expirationTime) / 60} | ||
end | ||
end | ||
|
||
if #out == 0 then | ||
out = nil | ||
end | ||
|
||
return out | ||
end, | ||
} | ||
|
||
addonData.buffs = buffs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.