Skip to content

Commit

Permalink
Fix rogue issues with LUA errors and thresholds.
Browse files Browse the repository at this point in the history
  • Loading branch information
Twintop committed Apr 18, 2024
1 parent 5339d71 commit 87d6ff5
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 14 deletions.
16 changes: 8 additions & 8 deletions ClassModules/Rogue.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2430,11 +2430,11 @@ if classIndexId == 4 then --Only do this if we're on a Rogue!
local targetData = TRB.Data.snapshotData.targetData --[[@as TRB.Classes.TargetData]]

if specId == 1 then -- Assassination
targetData:UpdateDebuffs(currentTime)
targetData:UpdateTrackedSpells(currentTime)
elseif specId == 2 then -- Outlaw
targetData:UpdateDebuffs(currentTime)
targetData:UpdateTrackedSpells(currentTime)
elseif specId == 3 then -- Outlaw
targetData:UpdateDebuffs(currentTime)
targetData:UpdateTrackedSpells(currentTime)
end
end

Expand Down Expand Up @@ -3936,7 +3936,7 @@ if classIndexId == 4 then --Only do this if we're on a Rogue!
end

local resourceAmount = CalculateAbilityResourceValue(spell.resource + viciousVenomsOffset, spell.nimbleFingers, spell.rushedSetup, spell.comboPoints)
TRB.Functions.Threshold:RepositionThreshold(specSettings, resourceFrame.thresholds[spell.thresholdId], resourceFrame, specSettings.thresholds.width, -resourceAmount, TRB.Data.character.maxResource)
TRB.Functions.Threshold:RepositionThreshold(specSettings, resourceFrame.thresholds[spell.thresholdId], resourceFrame, -resourceAmount, TRB.Data.character.maxResource)

local showThreshold = true
local thresholdColor = specSettings.colors.threshold.over
Expand Down Expand Up @@ -4193,9 +4193,9 @@ if classIndexId == 4 then --Only do this if we're on a Rogue!
local pairOffset = 0
for k, v in pairs(spells) do
local spell = spells[k]
if spell ~= nil and spell.id ~= nil and spell.resource ~= nil and spell.resource < 0 and spell.thresholdId ~= nil and spell.settingKey ~= nil then
if spell ~= nil and spell.id ~= nil and spell.resource ~= nil and spell.resource < 0 and spell.thresholdId ~= nil and spell.settingKey ~= nil then
local resourceAmount = CalculateAbilityResourceValue(spell.resource, spell.nimbleFingers, spell.rushedSetup, spell.comboPoints)
TRB.Functions.Threshold:RepositionThreshold(specSettings, resourceFrame.thresholds[spell.thresholdId], resourceFrame, specSettings.thresholds.width, -resourceAmount, TRB.Data.character.maxResource)
TRB.Functions.Threshold:RepositionThreshold(specSettings, resourceFrame.thresholds[spell.thresholdId], resourceFrame, -resourceAmount, TRB.Data.character.maxResource)

local showThreshold = true
local thresholdColor = specSettings.colors.threshold.over
Expand Down Expand Up @@ -4247,7 +4247,7 @@ if classIndexId == 4 then --Only do this if we're on a Rogue!
elseif spell.id == spells.pistolShot.id then
if snapshots[spells.opportunity.id].buff.isActive then
resourceAmount = resourceAmount * spells.opportunity.resourceModifier
TRB.Functions.Threshold:RepositionThreshold(specSettings, resourceFrame.thresholds[spell.thresholdId], resourceFrame, specSettings.thresholds.width, -resourceAmount, TRB.Data.character.maxResource)
TRB.Functions.Threshold:RepositionThreshold(specSettings, resourceFrame.thresholds[spell.thresholdId], resourceFrame, -resourceAmount, TRB.Data.character.maxResource)
end

if currentResource >= -resourceAmount then
Expand Down Expand Up @@ -4471,7 +4471,7 @@ if classIndexId == 4 then --Only do this if we're on a Rogue!
local spell = spells[k]
if spell ~= nil and spell.id ~= nil and spell.resource ~= nil and spell.resource < 0 and spell.thresholdId ~= nil and spell.settingKey ~= nil then
local resourceAmount = CalculateAbilityResourceValue(spell.resource, spell.nimbleFingers, spell.rushedSetup, spell.comboPoints)
TRB.Functions.Threshold:RepositionThreshold(specSettings, resourceFrame.thresholds[spell.thresholdId], resourceFrame, specSettings.thresholds.width, -resourceAmount, TRB.Data.character.maxResource)
TRB.Functions.Threshold:RepositionThreshold(specSettings, resourceFrame.thresholds[spell.thresholdId], resourceFrame, -resourceAmount, TRB.Data.character.maxResource)

local showThreshold = true
local thresholdColor = specSettings.colors.threshold.over
Expand Down
7 changes: 4 additions & 3 deletions Functions/News.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@ local content = [====[
---
# 10.2.6.8-beta01 (2024-04-16)
## Priest
# 10.2.6.8-release (2024-04-18)
## Rogue
- Attempt to fix Shadowfiend/Mindbender issues.
- (FIX (Twintop)) Fix LUA errors from a bad API call.
- (FIX (Twintop)) Fix threshold position being incorrect.
---
Expand Down
2 changes: 1 addition & 1 deletion Functions/Threshold.lua
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ local function SetThresholdIconSizeAndPosition(settings, thresholdLine)
end
end

function TRB.Functions.Threshold:RepositionThreshold(settings, thresholdLine, parentFrame, resourceThreshold, resourceMax)
function TRB.Functions.Threshold:RepositionThreshold(settings, thresholdLine, parentFrame, resourceThreshold, resourceMax, debug)
if settings == nil or settings.bar == nil or thresholdLine == nil then
print(L["RepositionThresholdInvalid"])
return
Expand Down
4 changes: 2 additions & 2 deletions TwintopInsanityBar.toc
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
## Author: Twintop
## X-AuthorServer: Frostmourne-US/OCE
## Version: 10.2.6.8
## X-ReleaseType: beta
## X-ReleaseDate: 2024-04-16
## X-ReleaseType: release
## X-ReleaseDate: 2024-04-18
## SavedVariables: TwintopInsanityBarSettings
## IconTexture: 1386550
## DefaultState: enabled
Expand Down

0 comments on commit 87d6ff5

Please sign in to comment.