Skip to content

Commit

Permalink
Added support for Korrak's Revenge
Browse files Browse the repository at this point in the history
  • Loading branch information
AcidWeb committed Dec 19, 2019
1 parent ce6d656 commit 2587326
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 23 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
Libs
desktop.ini
2 changes: 1 addition & 1 deletion .luacheckrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
globals = {'LibStub', 'UIDROPDOWNMENU_OPEN_PATCH_VERSION', 'UIDROPDOWNMENU_OPEN_MENU', 'COMMUNITY_UIDD_REFRESH_PATCH_VERSION', 'COMMUNITY_UIDD_REFRESH_PATCH_VERSION', 'FACTION_ALLIANCE', 'FACTION_HORDE', 'HELP_LABEL', 'ATTACK', 'HEALTH', 'BLUE_GEM', 'RED_GEM', 'OPTIONS', 'MAX_RAID_MEMBERS', 'BATTLEGROUND', 'hooksecurefunc', 'issecurevariable', 'FriendsFrame', 'FriendsTabHeader'}
globals = {'LibStub', 'GetBuildInfo', 'UIDROPDOWNMENU_MAXLEVELS', 'UIDROPDOWNMENU_MAXBUTTONS', 'UIDD_REFRESH_OVERREAD_PATCH_VERSION', 'UIDROPDOWNMENU_OPEN_PATCH_VERSION', 'UIDROPDOWNMENU_OPEN_PATCH_VERSION', 'UIDROPDOWNMENU_OPEN_MENU', 'COMMUNITY_UIDD_REFRESH_PATCH_VERSION', 'COMMUNITY_UIDD_REFRESH_PATCH_VERSION', 'FACTION_ALLIANCE', 'FACTION_HORDE', 'HELP_LABEL', 'ATTACK', 'HEALTH', 'BLUE_GEM', 'RED_GEM', 'OPTIONS', 'MAX_RAID_MEMBERS', 'BATTLEGROUND', 'hooksecurefunc', 'issecurevariable', 'FriendsFrame', 'FriendsTabHeader'}
ignore = {'self', '532'}
max_line_length = false
self = false
72 changes: 51 additions & 21 deletions REPorter.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ if (UIDROPDOWNMENU_OPEN_PATCH_VERSION or 0) < 1 then
return
end
if UIDROPDOWNMENU_OPEN_MENU and UIDROPDOWNMENU_OPEN_MENU ~= frame
and not issecurevariable(UIDROPDOWNMENU_OPEN_MENU, "displayMode") then
and not issecurevariable(UIDROPDOWNMENU_OPEN_MENU, "displayMode") then
UIDROPDOWNMENU_OPEN_MENU = nil
local t, f, prefix, i = _G, issecurevariable, " \0", 1
repeat
Expand All @@ -22,28 +22,55 @@ if (UIDROPDOWNMENU_OPEN_PATCH_VERSION or 0) < 1 then
end
end)
end
if (COMMUNITY_UIDD_REFRESH_PATCH_VERSION or 0) < 1 then
COMMUNITY_UIDD_REFRESH_PATCH_VERSION = 1
local function CleanDropdowns()
if COMMUNITY_UIDD_REFRESH_PATCH_VERSION ~= 1 then
return
end
local f, f2 = FriendsFrame, FriendsTabHeader
local s = f:IsShown()
f:Hide()
f:Show()
if not f2:IsShown() then
f2:Show()
f2:Hide()
end
if not s then
if (COMMUNITY_UIDD_REFRESH_PATCH_VERSION or 0) < 2 then
COMMUNITY_UIDD_REFRESH_PATCH_VERSION = 2
if select(4, GetBuildInfo()) > 8e4 then
local function CleanDropdowns()
if COMMUNITY_UIDD_REFRESH_PATCH_VERSION ~= 2 then
return
end
local f, f2 = FriendsFrame, FriendsTabHeader
local s = f:IsShown()
f:Hide()
f:Show()
if not f2:IsShown() then
f2:Show()
f2:Hide()
end
if not s then
f:Hide()
end
end
hooksecurefunc("Communities_LoadUI", CleanDropdowns)
hooksecurefunc("SetCVar", function(n)
if n == "lastSelectedClubId" then
CleanDropdowns()
end
end)
end
end
if (UIDD_REFRESH_OVERREAD_PATCH_VERSION or 0) < 1 then
UIDD_REFRESH_OVERREAD_PATCH_VERSION = 1
local function drop(t, k)
local c = 42
t[k] = nil
while not issecurevariable(t, k) do
if t[c] == nil then
t[c] = nil
end
c = c + 1
end
end
hooksecurefunc("Communities_LoadUI", CleanDropdowns)
hooksecurefunc("SetCVar", function(n)
if n == "lastSelectedClubId" then
CleanDropdowns()
hooksecurefunc("UIDropDownMenu_InitializeHelper", function()
if UIDD_REFRESH_OVERREAD_PATCH_VERSION ~= 1 then
return
end
for i=1,UIDROPDOWNMENU_MAXLEVELS do
for j=1,UIDROPDOWNMENU_MAXBUTTONS do
local b, _ = _G["DropDownList" .. i .. "Button" .. j]
_ = issecurevariable(b, "checked") or drop(b, "checked")
_ = issecurevariable(b, "notCheckable") or drop(b, "notCheckable")
end
end
end)
end
Expand Down Expand Up @@ -112,6 +139,7 @@ local SS = 907
local BFW = 1334
local CI = 1335
local ASH = 1478
local KR = 1537

RE.POIIconSize = 30
RE.POINumber = 40
Expand Down Expand Up @@ -157,7 +185,7 @@ RE.BlinkPOIValue = 0.3
RE.BlinkPOIUp = true

RE.FoundNewVersion = false
RE.AddonVersionCheck = 251
RE.AddonVersionCheck = 252
RE.ScreenHeight, RE.ScreenWidth = _G.UIParent:GetCenter()

RE.MapSettings = {
Expand Down Expand Up @@ -733,6 +761,8 @@ function RE:OnEvent(self, event, ...)
mapID = AB
elseif mapID == EOTSR then
mapID = EOTS
elseif mapID == KR then
mapID = AV
end
if mapID and RE.MapSettings[mapID] then
RE.CurrentMap = mapID
Expand Down
2 changes: 1 addition & 1 deletion REPorter.toc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Interface: 80205
## Title: |cFF74D06CRE|rPorter
## Notes: Provide battleground map.
## Version: 2.5.1
## Version: 2.5.2
## Author: AcidWeb
## SavedVariables: REPorterSettings
## X-Website: https://www.curseforge.com/wow/addons/reporter-battleground-map
Expand Down

0 comments on commit 2587326

Please sign in to comment.