Thread Tools Display Modes
03-15-23, 01:42 PM   #1
ReverendDikiy
A Defias Bandit
Join Date: Dec 2022
Posts: 2
How to get the nickname of a killed player?

Hello everyone, I'm new to developing addons for the game. Can you please tell me how to get the nickname (and server) of the player I killed in PvP mode
  Reply With Quote
03-15-23, 02:02 PM   #2
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,892
First off, welcome to the world of addon programming.
Secondly, bookmark these sites if you haven't already:
https://wowpedia.fandom.com/wiki/Wow..._customization
https://www.townlong-yak.com/framexml/live

This link points you to how you can get unit info which would be your target or mouseover etc..
https://wowpedia.fandom.com/wiki/API...me#GetUnitName


The following is an old post that asked the same question.
https://www.wowinterface.com/forums/...ad.php?t=55898
But .. I couldn't see UNIT_DIED or PARTY_KILL on wowinterface now so may be events that have been removed.

The other option is
https://wowpedia.fandom.com/wiki/PLA..._KILLS_CHANGED
But all it does is pick up a unit_id which you might be able to use to get the unit name using the function I mentioned above.

The problem though is whether your target changes between you killing the person and the event triggering and being acted on.

But good luck.
__________________
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » How to get the nickname of a killed player?

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