Skip to content

Commit

Permalink
Merge branch 'main' into foo
Browse files Browse the repository at this point in the history
  • Loading branch information
emptyrivers committed May 12, 2024
2 parents 024f843 + 3ae9479 commit 5948fcf
Show file tree
Hide file tree
Showing 51 changed files with 106,186 additions and 57,546 deletions.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ body:
options:
- Retail (Default)
- Beta (WoW 11.0)
- Classic
- Wrath of the Lich King Classic
- Classic Era
- Cataclysm Classic
validations:
required: true

Expand Down
13 changes: 8 additions & 5 deletions .github/pr-commenter.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
comment:
on-update: recreate
on-update: edit

glob-options:
dot: true
snippets:
- id: advertise_build_url_{{ build_id }}
files:
- '*/*'
glob-options:
dot: true
- '**'
body: |
{{#build_id}}An experimental build of WeakAuras with the changes in this pull request is available [here](https://nightly.link/{{repository}}/actions/artifacts/{{build_id}}.zip).{{/build_id}}
{{#build_id}}
An experimental build of WeakAuras with the changes in this pull request is available [here](https://nightly.link/{{repository}}/actions/artifacts/{{build_id}}.zip).
Build Time: {{datestr}}
{{/build_id}}
{{^build_id}}Experimental build was unsuccessful. See the logs for details.{{/build_id}}
2 changes: 1 addition & 1 deletion .github/scripts/.last_wow_build
Original file line number Diff line number Diff line change
@@ -1 +1 @@
c258dd0d5fe7de9f254611ee2b042e2b
a65768c230a4db2d5cf975cfa74a8ae7
2 changes: 1 addition & 1 deletion .github/scripts/.last_wow_classic_beta_build
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3da970fc387261a86bd967f89a9001fa
680af5eed81500f7e4e789a2e9e3c99b
2 changes: 1 addition & 1 deletion .github/scripts/.last_wow_classic_build
Original file line number Diff line number Diff line change
@@ -1 +1 @@
c91609c69ed2ab39d44039390a1be969
08dd7ad4abe5af339d4009342b0f3fbe
32 changes: 26 additions & 6 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,31 @@
name: CI-PR

on:
pull_request:
pull_request_target:
types: [opened, reopened, synchronize, labeled]

jobs:
build:
permission_check:
runs-on: ubuntu-latest
steps:
- uses: actions-cool/check-user-permission@v2
id: check-permission
with:
require: write
username: ${{ github.triggering_actor }}
outputs:
require-result: ${{ steps.check-permission.outputs.require-result }}

build:
runs-on: ubuntu-latest
needs: [permission_check]
outputs:
artifact-id: ${{ steps.upload-artifact.outputs.artifact-id}}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}

- name: Install and run Luacheck
uses: nebularg/actions-luacheck@v1
Expand All @@ -34,23 +48,29 @@ jobs:
args: -d -z

- uses: actions/upload-artifact@v4
if: ${{ needs.permission_check.outputs.require-result == 'true' && contains(github.event.pull_request.labels.*.name, '🆕 Feature Preview')}}
id: upload-artifact
with:
name: WeakAuras-PR#${{ github.event.number }}-${{ github.sha }}
path: .release/

- name: test
run: echo "test :o ${{ steps.upload-artifact.outputs.artifact-url }} "
advertise:
runs-on: ubuntu-latest
needs: [permission_check, build]
if: ${{ needs.permission_check.outputs.require-result == 'true' && needs.build.result == 'success' && contains(github.event.pull_request.labels.*.name, '🆕 Feature Preview')}}
steps:
- id: datestr
run: echo "datestr=${date}" >> $GITHUB_OUTPUT

- uses: exercism/[email protected]
if: ${{ contains(github.event.pull_request.labels.*.name, '🆕 Feature Preview') }}
with:
github-token: ${{ github.token }}
config-file: ".github/pr-commenter.yml"
template-variables: |
{
"datestr": "${{ steps.datestr.outputs.datestr }}",
"repository": "${{ github.repository }}",
"build_id": "${{ steps.upload-artifact.outputs.artifact-id }}",
"build_id": "${{ needs.build.outputs.artifact-id }}",
"run_id": "${{ github.run_id }}"
}
Expand Down
9 changes: 9 additions & 0 deletions .luacheckrc
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ globals = {
"GetClassColoredTextForUnit",
"Lerp",
"Mixin",
"PowerBarColor",
"ipairs_reverse",
"Round",
"SafePack",
Expand Down Expand Up @@ -272,7 +273,11 @@ globals = {
"BuyTrainerService",
"BuybackItem",
"C_ActionBar",
"C_AddOns.EnableAddOn",
"C_AddOns.GetAddOnEnableState",
"C_AddOns.GetAddOnMetadata",
"C_AddOns.IsAddOnLoaded",
"C_AddOns.LoadAddOn",
"C_AdventureJournal",
"C_AdventureJournal.ActivateEntry",
"C_AdventureJournal.CanBeShown",
Expand Down Expand Up @@ -1045,6 +1050,10 @@ globals = {
"C_Social.TwitterPostScreenshot",
"C_SpecializationInfo",
"C_SpecializationInfo.GetPvpTalentSlotInfo",
"C_Spell",
"C_Spell.GetSchoolString",
"C_Spell.GetSpellCooldown",
"C_Spell.GetSpellInfo",
"C_StorePublic",
"C_StorePublic.IsDisabledByParentalControls",
"C_StorePublic.IsEnabled",
Expand Down
4 changes: 3 additions & 1 deletion .luarc.json
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,9 @@
"CreateScrollBoxListLinearView",
"CreateDataProvider",
"UIMenuButtonStretchMixin",
"ToggleDropDownMenu"
"ToggleDropDownMenu",
"GetPrimaryTalentTree",
"GetTalentTabInfo"
],
"runtime.version": "Lua 5.1",
"workspace.ignoreDir": [
Expand Down
57 changes: 57 additions & 0 deletions WeakAuras/Atlas_Wrath.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2035,6 +2035,9 @@ Private.AtlasList = {
"SliderBar-NineSlice-CornerTopLeft",
"SliderBar-NineSlice-CornerTopRight",
"SmallQuestBang",
"Spinner_Ring",
"Spinner_Shadow",
"Spinner_Sparks",
"StableMaster",
"Start-VersusSplash",
"StoneFrameCorner-TopLeft",
Expand Down Expand Up @@ -2738,6 +2741,41 @@ Private.AtlasList = {
"combat_swords-icon",
"common-button-square-gray-down",
"common-button-square-gray-up",
"common-dropdown-classic-a-buttonDown",
"common-dropdown-classic-a-buttonDown-disabled",
"common-dropdown-classic-a-buttonDown-disabled-small",
"common-dropdown-classic-a-buttonDown-hover",
"common-dropdown-classic-a-buttonDown-hover-small",
"common-dropdown-classic-a-buttonDown-pressed",
"common-dropdown-classic-a-buttonDown-pressed-small",
"common-dropdown-classic-a-buttonDown-pressedhover",
"common-dropdown-classic-a-buttonDown-pressedhover-small",
"common-dropdown-classic-a-buttonDown-small",
"common-dropdown-classic-a-buttonUp",
"common-dropdown-classic-a-buttonUp-disabled",
"common-dropdown-classic-a-buttonUp-disabled-small",
"common-dropdown-classic-a-buttonUp-hover",
"common-dropdown-classic-a-buttonUp-hover-small",
"common-dropdown-classic-a-buttonUp-pressed",
"common-dropdown-classic-a-buttonUp-pressed-small",
"common-dropdown-classic-a-buttonUp-pressedhover",
"common-dropdown-classic-a-buttonUp-pressedhover-small",
"common-dropdown-classic-a-buttonUp-small",
"common-dropdown-classic-b-bg",
"common-dropdown-classic-b-button",
"common-dropdown-classic-b-button-disabled",
"common-dropdown-classic-b-button-hover",
"common-dropdown-classic-b-button-pressed",
"common-dropdown-classic-b-button-pressedhover",
"common-dropdown-classic-bg",
"common-dropdown-classic-bg-b",
"common-dropdown-classic-darkBG",
"common-dropdown-classic-textholder",
"common-dropdown-classic-textholder-small",
"common-dropdown-icon-checkmark-yellow-classic",
"common-dropdown-icon-radialtick-yellow-classic",
"common-dropdown-tickradial-classic",
"common-dropdown-ticksquare-classic",
"common-gray-button-entrybox-center",
"common-gray-button-entrybox-left",
"common-gray-button-entrybox-right",
Expand Down Expand Up @@ -2786,6 +2824,8 @@ Private.AtlasList = {
"communities-ring-blue",
"communities-ring-gold",
"communities-widebackground",
"communitiesfinder-card",
"communitiesfinder_card_highlight",
"countdown-swords",
"countdown-swords-glow",
"creditsscreen-highlight",
Expand Down Expand Up @@ -2929,6 +2969,10 @@ Private.AtlasList = {
"groupfinder-icon-voice",
"groupfinder-waitdot",
"guild-levelring",
"guildfinder-card",
"guildfinder-card-guildbanner-background",
"guildfinder-card-guildbanner-border",
"guildfinder-card-guildbanner-shadow",
"honorsystem-bar-background",
"honorsystem-bar-frame",
"honorsystem-bar-frame-exhaustiontick",
Expand Down Expand Up @@ -3102,6 +3146,19 @@ Private.AtlasList = {
"legionmission-map-orderhall-warrior",
"legionmission-portraitring-epicplus",
"legionmission-portraitring_levelborder_epicplus",
"levelup-bar-gold",
"levelup-bar-green",
"levelup-bar-white",
"levelup-dot-gold",
"levelup-dot-green",
"levelup-glow-gold",
"levelup-glow-green",
"levelup-icon-arrow",
"levelup-icon-bag",
"levelup-icon-book",
"levelup-icon-lock",
"levelup-shadow-lower",
"levelup-shadow-upper",
"loottab-background",
"loottab-set-background",
"loottab-set-itemborder-artifact",
Expand Down
12 changes: 12 additions & 0 deletions WeakAuras/AuraEnvironment.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,18 @@ local LibSerialize = LibStub("LibSerialize")
local LibDeflate = LibStub:GetLibrary("LibDeflate")

local UnitAura = UnitAura
if UnitAura == nil then
--- Deprecated in 10.2.5
UnitAura = function(unitToken, index, filter)
local auraData = C_UnitAuras.GetAuraDataByIndex(unitToken, index, filter)
if not auraData then
return nil;
end

return AuraUtil.UnpackAuraData(auraData)
end
end

-- Unit Aura functions that return info about the first Aura matching the spellName or spellID given on the unit.
local WA_GetUnitAura = function(unit, spell, filter)
if filter and not filter:upper():find("FUL") then
Expand Down
22 changes: 20 additions & 2 deletions WeakAuras/BuffTrigger2.lua
Original file line number Diff line number Diff line change
Expand Up @@ -664,6 +664,24 @@ local function FindBestMatchDataForUnit(time, id, triggernum, triggerInfo, unit)
return bestMatch, matchCount, stackCount, nextCheck
end

--- Deprecated in 10.1.5
local GetTexCoordsForRole = function(role)
local textureHeight, textureWidth = 256, 256
local roleHeight, roleWidth = 67, 67

if ( role == "GUIDE" ) then
return GetTexCoordsByGrid(1, 1, textureWidth, textureHeight, roleWidth, roleHeight)
elseif ( role == "TANK" ) then
return GetTexCoordsByGrid(1, 2, textureWidth, textureHeight, roleWidth, roleHeight)
elseif ( role == "HEALER" ) then
return GetTexCoordsByGrid(2, 1, textureWidth, textureHeight, roleWidth, roleHeight)
elseif ( role == "DAMAGER" ) then
return GetTexCoordsByGrid(2, 2, textureWidth, textureHeight, roleWidth, roleHeight)
else
error("Unknown role: "..tostring(role))
end
end

local roleIcons = {
DAMAGER = CreateTextureMarkup([=[Interface\LFGFrame\UI-LFG-ICON-ROLES]=], 256, 256, 0, 0, GetTexCoordsForRole("DAMAGER")),
HEALER = CreateTextureMarkup([=[Interface\LFGFrame\UI-LFG-ICON-ROLES]=], 256, 256, 0, 0, GetTexCoordsForRole("HEALER")),
Expand Down Expand Up @@ -2284,7 +2302,7 @@ local function EventHandler(frame, event, arg1, arg2, ...)
-- With newApi we have TOOLTIP_DATA_UPDATE to update the tooltips
if not newAPI then
C_Timer.After(3, function()
for unit, matchtDataPerUnit in pairs(matchData) do
for unit, matchDataPerUnit in pairs(matchData) do
EventHandler(frame, "UNIT_AURA", unit)
end
end)
Expand Down Expand Up @@ -2380,7 +2398,7 @@ local PerUnitFrames = {
-- We check whether we are already registered for the given pet mode,
-- and unregister as needed by tracking the number of calls to Register with different
-- petModes
-- All of the dancing is to not register for UNIT_IN_RANGE_UPDATE for pets unless explictly asked for
-- All of the dancing is to not register for UNIT_IN_RANGE_UPDATE for pets unless explicitly asked for
local unitTypePetMode = GetOrCreateSubTable(self.unitTypePetMode, event, unitType)
--- @type any
local mode = false
Expand Down
5 changes: 3 additions & 2 deletions WeakAuras/Conditions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,14 @@ local function formatValueForAssignment(vType, value, pathToCustomFunction, path
end
elseif(vType == "sound") then
if (value and type(value) == "table") then
return string.format("{ sound = %s, sound_channel = %s, sound_path = %s, sound_kit_id = %s, sound_type = %s, %s}",
return string.format("{ sound = %s, sound_channel = %s, sound_path = %s, sound_kit_id = %s, sound_type = %s, %s, %s}",
Private.QuotedString(tostring(value.sound or "")),
Private.QuotedString(tostring(value.sound_channel or "")),
Private.QuotedString(tostring(value.sound_path or "")),
Private.QuotedString(tostring(value.sound_kit_id or "")),
Private.QuotedString(tostring(value.sound_type or "")),
value.sound_repeat and "sound_repeat = " .. tostring(value.sound_repeat) or "nil");
value.sound_repeat and "sound_repeat = " .. tostring(value.sound_repeat) or "nil",
value.sound_fade and "sound_fade = " .. tostring(value.sound_fade) or "nil");
end
elseif(vType == "customcode") then
return string.format("%s", pathToCustomFunction);
Expand Down
Loading

0 comments on commit 5948fcf

Please sign in to comment.