-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Closes #14: Support Mouseover (#47) * Closes #40: Configure Loot Feed Strata (#52) * Closes #12: Item Loot Filters (#49)
- Loading branch information
Showing
10 changed files
with
345 additions
and
94 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 |
---|---|---|
@@ -0,0 +1,44 @@ | ||
local RLF = G_RLF.RLF | ||
|
||
local bossBannerAttempts = 0 | ||
|
||
function RLF:BossBannerHook() | ||
if self:IsHooked(BossBanner, "OnEvent") then | ||
return | ||
end | ||
if BossBanner then | ||
self:RawHookScript(BossBanner, "OnEvent", "InterceptBossBannerAlert", true) | ||
else | ||
if bossBannerAttempts <= 30 then | ||
bossBannerAttempts = bossBannerAttempts + 1 | ||
-- Keep checking until it's available | ||
self:ScheduleTimer("BossBannerHook", 1) | ||
else | ||
self:Print(G_RLF.L["BossBannerAlertUnavailable"]) | ||
self:Print(G_RLF.L["Issues"]) | ||
end | ||
end | ||
end | ||
|
||
function RLF:InterceptBossBannerAlert(s, event, ...) | ||
if G_RLF.db.global.bossBannerConfig == G_RLF.DisableBossBanner.FULLY_DISABLE then | ||
return | ||
end | ||
|
||
if G_RLF.db.global.bossBannerConfig == G_RLF.DisableBossBanner.DISABLE_LOOT and event == "ENCOUNTER_LOOT_RECEIVED" then | ||
return | ||
end | ||
|
||
local _, _, _, _, playerName, _ = ...; | ||
local myGuid = GetPlayerGuid() | ||
local myName, _ = GetNameAndServerNameFromGUID(myGuid) | ||
if G_RLF.db.global.bossBannerConfig == G_RLF.DisableBossBanner.DISABLE_MY_LOOT and event == "ENCOUNTER_LOOT_RECEIVED" and playerName == myName then | ||
return | ||
end | ||
|
||
if G_RLF.db.global.bossBannerConfig == G_RLF.DisableBossBanner.DISABLE_GROUP_LOOT and event == "ENCOUNTER_LOOT_RECEIVED" and playerName ~= myName then | ||
return | ||
end | ||
-- Call the original AddAlert function if not blocked | ||
self.hooks[BossBanner].OnEvent(s, event, ...) | ||
end |
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,28 @@ | ||
local RLF = G_RLF.RLF | ||
|
||
local lootAlertAttempts = 0 | ||
function RLF:LootToastHook() | ||
if RLF:IsHooked(LootAlertSystem, "AddAlert") then | ||
return | ||
end | ||
if LootAlertSystem and LootAlertSystem.AddAlert then | ||
RLF:RawHook(LootAlertSystem, "AddAlert", "InterceptAddAlert", true) | ||
else | ||
if lootAlertAttempts <= 30 then | ||
lootAlertAttempts = lootAlertAttempts + 1 | ||
-- Keep checking until it's available | ||
RLF:ScheduleTimer("LootToastHook", 1) | ||
else | ||
RLF:Print(G_RLF.L["AddLootAlertUnavailable"]) | ||
RLF:Print(G_RLF.L["Issues"]) | ||
end | ||
end | ||
end | ||
|
||
function RLF:InterceptAddAlert(frame, ...) | ||
if G_RLF.db.global.disableBlizzLootToasts then | ||
return | ||
end | ||
-- Call the original AddAlert function if not blocked | ||
RLF.hooks[LootAlertSystem].AddAlert(frame, ...) | ||
end |
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,7 @@ | ||
<Ui xmlns="http://www.blizzard.com/wow/ui/" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://www.blizzard.com/wow/ui/ | ||
..\FrameXML\UI.xsd"> | ||
<Script file="LootToasts.lua"/> | ||
<Script file="BossBanner.lua"/> | ||
</Ui> |
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
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.