Skip to content

Commit

Permalink
Merge pull request #3 from partouf/bug2
Browse files Browse the repository at this point in the history
fix #2
  • Loading branch information
partouf committed Nov 25, 2019
2 parents dd3fb1a + 9cc25e3 commit 04e2c1e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions ManaWarning-Classic.lua
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,10 @@ function ManaWarning_PlayerManaUpdate()
currentmana = UnitPower(CONST_PLAYER)

bMayGiveWarning = true
if (bManaDoCombatCheck) then

if (UnitIsDead(CONST_PLAYER)) then
bMayGiveWarning = false
elseif (bManaDoCombatCheck) then
-- don't warn if we're not in combat
if (UnitAffectingCombat(CONST_PLAYER) == nil) then
bMayGiveWarning = false
Expand Down Expand Up @@ -750,7 +753,10 @@ function ManaWarning_PlayerHealthUpdate()
maxhp = UnitHealthMax(CONST_PLAYER)

bMayGiveWarning = true
if (bHealthDoCombatCheck) then

if (UnitIsDead(CONST_PLAYER)) then
bMayGiveWarning = false
elseif (bHealthDoCombatCheck) then
-- don't warn if we're not in combat
if (UnitAffectingCombat(CONST_PLAYER) == nil) then
bMayGiveWarning = false
Expand Down
2 changes: 1 addition & 1 deletion ManaWarning-Classic.toc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
## Interface: 11302
## SavedVariablesPerCharacter: ManaWarning_Settings
## Title: ManaWarning-Classic
## Version: 1.0
## Version: 1.1
## X-eMail: partouf@gmail.com
ManaWarning-Classic.xml
ManaWarning-Classic.lua

0 comments on commit 04e2c1e

Please sign in to comment.