调整dps插件对仇恨的估算方式

优化dps插件
This commit is contained in:
rucky
2026-03-25 00:57:35 +08:00
parent 5c3f2243c4
commit 12c8c55159
16 changed files with 2454 additions and 165 deletions

View File

@@ -196,9 +196,16 @@ function DataStore:AddThreat(source, amount)
d[source] = { _sum = 0 }
end
d[source]._sum = d[source]._sum + amount
if d[source]._sum < 0 then d[source]._sum = 0 end
end
end
function DataStore:GetPlayerThreat(source)
if not source then return 0 end
local d = self.current.data.threat[source]
return d and d._sum or 0
end
function DataStore:UpdateActivity(source, timestamp)
if not source then return end
local segs = { self.current, self.total }