/
## Interface: 70000 |
## Interface: 70100 |
## Title: Stuf Raid Options |
## Author: TotalPackage |
## Notes: Configuration Menu for StufRaid. |
## Interface: 70000 |
## Interface: 70100 |
## Title: Stuf_Options |
## Author: TotalPackage |
## Notes: Configuration Menu for Stuf. |
## Interface: 70000 |
## Interface: 70100 |
## Title: Stuf_Range |
## Author: TotalPackage |
## Notes: Displays estimate distance using LibRangeCheck-2.0. |
--[[ |
Name: LibRangeCheck-2.0 |
Revision: $Revision: 149 $ |
Revision: $Revision: 170 $ |
Author(s): mitch0 |
Website: http://www.wowace.com/projects/librangecheck-2-0/ |
Description: A range checking library based on interact distances and spell ranges |
-- @class file |
-- @name LibRangeCheck-2.0 |
local MAJOR_VERSION = "LibRangeCheck-2.0" |
local MINOR_VERSION = tonumber(("$Revision: 149 $"):match("%d+")) + 100000 |
local MINOR_VERSION = tonumber(("$Revision: 170 $"):match("%d+")) + 100000 |
local lib, oldminor = LibStub:NewLibrary(MAJOR_VERSION, MINOR_VERSION) |
if not lib then |
-- list of harmful spells that have different ranges |
local HarmSpells = {} |
FriendSpells["DEATHKNIGHT"] = { |
47541, -- ["Death Coil"], -- 40 |
} |
HarmSpells["DEATHKNIGHT"] = { |
47541, -- ["Death Coil"], -- 40 |
49576, -- ["Death Grip"], -- 30 |
} |
FriendSpells["DEMONHUNTER"] = { |
} |
HarmSpells["DEMONHUNTER"] = { |
185123, -- ["Throw Glaive"], -- 30 |
} |
FriendSpells["DRUID"] = { |
5185, -- ["Healing Touch"], -- 40 |
467, -- ["Thorns"], -- 30 |
774, -- ["Rejuvenation"], -- 40 |
2782, -- ["Remove Corruption"], -- 40 |
} |
HarmSpells["DRUID"] = { |
5176, -- ["Wrath"], -- 40 |
770, -- ["Faerie Fire"] -- 35 (Glyph of Faerie Fire: +10) |
339, -- ["Entangling Roots"], -- 35 |
6795, -- ["Growl"], -- 30 |
-- 16979, -- ["Feral Charge"], -- 8-25 |
33786, -- ["Cyclone"], -- 20 (Gale Winds: 22, 24) |
80964, -- ["Skull Bash"] -- 13 |
5211, -- ["Bash"], -- 5 |
33786, -- ["Cyclone"], -- 20 |
22568, -- ["Ferocious Bite"], -- 5 |
} |
FriendSpells["HUNTER"] = {} |
HarmSpells["HUNTER"] = { |
1130, -- ["Hunter's Mark"] -- 100 |
53351, -- ["Kill Shot"] -- 45 |
75, -- ["Auto Shot"], -- 40 |
19801, -- ["Tranquilizing Shot"] -- 35 |
34490, -- ["Silencing Shot"] -- 35 |
2764, -- ["Throw"], -- 30 |
19503, -- ["Scatter Shot"], -- 20 (Glyph of Scatter Shot: +3) |
2973, -- ["Raptor Strike"] -- 5 |
} |
FriendSpells["MAGE"] = { |
475, -- ["Remove Curse"], -- 40 |
1459, -- ["Arcane Brilliance"], -- 30 |
} |
HarmSpells["MAGE"] = { |
133, -- ["Fireball"], -- 40 |
116, -- ["Frostbolt"], -- 35 |
30455, -- ["Ice Lance"], -- 35 (Ice Shards: +2, +5) |
44614, --["Frostfire Bolt"], -- 40 |
5019, -- ["Shoot"], -- 30 |
} |
FriendSpells["MONK"] = { |
115450, -- ["Detox"], -- 40 |
115546, -- ["Provoke"], -- 30 |
} |
HarmSpells["MONK"] = { |
115546, -- ["Provoke"], -- 30 |
115078, -- ["Paralysis"], -- 20 |
100780, -- ["Tiger Palm"], -- 5 |
} |
FriendSpells["PALADIN"] = { |
635, -- ["Holy Light"], -- 40 |
20217, -- ["Blessing of Kings"], -- 30 |
19750, -- ["Flash of Light"], -- 40 |
} |
HarmSpells["PALADIN"] = { |
62124, -- ["Hand of Reckoning"], -- 30 |
-- 20473, -- ["Holy Shock"], -- 20 |
20271, -- ["Judgement"], -- 10 (Improved Judgement: +10, +20; Enlightened Judgements: +5, +10) |
853, -- ["Hammer of Justice"], -- 10 (Glyph of Hammer of Justice: +5) |
62124, -- ["Reckoning"], -- 30 |
20271, -- ["Judgement"], -- 30 |
853, -- ["Hammer of Justice"], -- 10 |
35395, -- ["Crusader Strike"], -- 5 |
} |
FriendSpells["PRIEST"] = { |
2061, -- ["Flash Heal"], -- 40 |
6346, -- ["Fear Ward"], -- 30 |
527, -- ["Purify"], -- 40 |
17, -- ["Power Word: Shield"], -- 40 |
} |
HarmSpells["PRIEST"] = { |
589, -- ["Shadow Word: Pain"], -- 40 |
48045, -- ["Mind Sear"], -- 35 |
5019, -- ["Shoot"], -- 30 |
} |
FriendSpells["ROGUE"] = {} |
HarmSpells["ROGUE"] = { |
2764, -- ["Throw"], -- 30 (Throwing Specialization: +5, +10) |
3018, -- ["Shoot"], -- 30 |
2764, -- ["Throw"], -- 30 |
2094, -- ["Blind"], -- 15 |
-- 8676, -- ["Ambush"], -- 5 (Glyph of Ambush: +5) |
-- 921, -- ["Pick Pocket"], -- 5 (Glyph of Pick Pocket: + 5) |
2098, -- ["Eviscerate"], -- 5 |
} |
FriendSpells["SHAMAN"] = { |
331, -- ["Healing Wave"], -- 40 |
8004, -- ["Healing Surge"], -- 40 |
546, -- ["Water Walking"], -- 30 |
} |
HarmSpells["SHAMAN"] = { |
403, -- ["Lightning Bolt"], -- 30 (Elemental Reach: +5) |
403, -- ["Lightning Bolt"], -- 40 |
370, -- ["Purge"], -- 30 |
8042, -- ["Earth Shock"], -- 25 (Elemental Reach: +7; Gladiator Gloves: +5) |
73899, -- ["Primal Strike"],. -- 5 |
} |
FriendSpells["WARRIOR"] = {} |
HarmSpells["WARRIOR"] = { |
3018, -- ["Shoot"], -- 30 |
2764, -- ["Throw"], -- 30 |
355, -- ["Taunt"], -- 30 |
100, -- ["Charge"], -- 8-25 (Glyph of Long Charge: +5) |
20252, -- ["Intercept"], -- 8-25 |
100, -- ["Charge"], -- 8-25 |
5246, -- ["Intimidating Shout"], -- 8 |
88161, -- ["Strike"], -- 5 |
} |
FriendSpells["WARLOCK"] = { |
5697, -- ["Unending Breath"], -- 30 |
} |
HarmSpells["WARLOCK"] = { |
348, -- ["Immolate"], -- 40 |
27243, -- ["Seed of Corruption"], -- 35 |
686, -- ["Shadow Bolt"], -- 40 |
5019, -- ["Shoot"], -- 30 |
18223, -- ["Curse of Exhaustion"], -- 30 (Glyph of Exhaustion: +5) |
} |
FriendSpells["DEATHKNIGHT"] = { |
49016, -- ["Unholy Frenzy"], -- 30 |
} |
HarmSpells["DEATHKNIGHT"] = { |
77606, -- ["Dark Simulacrum"], -- 40 |
47541, -- ["Death Coil"], -- 30 |
49576, -- ["Death Grip"], -- 30 (Glyph of Death Grip: +5) |
45477, -- ["Icy Touch"], -- 20 (Icy Reach: +5, +10) |
50842, -- ["Pestilence"], -- 5 |
45902, -- ["Blood Strike"], -- 5, but requires weapon, use Pestilence if possible, so keep it after Pestilence in this list |
} |
-- Items [Special thanks to Maldivia for the nice list] |
local FriendItems = { |
[5] = { |
37727, -- Ruby Acorn |
}, |
[6] = { |
63427, -- Worgsaw |
}, |
[8] = { |
34368, -- Attuned Crystal Cores |
33278, -- Burning Torch |
[45] = { |
32698, -- Wrangling Rope |
}, |
[50] = { |
116139, -- Haunting Memento |
}, |
[60] = { |
32825, -- Soul Cannon |
37887, -- Seeds of Nature's Wrath |
}, |
[70] = { |
41265, -- Eyesore Blaster |
}, |
[80] = { |
35278, -- Reinforced Net |
}, |
[100] = { |
41058, -- Hyldnir Harpoon |
}, |
} |
local HarmItems = { |
[5] = { |
37727, -- Ruby Acorn |
}, |
[6] = { |
63427, -- Worgsaw |
}, |
[8] = { |
34368, -- Attuned Crystal Cores |
33278, -- Burning Torch |
-- 32698, -- Wrangling Rope |
23836, -- Goblin Rocket Launcher |
}, |
[50] = { |
116139, -- Haunting Memento |
}, |
[60] = { |
32825, -- Soul Cannon |
37887, -- Seeds of Nature's Wrath |
}, |
[70] = { |
41265, -- Eyesore Blaster |
}, |
[80] = { |
35278, -- Reinforced Net |
}, |
[100] = { |
33119, -- Malister's Frost Wand |
}, |
} |
-- This could've been done by checking player race as well and creating tables for those, but it's easier like this |
for k, v in pairs(FriendSpells) do |
tinsert(v, 28880) -- ["Gift of the Naaru"] |
end |
for k, v in pairs(HarmSpells) do |
tinsert(v, 28734) -- ["Mana Tap"] |
end |
-- >> END OF STATIC CONFIG |
local GetNumSpellTabs = GetNumSpellTabs |
local GetSpellTabInfo = GetSpellTabInfo |
local GetItemInfo = GetItemInfo |
local UnitAura = UnitAura |
local UnitCanAttack = UnitCanAttack |
local UnitCanAssist = UnitCanAssist |
local UnitExists = UnitExists |
local UnitClass = UnitClass |
local UnitRace = UnitRace |
local GetInventoryItemLink = GetInventoryItemLink |
local GetSpecialization = GetSpecialization |
local GetSpecializationInfo = GetSpecializationInfo |
local GetTime = GetTime |
local HandSlotId = GetInventorySlotInfo("HandsSlot") |
local math_floor = math.floor |
-- temporary stuff |
local name, _, _, _, minRange, range = GetSpellInfo(sid) |
local spellIdx = findSpellIdx(name) |
if spellIdx and range then |
minRange = math.floor(minRange + 0.5) |
range = math.floor(range + 0.5) |
minRange = math_floor(minRange + 0.5) |
range = math_floor(range + 0.5) |
-- print("### spell: " .. tostring(name) .. ", " .. tostring(minRange) .. " - " .. tostring(range)) |
if minRange == 0 then -- getRange() expects minRange to be nil in this case |
minRange = nil |
end |
end |
-- OK, here comes the actual lib |
-- pre-initialize the checkerLists here so that we can return some meaningful result even if |
-- initialize RangeCheck if not yet initialized or if "forced" |
function lib:init(forced) |
if self.initialized and (not forced) then return end |
if self.initialized and (not forced) then |
return |
end |
self.initialized = true |
local _, playerClass = UnitClass("player") |
local _, playerRace = UnitRace("player") |
end |
end |
function lib:UNIT_AURA(event, unit) |
if self.initialized and unit == "player" then |
self:scheduleAuraCheck() |
end |
end |
function lib:processItemRequests(itemRequests) |
while true do |
local range, items = next(itemRequests) |
self.frame:Show() |
end |
function lib:scheduleAuraCheck() |
lastUpdate = UpdateDelay |
self.frame:Show() |
end |
-- << load-time initialization |
local _, playerClass = UnitClass("player") |
if playerClass == "MAGE" or playerClass == "SHAMAN" then |
-- Mage and Shaman gladiator gloves modify spell ranges |
frame:RegisterEvent("UNIT_INVENTORY_CHANGED") |
frame:RegisterUnitEvent("UNIT_INVENTORY_CHANGED", "player") |
end |
end |
initItemRequests() |
if ( unit == "player" or not ca.assist or ca.dead or not UnitIsConnected(unit) ) then |
return false |
elseif ( not UnitIsVisible(unit) ) or |
( s40 and IsSpellInRange(s40, unit) == 0 ) or |
( s40 and IsSpellInRange(s40, BOOKTYPE_SPELL, unit) == 0 ) or |
( not s40 and Stuf.ingroup and ca.ingroup and not UnitInRange(unit) ) then |
return true |
end |
## Interface: 70000 |
## Interface: 70100 |
## Title: Stuf Unit Frames |
## Author: TotalPackage |
## Notes: Main unitframes replacement. Assembly optional. |
## Version: 7.0.003 |
## Version: 7.1.001 |
## SavedVariables: StufDB |
## SavedVariablesPerCharacter: StufCharDB |
-- spell range setup |
if CLS == "PALADIN" then |
Stuf.supportspell = GetSpellInfo(4987) |
Stuf.supportspell = 19750 -- Flash of Light |
elseif CLS == "PRIEST" then |
Stuf.supportspell = GetSpellInfo(2061) |
Stuf.supportspell = 527 -- Purify |
elseif CLS == "DRUID" then |
Stuf.supportspell = GetSpellInfo(8936) |
elseif CLS == "MAGE" then |
Stuf.supportspell = GetSpellInfo(475) |
Stuf.supportspell = 774 -- Rejuv |
elseif CLS == "SHAMAN" then |
Stuf.supportspell = GetSpellInfo(1064) |
Stuf.supportspell = 8004 -- Healing Surge |
elseif CLS == "MONK" then |
Stuf.supportspell = GetSpellInfo(209525) |
Stuf.supportspell = 115450 -- Detox |
end |
for _, func in ipairs(Stuf.inits) do -- let other sections know variables are loaded |
## Interface: 70000 |
## Interface: 70100 |
## LoadOnDemand: 1 |
## X-Curse-Packaged-Version: r95 |
## X-Curse-Packaged-Version: 7.1.0 |
## X-Curse-Project-Name: LibSharedMedia-3.0 |
## X-Curse-Project-ID: libsharedmedia-3-0 |
## X-Curse-Repository-ID: wow/libsharedmedia-3-0/mainline |
## Title: Lib: SharedMedia-3.0 |
## Notes: Shared handling of media data (fonts, sounds, textures, ...) between addons. |
## Author: Elkano |
## Version: 3.0-95 |
## Version: 3.0-97 |
## X-Website: http://www.wowace.com/projects/libsharedmedia-3-0/ |
## X-Category: Library |
## X-Revision: 95 |
## X-Date: 2016-07-19T22:45:58Z |
## X-Revision: 97 |
## X-Date: 2016-10-25T23:54:36Z |
LibStub\LibStub.lua |
CallbackHandler-1.0\CallbackHandler-1.0.lua |
## Interface: 70000 |
## Interface: 70100 |
## Title: Stuf Raid Frames |
## Author: TotalPackage |
## Notes: Raid unit frames. Assembly optional. (Does not require Stuf) |
## Version: 7.0.003 |
## Version: 7.1.001 |
## SavedVariables: StufRaidDB |
## SavedVariablesPerCharacter: StufRaidCharLayoutDB, StufRaidCharDB |
local _, CLS = UnitClass("player") |
if CLS == "PALADIN" then |
a.s40 = GetSpellInfo(4987) |
a.s40 = 19750 |
elseif CLS == "PRIEST" then |
a.s40 = GetSpellInfo(2061) |
a.s40 = 527 |
elseif CLS == "DRUID" then |
a.s40 = GetSpellInfo(8936) |
elseif CLS == "MAGE" then |
a.s40 = GetSpellInfo(475) |
a.s40 = 774 |
elseif CLS == "SHAMAN" then |
a.s40 = GetSpellInfo(1064) |
a.s40 = 8004 |
elseif CLS == "MONK" then |
a.s40 = GetSpellInfo(209525) |
a.s40 = 115450 |
end |
-- Class Colors support |
if not db.nocustomclass and CUSTOM_CLASS_COLORS then |
for u, uf in pairs(units) do |
if uf.dead then |
uf.border:SetAlpha(deadalpha) |
elseif not UnitIsVisible(u) or (s40 and IsSpellInRange(s40, u) ~= 1) or (not s40 and not UnitInRange(u)) then |
elseif not UnitIsVisible(u) or (s40 and IsSpellInRange(s40, BOOKTYPE_SPELL, u) ~= 1) or (not s40 and not UnitInRange(u)) then |
uf.border:SetAlpha(ooralpha) |
else |
uf.border:SetAlpha(1) |
## Interface: 70000 |
## Interface: 70100 |
## LoadOnDemand: 1 |
## X-Curse-Packaged-Version: r95 |
## X-Curse-Packaged-Version: 7.1.0 |
## X-Curse-Project-Name: LibSharedMedia-3.0 |
## X-Curse-Project-ID: libsharedmedia-3-0 |
## X-Curse-Repository-ID: wow/libsharedmedia-3-0/mainline |
## Title: Lib: SharedMedia-3.0 |
## Notes: Shared handling of media data (fonts, sounds, textures, ...) between addons. |
## Author: Elkano |
## Version: 3.0-95 |
## Version: 3.0-97 |
## X-Website: http://www.wowace.com/projects/libsharedmedia-3-0/ |
## X-Category: Library |
## X-Revision: 95 |
## X-Date: 2016-07-19T22:45:58Z |
## X-Revision: 97 |
## X-Date: 2016-10-25T23:54:36Z |
LibStub\LibStub.lua |
CallbackHandler-1.0\CallbackHandler-1.0.lua |
-- update overlay opacity |
if uf.dead or uf.dced then |
uf.border:SetAlpha(deadalpha) |
elseif not UnitIsVisible(vu) or (s40 and IsSpellInRange(s40, vu) ~= 1) or (not s40 and not UnitInRange(vu)) then |
elseif not UnitIsVisible(vu) or (s40 and IsSpellInRange(s40, BOOKTYPE_SPELL, vu) ~= 1) or (not s40 and not UnitInRange(vu)) then |
uf.border:SetAlpha(ooralpha) |
else |
uf.border:SetAlpha(1) |