View Bug Report
Experience Bar doesn't work stable for Veteran Rank
Bug #: 574
File: Azurah - Interface Enhanced (Outdated)
Date: 05/04/14 10:19 AM
By: Swarog
Status: Fixed
There is unstable Experience Bar behavior on Veteran Rank.

We got millions of percentages instead max of 100%. This happens due to division by zero after second event on Veteran Rank:
Code:
1. OnExpGain(code="EVENT_STATS_UPDATED", unit="player", current="802310", max="912000")
2. OnExpGain(code="EVENT_VETERAN_RANK_UPDATE", unit="player", current="1818980", max="0")
My solution is (check for "code == EVENT_STATS_UPDATED"):
Code:
function Azurah.OnExpGain(code, unit, current, max)
	if (code == EVENT_STATS_UPDATED and unit == 'player') then
		Azurah.overlays.exp:SetText(Format_All(current, nil, max))
	end
end

RSS 2.0 Feed for Bug CommentsNotes Sort Options
By: Swarog - 05/04/14 10:51 AM
This is not final solution. And I found that it may not work. Digging deeper...
By: Swarog - 05/04/14 12:08 PM
Solution in my first post doesn't work. Working one is:
Code:
function Azurah.OnExpGain(code, unit, current, max)
	if (max > 0 and unit == 'player') then
		Azurah.overlays.exp:SetText(Format_All(current, nil, max))
	end
end