Hi there!
I’m working on fixind / updating the functionality of my simple addon Remaining XP, and I have discovered that when PLAYER_XP_UPDATE is being called, it fires
- 2 times after killing a mob
- 2 times after gaining a level (4 times if the level-up xp is gained from a mob kill)
- and only one time after completing a quest, gathering an herb (and probably anything else), opening a treasure and discovering a new location (these were the only cases I was able to test so far).
I haven’t yet been able to determine why this would be the case. Does anyone know?
Relevant code snippets:
remainingXP:RegisterEvent("PLAYER_XP_UPDATE")
remainingXP:SetScript("OnEvent", function(self, event, ...)
return self[event] and self[event](self, ...)
end)
function remainingXP:PLAYER_XP_UPDATE()
UpdateXP()
print("PLAYER_XP_UPDATE")
end
“PLAYER_XP_UPDATE” is printed as many times as I described above when the specific events occur.