Skip to content

Commit

Permalink
Update for patch 3.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Ketho committed Jan 21, 2023
1 parent 4a3beb3 commit c40adbf
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@
"UIParent",
"UIParentLoadAddOn",
"WOW_PROJECT_CLASSIC",
"WOW_PROJECT_ID"
"WOW_PROJECT_ID",
"GetCursorPosition"
],
"Lua.diagnostics.disable": [
"undefined-field",
Expand Down
13 changes: 7 additions & 6 deletions Peggle.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@ local LEVEL_NAMES = config.LEVEL_NAMES

config.backdroptmpl = BackdropTemplateMixin and "BackdropTemplate"
config.isRetail = (WOW_PROJECT_ID == WOW_PROJECT_MAINLINE)
config.isWrath = (WOW_PROJECT_ID == WOW_PROJECT_WRATH_CLASSIC)
config.isClassic = (WOW_PROJECT_ID == WOW_PROJECT_CLASSIC)

config.GetCompatDate = function()
if config.isClassic then
local d = C_DateAndTime.GetTodaysDate()
return d.weekDay, d.month, d.day, d.year
else
if C_DateAndTime.GetCurrentCalendarTime then
local d = C_DateAndTime.GetCurrentCalendarTime()
return d.weekday, d.month, d.monthDay, d.year
else -- classic era
local d = C_DateAndTime.GetTodaysDate()
return d.weekDay, d.month, d.day, d.year
end
end

Expand Down Expand Up @@ -8247,7 +8248,7 @@ local function G()
t:SetScript("OnClick", xt);
t:SetScript("OnEnter", c);
t:SetScript("OnLeave", r);
-- in Classic the frame templates are loadondemand
-- in Classic Era the frame templates are loadondemand
-- moreover, loading the addon early in retail will break textures in the talent frame
if config.isClassic then
UIParentLoadAddOn("Blizzard_TalentUI")
Expand Down Expand Up @@ -9447,7 +9448,7 @@ local function W()
n:SetHeight(32);
n:SetTexture(e.artPath.."resize");
t.logo = a;
if config.isRetail then
if t.SetResizeBounds then
t:SetResizeBounds(e.windowWidth / 2, e.windowHeight / 2, e.windowWidth * 1.5, e.windowHeight * 1.5)
else
t:SetMaxResize(e.windowWidth * 1.5, e.windowHeight * 1.5);
Expand Down
2 changes: 1 addition & 1 deletion Peggle.toc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## Interface: 100002
## Interface-Wrath: 30400
## Interface-Wrath: 30401
## Interface-Classic: 11403
## Title: Peggle (Unofficial)
## Version: @project-version@
Expand Down

0 comments on commit c40adbf

Please sign in to comment.