Skip to content

Commit

Permalink
- small cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
cont1nuity committed Jan 10, 2025
1 parent 44fdc54 commit a864314
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
10 changes: 1 addition & 9 deletions Plater.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5517,15 +5517,13 @@ function Plater.OnInit() --private --~oninit ~init
local currentHealth = self.currentHealth
local currentHealthMax = self.currentHealthMax
local unitFrame = self.unitFrame
local oldHealth = self.CurrentHealth
local oldHealth = self.CurrentHealth or currentHealth

--> exposed values to scripts
self.CurrentHealth = currentHealth
self.CurrentHealthMax = currentHealthMax

if (plateFrame.IsSelf) then
self.CurrentHealth = currentHealth
self.CurrentHealthMax = currentHealthMax

--> flash if low health
if (currentHealth / currentHealthMax < 0.27) then
Expand Down Expand Up @@ -5565,9 +5563,6 @@ function Plater.OnInit() --private --~oninit ~init

if (DB_DO_ANIMATIONS) then
--do healthbar animation ~animation ~healthbar
oldHealth = oldHealth or self.CurrentHealth

self.CurrentHealthMax = currentHealthMax
self.AnimationStart = oldHealth
self.AnimationEnd = currentHealth

Expand All @@ -5580,9 +5575,6 @@ function Plater.OnInit() --private --~oninit ~init
else
self.AnimateFunc = Plater.AnimateLeftWithAccel
end
else
self.CurrentHealth = currentHealth
self.CurrentHealthMax = currentHealthMax
end

if (plateFrame.actorType == ACTORTYPE_FRIENDLY_PLAYER) then
Expand Down
4 changes: 3 additions & 1 deletion Plater_ChangeLog.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ function Plater.GetChangelogTable()
if (not Plater.ChangeLogTable) then
Plater.ChangeLogTable = {

{1734100705, "Backend Change", "Dec 19th, 2024", "Framework updates.", "Terciob"},
{1736525778, "Bug Fix", "Jan 10th, 2024", "Fixing range check for cases when no range can be selected.", "cont1nuity"},

{1735420632, "Backend Change", "Dec 19th, 2024", "Framework updates.", "Terciob"},
{1735420632, "Backend Change", "Dec 18th, 2024", "Retail TOC update.", "cont1nuity"},
{1735420632, "New Feature", "Dec 18th, 2024", "Adding Blizzard addon profiling information to profiler.", "cont1nuity"},

Expand Down

0 comments on commit a864314

Please sign in to comment.