WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   PARTY_KILL event and world creature (https://www.wowinterface.com/forums/showthread.php?t=55911)

maqjav 12-11-17 07:55 AM

PARTY_KILL event and world creature
 
Hello.

I'm trying to see if a member of my party (or just me) killed an enemy.
I'm capturing the event PARTY_KILL, however I'm seeing that if the person who deals the last hit isn't in the group, the event is not fired.
If I use UNIT_DIED, I always capture the event, but even if I'm walking beside the enemy and didn't even hit it once.

How can I capture if someone in my party/raid, and only in my party/raid killed or helped to kill an enemy (with help I mean to kill something that you can loot after)?

Thanks.

myrroddin 12-16-17 07:28 AM

PARTY_KILL only checks within your party, as you noticed. It does not even check if someone in your raid but not in your actual party gets the kill.

What I would do is use UNIT_DIED and from that get the GUID of the killer, then check if that GUID is also in your party (or raid, or both, depending on what you need).


All times are GMT -6. The time now is 04:13 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI