Delete the Lua Dark Harvest acceleration

Same shape as Carnage, opposite direction: Dark Harvest is a channel that makes
the caster's DoTs on the target tick 30% faster, and the server never tells an
observer the remaining durations changed. So this addon stamped dhStartTime on
every tracked record when the channel began, dhEndTime when it stopped, and
subtracted 30% of the elapsed window from each remaining time on read.

ClassicAPI compresses the ticks in the DLL (src/turtle/DarkHarvest.cpp), so
expirationTime already reflects it.

Removed: GetDarkHarvestReduction, ApplyDarkHarvestStart, ApplyDarkHarvestEnd,
GetTimeRemainingWithDarkHarvest, the channel-start capture on both the
UNIT_CASTEVENT and nampower paths, the channel-stop finalizer in
SPELLCAST_CHANNEL_STOP, the darkHarvestData state, and DarkHarvestSpellIDs.

The darkHarvest flag in Extensions/CursiveCustomSpells.lua stays -- that is
spell metadata this addon exports to Cursive, not tracking of our own.
This commit is contained in:
Brues
2026-09-12 20:27:16 -05:00
parent 073621e233
commit 53a1cf1441
3 changed files with 0 additions and 141 deletions
-8
View File
@@ -145,14 +145,6 @@ CleveRoids.ImmolateSpellIDs = {
[25309] = true, -- Rank 8
}
-- =============================================================================
-- WARLOCK: Dark Harvest Duration Acceleration (TWoW Custom)
-- Channeled spell that accelerates DoT tick rate by 30% while channeling
-- Complex tracking: debuff expires 30% faster while Dark Harvest is active
-- =============================================================================
-- TWoW custom (see MoltenBlast note).
CleveRoids.DarkHarvestSpellIDs = RankSet(52550)
-- =============================================================================
-- DRUID: Rake Debuff Cap Boss Whitelist
-- These bosses are likely to hit the 48 debuff cap, causing Rake to get pushed off
-20
View File
@@ -5061,26 +5061,6 @@ function CleveRoids.Frame:SPELLCAST_CHANNEL_STOP()
CleveRoids.CurrentSpell.spellName = ""
CleveRoids.CurrentSpell.castingSpellId = nil
-- WARLOCK DARK HARVEST: Mark channeling as ended
-- Credits: Avitasia / Cursive addon
if CleveRoids.darkHarvestData and CleveRoids.darkHarvestData.isActive then
CleveRoids.darkHarvestData.isActive = false
CleveRoids.darkHarvestData.endTime = GetTime()
-- Apply Dark Harvest end to all DoTs on target (finalizes reduction)
if CleveRoids.libdebuff and CleveRoids.libdebuff.ApplyDarkHarvestEnd then
CleveRoids.libdebuff.ApplyDarkHarvestEnd(CleveRoids.darkHarvestData.targetGUID)
end
if CleveRoids.debug then
local activeTime = CleveRoids.darkHarvestData.endTime - CleveRoids.darkHarvestData.startTime
DEFAULT_CHAT_FRAME:AddMessage(
string.format("|cff9482c9[Dark Harvest]|r Channel ended after %.1fs (DoT acceleration stopped)",
activeTime)
)
end
end
-- Force immediate action update
CleveRoids.TestForAllActiveActions()
end
-113
View File
@@ -2347,74 +2347,6 @@ local function SeedUnit(unit)
end
end
-- WARLOCK DARK HARVEST: Duration Acceleration System (TWoW Custom)
-- Credits: Avitasia / Cursive addon
-- Dark Harvest is a channeled spell that accelerates DoT tick rate by 30%
-- While channeling, DoTs on the target expire 30% faster
-- Calculate Dark Harvest reduction for a debuff record
-- Returns the amount of time to subtract from remaining duration
function lib.GetDarkHarvestReduction(rec)
if not rec or not rec.dhStartTime then
return 0
end
local endTime = rec.dhEndTime or GetTime()
local dhActiveTime = endTime - rec.dhStartTime
if dhActiveTime > 0 then
return dhActiveTime * 0.3 -- 30% acceleration
end
return 0
end
-- Track Dark Harvest start for all DoTs on target
function lib.ApplyDarkHarvestStart(targetGUID)
if not lib.objects[targetGUID] then return end
local now = GetTime()
for spellID, rec in pairs(lib.objects[targetGUID]) do
if type(rec) == "table" and rec.duration and rec.start then
-- Only affect DoTs (debuffs with duration > 0 that tick)
-- Skip if already has dhStartTime (avoid double-tracking)
if not rec.dhStartTime then
rec.dhStartTime = now
rec.dhEndTime = nil -- Clear any previous end time
end
end
end
if CleveRoids.debug then
DEFAULT_CHAT_FRAME:AddMessage(
string.format("|cff9482c9[Dark Harvest]|r Started accelerating DoTs on %s",
lib.guidToName[targetGUID] or "Unknown")
)
end
end
-- Track Dark Harvest end for all DoTs on target
function lib.ApplyDarkHarvestEnd(targetGUID)
if not lib.objects[targetGUID] then return end
local now = GetTime()
for spellID, rec in pairs(lib.objects[targetGUID]) do
if type(rec) == "table" and rec.dhStartTime and not rec.dhEndTime then
rec.dhEndTime = now
end
end
end
-- Get time remaining for a debuff, accounting for Dark Harvest acceleration
function lib.GetTimeRemainingWithDarkHarvest(rec)
if not rec or not rec.duration or not rec.start then
return 0
end
local baseRemaining = rec.duration + rec.start - GetTime()
local dhReduction = lib.GetDarkHarvestReduction(rec)
return baseRemaining - dhReduction
end
-- Personal debuff pending tracking system
-- Stores personal debuffs to be added after 0.5s delay (to verify they weren't dodged/parried/blocked)
-- Format: { [index] = { timestamp = GetTime(), targetGUID = guid, targetName = name, spellID = id, duration = X, comboPoints = CP } }
@@ -3715,31 +3647,6 @@ ev:SetScript("OnEvent", function()
end
end
-- WARLOCK DARK HARVEST: Track channeling for DoT acceleration (TWoW Custom)
-- Credits: Avitasia / Cursive addon
-- Dark Harvest accelerates DoT tick rate by 30% while channeling
if eventType == "CHANNEL" and CleveRoids.DarkHarvestSpellIDs and CleveRoids.DarkHarvestSpellIDs[spellID] then
-- Get channel duration from tooltip or use base duration (8 seconds)
local channelDuration = 8 -- Base Dark Harvest duration
CleveRoids.darkHarvestData = {
targetGUID = targetGUID,
spellID = spellID,
startTime = GetTime(),
channelDuration = channelDuration,
isActive = true
}
-- Apply Dark Harvest acceleration to all existing DoTs on target
lib.ApplyDarkHarvestStart(targetGUID)
if CleveRoids.debug then
DEFAULT_CHAT_FRAME:AddMessage(
string.format("|cff9482c9[Dark Harvest]|r Started channeling on %s (DoTs will tick 30%% faster)",
lib.guidToName[targetGUID] or "Unknown")
)
end
end
end
end
@@ -4259,26 +4166,6 @@ ev:SetScript("OnEvent", function()
end
end
-- WARLOCK DARK HARVEST: Track channeling for DoT acceleration (TWoW Custom)
local spellType = arg8
if spellType == 1 and CleveRoids.DarkHarvestSpellIDs and CleveRoids.DarkHarvestSpellIDs[spellID] then
local channelDuration = 8 -- Base Dark Harvest duration
CleveRoids.darkHarvestData = {
targetGUID = targetGuid,
spellID = spellID,
startTime = GetTime(),
channelDuration = channelDuration,
isActive = true
}
lib.ApplyDarkHarvestStart(targetGuid)
if CleveRoids.debug then
DEFAULT_CHAT_FRAME:AddMessage(
_string_format("|cff9482c9[Dark Harvest]|r Started channeling on %s (DoTs will tick 30%% faster)",
lib.guidToName[targetGuid] or "Unknown")
)
end
end
end
end