Skip to content

Commit

Permalink
Update wod workflows and fix all LuaLS problems
Browse files Browse the repository at this point in the history
  • Loading branch information
MysticalOS committed Apr 13, 2024
1 parent c0b0dbc commit c596868
Show file tree
Hide file tree
Showing 12 changed files with 60 additions and 60 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ jobs:
GITHUB_OAUTH: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
with:
fetch-depth: 100
fetch-depth: 0

- name: Install and run Luacheck
uses: nebularg/actions-luacheck@v1
Expand Down
32 changes: 32 additions & 0 deletions .github/workflows/luals.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: luals-checker

on:
push:
branches:
- master
tags:
- "*"
pull_request:
branches:
- master

run-name: LuaLS Check
jobs:
LuaLS-checker:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
path: ./workspace
- name: LuaLS check
uses: DeadlyBossMods/LuaLS-config@main
with:
luals-ref: 5623a84ea9a2b27dd7121f88dd995389c702eac1
luals-check-dir: ${{ github.workspace }}/workspace
- name: Send Status to Discord
uses: nebularg/actions-discord-webhook@v1
with:
webhook_url: ${{ secrets.DISCORD_WEBHOOK }}
status: ${{ job.status }}
if: ${{ github.event_name != 'pull_request' && failure() }}
22 changes: 0 additions & 22 deletions DBM-Draenor/Annihilon.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ mod:SetMinCombatTime(15)

mod:RegisterEventsInCombat(
"SPELL_AURA_APPLIED 180950",
"SPELL_AURA_REMOVED 180950",
"UNIT_SPELLCAST_START"
)

Expand All @@ -21,8 +20,6 @@ local specWarnVoidBomb = mod:NewSpecialWarningYou(180939, nil, nil, nil, 1, 2)
local yellVoidBomb = mod:NewYell(180939)
local specWarnTwistMind = mod:NewSpecialWarningSwitch(180950, "Dps", nil, nil, 1, 2)

mod:AddHudMapOption("HudMapOnMC", 180950)

function mod:VoidTarget(targetname, uId)
if not targetname then return end
warnWhirlingVoid:Show(targetname)
Expand All @@ -39,12 +36,6 @@ function mod:BombTarget(targetname, uId)
end
end

function mod:OnCombatEnd()
if self.Options.HudMapOnMC then
DBM.HudMap:Disable()
end
end

function mod:SPELL_AURA_APPLIED(args)
local spellId = args.spellId
if spellId == 180950 then
Expand All @@ -53,22 +44,9 @@ function mod:SPELL_AURA_APPLIED(args)
specWarnTwistMind:Show()
specWarnTwistMind:Play("findmc")
end
if self.Options.HudMapOnMC then
DBM.HudMap:RegisterRangeMarkerOnPartyMember(spellId, "highlight", args.destName, 5, 30, 1, 1, 0, 0.5, nil, true, 1):Pulse(0.5, 0.5)
end
end
end

function mod:SPELL_AURA_REMOVED(args)
local spellId = args.spellId
if spellId == 180950 then
if self.Options.HudMapOnMC then
DBM.HudMap:FreeEncounterMarkerByTarget(spellId, args.destName)
end
end
end


function mod:UNIT_SPELLCAST_START(uId, _, spellId)
if spellId == 180939 and self:AntiSpam(3, 1) then
self:SendSync("VoidBomb", UnitGUID(uId))
Expand Down
10 changes: 0 additions & 10 deletions DBM-Draenor/Goggnathog.lua
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ local specWarnArcaneSurge = mod:NewSpecialWarningInterrupt(180816, false, nil,
local specWarnArcaneSurgeDispel = mod:NewSpecialWarningDispel(180816, "MagicDispeller", nil, nil, 1, 2)

mod:AddRangeFrameOption(10, 180908)
mod:AddHudMapOption("HudMapOnUnleashed", 180908)

mod.vb.debuffCount = 0
local debuffName = DBM:GetSpellInfo(180908)
Expand Down Expand Up @@ -56,9 +55,6 @@ function mod:OnCombatStart(delay)
end

function mod:OnCombatEnd()
if self.Options.HudMapOnUnleashed then
DBM.HudMap:Disable()
end
if self.Options.RangeFrame then
DBM.RangeCheck:Hide()
end
Expand Down Expand Up @@ -87,9 +83,6 @@ function mod:SPELL_AURA_APPLIED(args)
yellUnleashedEnergy:Yell()
specWarnUnleashedEnergy:Play("runout")
end
if self.Options.HudMapOnUnleashed then
DBM.HudMap:RegisterRangeMarkerOnPartyMember(spellId, "highlight", args.destName, 5, 30, 1, 1, 0, 0.5, nil, true, 1):Pulse(0.5, 0.5)
end
updateRangeFrame(self)
elseif spellId == 180816 and not args:IsDestTypePlayer() and self:AntiSpam(3, 1) then
specWarnArcaneSurgeDispel:Show(args.destName)
Expand All @@ -106,9 +99,6 @@ function mod:SPELL_AURA_REMOVED(args)
local spellId = args.spellId
if spellId == 180908 then
self.vb.debuffCount = self.vb.debuffCount - 1
if self.Options.HudMapOnUnleashed then
DBM.HudMap:FreeEncounterMarkerByTarget(spellId, args.destName)
end
updateRangeFrame(self)
end
end
4 changes: 2 additions & 2 deletions DBM-Raids-WoD/BlackrockFoundry/Blackhand.lua
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ function mod:SPELL_AURA_APPLIED(args)
self:SetSortedIcon("roster", 1.5, args.destName, 1, expectedMFDCount)
end
if self.Options.HudMapOnMFD then
DBM.HudMap:RegisterRangeMarkerOnPartyMember(spellId, "highlight", args.destName, 3, 5, 1, 1, 0, 0.5, nil, true, 1):Pulse(0.5, 0.5)
DBM.HudMap:RegisterRangeMarkerOnPartyMember(spellId, "highlight", args.destName, 3, 5, 1, 1, 0, 0.5):Pulse(0.5, 0.5)
end
elseif spellId == 157000 then--Non Tank Version
if self:AntiSpam(5, 4) then
Expand Down Expand Up @@ -611,7 +611,7 @@ end
function mod:UNIT_POWER_UPDATE(uId)
local power = UnitPower(uId)
local guid = UnitGUID(uId)
if power > 70 and not mortarsWarned[guid] then
if guid and power > 70 and not mortarsWarned[guid] then
specWarnMortarSoon:Show()
mortarsWarned[guid] = true
end
Expand Down
4 changes: 2 additions & 2 deletions DBM-Raids-WoD/BlackrockFoundry/BlastFurnace.lua
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ function mod:SPELL_AURA_APPLIED(args)
if self:CheckTankDistance(args.sourceGUID, 40) and self.vb.phase == 1 then--Filter Works very poorly, probably because mob not a BOSS id. usually see ALL warnings and all HUDs :\
warnBomb:CombinedShow(1, args.destName)
if self.Options.HudMapOnBomb then
DBM.HudMap:RegisterRangeMarkerOnPartyMember(155192, "highlight", args.destName, 5, debuffTime+0.5, 1, 1, 0, 0.5, nil, true, 1):Pulse(0.5, 0.5)
DBM.HudMap:RegisterRangeMarkerOnPartyMember(155192, "highlight", args.destName, 5, debuffTime+0.5, 1, 1, 0, 0.5):Pulse(0.5, 0.5)
end
end
if args:IsPlayer() then
Expand Down Expand Up @@ -648,7 +648,7 @@ function mod:INSTANCE_ENCOUNTER_ENGAGE_UNIT()
local unitID = "boss"..i
local unitGUID = UnitGUID(unitID)
local cid = self:GetCIDFromGUID(unitGUID)
if self.vb.phase == 2 and cid == 76815 and UnitExists(unitID) and not activePrimalGUIDS[unitGUID] then
if unitGUID and self.vb.phase == 2 and cid == 76815 and UnitExists(unitID) and not activePrimalGUIDS[unitGUID] then
activePrimal = activePrimal + 1
activePrimalGUIDS[unitGUID] = true
end
Expand Down
4 changes: 2 additions & 2 deletions DBM-Raids-WoD/BlackrockFoundry/Darmac.lua
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ function mod:SuperheatedTarget(targetname, uId)
end
if self.Options.HudMapOnBreath then
--Static marker, breath doesn't move once a target is picked. it's aimed at static location player WAS
DBM.HudMap:RegisterStaticMarkerOnPartyMember(154989, "highlight", targetname, 5, 6.5, 1, 0, 0, 0.5, nil, 1):Pulse(0.5, 0.5)
DBM.HudMap:RegisterStaticMarkerOnPartyMember(154989, "highlight", targetname, 5, 6.5, 1, 0, 0, 0.5):Pulse(0.5, 0.5)
end
end

Expand All @@ -168,7 +168,7 @@ function mod:BreathTarget(targetname, uId)
end
if self.Options.HudMapOnBreath then
--Static marker, breath doesn't move once a target is picked. it's aimed at static location player WAS
DBM.HudMap:RegisterStaticMarkerOnPartyMember(154989, "highlight", targetname, 5, 6.5, 1, 0, 0, 0.5, nil, 1):Pulse(0.5, 0.5)
DBM.HudMap:RegisterStaticMarkerOnPartyMember(154989, "highlight", targetname, 5, 6.5, 1, 0, 0, 0.5):Pulse(0.5, 0.5)
end
end

Expand Down
2 changes: 1 addition & 1 deletion DBM-Raids-WoD/BlackrockFoundry/Gruul.lua
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ function mod:SPELL_AURA_APPLIED(args)
specWarnPetrifyingSlam:Play("scatter")
end
if hudEnabled then
DBM.HudMap:RegisterRangeMarkerOnPartyMember(spellId, "timer", args.destName, 8, 10, 0, 1, 0, 0.6, nil, nil, 4):Appear():RegisterForAlerts():Rotate(360, 9.5)
DBM.HudMap:RegisterRangeMarkerOnPartyMember(spellId, "timer", args.destName, 8, 10, 0, 1, 0, 0.6):Appear():RegisterForAlerts():Rotate(360, 9.5)
end
elseif spellId == 155539 then
self.vb.rampage = true
Expand Down
10 changes: 5 additions & 5 deletions DBM-Raids-WoD/BlackrockFoundry/IronMaidens.lua
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,11 @@ local timerPenetratingShotCD = mod:NewCDCountTimer(28.8, 164271, nil, nil, nil
local timerDeployTurretCD = mod:NewCDCountTimer(20.2, 158599, nil, nil, nil, 1, nil, DBM_COMMON_L.DAMAGE_ICON)--20.2-23.5
----Enforcer Sorka
mod:AddTimerLine(Sorka)
local timerBladeDashCD = mod:NewCDCountTimer(20, 155794, nil, "Ranged|Tank", nil, 5, nil, DBM_COMMON_L.TANK_ICON, nil, mod:IsTank() and 3, 4)
local timerBladeDashCD = mod:NewCDCountTimer(20, 155794, nil, "Ranged|Tank", nil, 5, nil, DBM_COMMON_L.TANK_ICON, nil, mod:IsTank() and 3 or nil, 4)
local timerConvulsiveShadowsCD = mod:NewNextCountTimer(55.6, 156214, nil, nil, nil, 3)--Timer only enabled on mythic, On non mythic, it's just an unimportant dot. On mythic, MUCH more important because user has to run out of raid and get dispelled.
----Marak the Blooded
mod:AddTimerLine(Marak)
local timerBloodRitualCD = mod:NewCDCountTimer(20, 158078, nil, nil, nil, 5, nil, DBM_COMMON_L.TANK_ICON, nil, mod:IsTank() and 2, 4)
local timerBloodRitualCD = mod:NewCDCountTimer(20, 158078, nil, nil, nil, 5, nil, DBM_COMMON_L.TANK_ICON, nil, mod:IsTank() and 2 or nil, 4)
local timerHeartSeekerCD = mod:NewCDCountTimer(70, 158010, nil, "Ranged", nil, 3)

mod:AddSetIconOption("SetIconOnRapidFire", 156626, true)
Expand Down Expand Up @@ -357,7 +357,7 @@ function mod:SPELL_AURA_APPLIED(args)
end
if (noFilter or not playerOnBoat) then
if self.Options.HudMapOnBloodRitual then
DBM.HudMap:RegisterRangeMarkerOnPartyMember(spellId, "highlight", args.destName, 3.5, 7, 1, 0, 0, 0.5, nil, true, 2):Pulse(0.5, 0.5)
DBM.HudMap:RegisterRangeMarkerOnPartyMember(spellId, "highlight", args.destName, 3.5, 7, 1, 0, 0, 0.5):Pulse(0.5, 0.5)
end
if args:IsPlayer() then
yellBloodRitual:Yell()
Expand Down Expand Up @@ -387,7 +387,7 @@ function mod:SPELL_AURA_APPLIED(args)
warnRapidFire:Show(self.vb.rapidfire, args.destName)
end
if self.Options.HudMapOnRapidFire then
DBM.HudMap:RegisterRangeMarkerOnPartyMember(spellId, "highlight", args.destName, 5, 9, 1, 1, 0, 0.5, nil, true, 1):Pulse(0.5, 0.5)
DBM.HudMap:RegisterRangeMarkerOnPartyMember(spellId, "highlight", args.destName, 5, 9, 1, 1, 0, 0.5):Pulse(0.5, 0.5)
end
end
end
Expand Down Expand Up @@ -564,7 +564,7 @@ function mod:CHAT_MSG_ADDON(prefix, msg, channel, targetName)
warnRapidFire:Show(self.vb.rapidfire, targetName)
end
if self.Options.HudMapOnRapidFire then
DBM.HudMap:RegisterRangeMarkerOnPartyMember(156631, "highlight", targetName, 5, 12, 1, 1, 0, 0.5, nil, true, 1):Pulse(0.5, 0.5)
DBM.HudMap:RegisterRangeMarkerOnPartyMember(156631, "highlight", targetName, 5, 12, 1, 1, 0, 0.5):Pulse(0.5, 0.5)
end
end
end
Expand Down
4 changes: 2 additions & 2 deletions DBM-Raids-WoD/BlackrockFoundry/Kagraz.lua
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ local function showFixate(self)
for name, time in pairs(fixateTagets) do
text[#text + 1] = name
if self.Options.HudMapOnFixate then
DBM.HudMap:RegisterRangeMarkerOnPartyMember(154952, "highlight", name, 3, 10, 1, 1, 0, 0.5, nil, true, 1):Pulse(0.5, 0.5)
DBM.HudMap:RegisterRangeMarkerOnPartyMember(154952, "highlight", name, 3, 10, 1, 1, 0, 0.5):Pulse(0.5, 0.5)
end
end
warnFixate:Show(table.concat(text, "<, >"))
Expand Down Expand Up @@ -279,7 +279,7 @@ function mod:INSTANCE_ENCOUNTER_ENGAGE_UNIT()
local unitGUID = UnitGUID(unitID)
if UnitExists(unitID) and not activeBossGUIDS[unitGUID] then
local cid = self:GetCIDFromGUID(unitGUID)
if cid == 76794 then--Cinder Wolf
if unitGUID and cid == 76794 then--Cinder Wolf
wolfIcon = wolfIcon + 1
activeBossGUIDS[unitGUID] = true
if self:CanSetIcon("SetIconOnAdds") then--Check if elected
Expand Down
18 changes: 9 additions & 9 deletions DBM-Raids-WoD/HellfireCitadel/Archimonde.lua
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ local timerLightCD = mod:NewNextTimer(10, 183963, nil, nil, nil, 5)
local timerShadowBlastCD = mod:NewCDTimer(7.3, 183864, nil, "Tank", nil, 5)
--Phase 2: Hand of the Legion
mod:AddTimerLine(SCENARIO_STAGE:format(2))
local timerShackledTormentCD = mod:NewCDCountTimer(31.5, 184931, nil, nil, nil, 3, nil, nil, nil, not mod:IsTank() and 3, 3)
local timerShackledTormentCD = mod:NewCDCountTimer(31.5, 184931, nil, nil, nil, 3, nil, nil, nil, not mod:IsTank() and 3 or nil, 3)
local timerWroughtChaosCD = mod:NewCDTimer(51.7, 184265, nil, nil, nil, 3, nil, DBM_COMMON_L.DEADLY_ICON)
--Phase 2.5
local timerFelborneOverfiendCD = mod:NewNextCountTimer(44.3, "ej11603", nil, nil, nil, 1, 186662)
Expand Down Expand Up @@ -451,7 +451,7 @@ local function showMarkOfLegion(self, spellName)
end
end
if self.Options.HudMapMarkofLegion2 then
DBM.HudMap:RegisterRangeMarkerOnPartyMember(1870502, "party", playerName, 0.9, 12, nil, nil, nil, 1, nil, false):Appear()
DBM.HudMap:RegisterRangeMarkerOnPartyMember(1870502, "party", playerName, 0.9, 12, nil, nil, nil, 1):Appear()
end
end
end
Expand Down Expand Up @@ -512,7 +512,7 @@ local function breakShackles(self, spellName)
end
end
if self.Options.HudMapOnShackledTorment2 and self:IsMythic() then
DBM.HudMap:RegisterRangeMarkerOnPartyMember(1849642, "party", playerName, 0.9, 30, nil, nil, nil, 1, nil, false):Appear()
DBM.HudMap:RegisterRangeMarkerOnPartyMember(1849642, "party", playerName, 0.9, 30, nil, nil, nil, 1):Appear()
for i = 1, #shacklesTargets do
local name = shacklesTargets[i]
if not name then break end
Expand Down Expand Up @@ -947,18 +947,18 @@ function mod:SPELL_AURA_APPLIED(args)
warnWroughtChaos:CombinedShow(0.1, self.vb.wroughtWarned, args.sourceName)
warnWroughtChaos:CombinedShow(0.1, self.vb.wroughtWarned, args.destName)
if UnitIsUnit("player", sourceUId) then
DBM.HudMap:RegisterRangeMarkerOnPartyMember(186123, "party", args.sourceName, 0.7, time, nil, nil, nil, 1, nil, false):Appear()--Players own dot bigger (no label on player dot)
DBM.HudMap:RegisterRangeMarkerOnPartyMember(186123, "party", args.sourceName, 0.7, time, nil, nil, nil, 1):Appear()--Players own dot bigger (no label on player dot)
if self.Options.NamesWroughtHud then
DBM.HudMap:RegisterRangeMarkerOnPartyMember(185014, "party", args.destName, 0.35, time, nil, nil, nil, 0.5, nil, false):Appear():SetLabel(args.destName, nil, nil, nil, nil, nil, 0.8, nil, -13, 8, nil)
DBM.HudMap:RegisterRangeMarkerOnPartyMember(185014, "party", args.destName, 0.35, time, nil, nil, nil, 0.5):Appear():SetLabel(args.destName, nil, nil, nil, nil, nil, 0.8, nil, -13, 8, nil)
else
DBM.HudMap:RegisterRangeMarkerOnPartyMember(185014, "party", args.destName, 0.35, time, nil, nil, nil, 0.5, nil, false):Appear()
DBM.HudMap:RegisterRangeMarkerOnPartyMember(185014, "party", args.destName, 0.35, time, nil, nil, nil, 0.5):Appear()
end
else
DBM.HudMap:RegisterRangeMarkerOnPartyMember(185014, "party", args.destName, 0.7, time, nil, nil, nil, 1, nil, false):Appear()--Players own dot bigger (no label on player dot)
DBM.HudMap:RegisterRangeMarkerOnPartyMember(185014, "party", args.destName, 0.7, time, nil, nil, nil, 1):Appear()--Players own dot bigger (no label on player dot)
if self.Options.NamesWroughtHud then
DBM.HudMap:RegisterRangeMarkerOnPartyMember(186123, "party", args.sourceName, 0.35, time, nil, nil, nil, 0.5, nil, false):Appear():SetLabel(args.sourceName, nil, nil, nil, nil, nil, 0.8, nil, -13, 8, nil)
DBM.HudMap:RegisterRangeMarkerOnPartyMember(186123, "party", args.sourceName, 0.35, time, nil, nil, nil, 0.5):Appear():SetLabel(args.sourceName, nil, nil, nil, nil, nil, 0.8, nil, -13, 8, nil)
else
DBM.HudMap:RegisterRangeMarkerOnPartyMember(186123, "party", args.sourceName, 0.35, time, nil, nil, nil, 0.5, nil, false):Appear()
DBM.HudMap:RegisterRangeMarkerOnPartyMember(186123, "party", args.sourceName, 0.35, time, nil, nil, nil, 0.5):Appear()
end
end
--create line
Expand Down
6 changes: 3 additions & 3 deletions DBM-Raids-WoD/Highmaul/Margok.lua
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ local brandedDebuff1, brandedDebuff2, brandedDebuff3, brandedDebuff4 = DBM:GetSp
local debuffFilterMark, debuffFilterBranded, debuffFilterFixate, debuffFilterGaze
do
debuffFilterMark = function(uId)
if DBM:UnitDebuff(uId, chaosDebuff1, chaosDebuff2, chaosDebuff3. chaosDebuff4) then
if DBM:UnitDebuff(uId, chaosDebuff1, chaosDebuff2, chaosDebuff3, chaosDebuff4) then
return true
end
end
Expand Down Expand Up @@ -619,7 +619,7 @@ function mod:SPELL_AURA_APPLIED(args)
end
updateRangeFrame(self)--Update it here cause we don't need it before stacks get to relevant levels.
if self.Options.HudMapOnBranded then
DBM.HudMap:RegisterRangeMarkerOnPartyMember(spellId, "highlight", args.destName, 3.5, 5, 1, 1, 0, 0.5, nil, true, 1):Pulse(0.5, 0.5)
DBM.HudMap:RegisterRangeMarkerOnPartyMember(spellId, "highlight", args.destName, 3.5, 5, 1, 1, 0, 0.5):Pulse(0.5, 0.5)
end
end
elseif spellId == 158553 then
Expand Down Expand Up @@ -685,7 +685,7 @@ function mod:SPELL_AURA_APPLIED(args)
end
updateRangeFrame(self)
if self.Options.HudMapOnMarkOfChaos then
DBM.HudMap:RegisterRangeMarkerOnPartyMember(spellId, "highlight", args.destName, 5, 7, 1, 0, 0, 0.5, nil, true, 2):Pulse(0.5, 0.5)
DBM.HudMap:RegisterRangeMarkerOnPartyMember(spellId, "highlight", args.destName, 5, 7, 1, 0, 0, 0.5):Pulse(0.5, 0.5)
end
elseif spellId == 157801 and self:CheckDispelFilter() then
specWarnSlow:CombinedShow(1, args.destName)
Expand Down

0 comments on commit c596868

Please sign in to comment.