Yield xp/honor - WoWInterface
Thread Tools Display Modes
09-30-20, 05:59 PM   #1
A Murloc Raider
Join Date: Sep 2020
Posts: 5
Yield xp/honor

Are there any API calls that can tell you if the killed target yielded xp/honor? Also, is there anyway to check if you have the 'tag' on a target you kill?

Currently the only way I can think of doing it is checking the targets level. In the case of honor checking level and if guid includes player.
  Reply With Quote
09-30-20, 08:53 PM   #2
nUI Maintainer
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,551
There is : UnitIsTapDenied(..)
I would assume you pass the unit in question and it will return whether it has been tapped, or maybe tap info as to why it is denied. But I could see nothing else that appear to work after it is tapped.

The honor/xp values you may have to go via the Combat Log event tracking. But you could use UnitIsTrivial(unit) to check if you will get something however little.
  Reply With Quote
10-01-20, 04:26 AM   #3
An Aku'mai Servant
Join Date: Apr 2009
Posts: 37
Regarding gaining xp couldnt you do:


local function calculate(event, isInitialLogin, isReloadingUi)
	if event == "PLAYER_ENTERING_WORLD" and (isInitialLogin or isReloadingUi) then
		maxxp = UnitXPMax("player")
		currentxp = UnitXP("player")
		newxp = UnitXP("player")
		if event == "PLAYER_LEVEL_UP" then
			gained = maxxp - currentxp + newxp
			maxxp = UnitXPMax("player")
			gained = newxp - currentxp

		currentxp = newxp

local f = CreateFrame("FRAME")
	function(self, event, isInitialLogin, isReloadingUi)
		calculate(event, isInitialLogin, isReloadingUi)

something similar but due to blizzards honor calculation a little bit more complicated for honor aswell...
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » Yield xp/honor

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off