• 0

    posted a message on COMBAT_LOG_EVENT_UNFILTERED and unitid
    Quote from myrroddin
    I'm sure someone will correct me, but wouldn't checking CLEU for anything pvp related require the opposing player to actually do something that would show up in the combat log? If the player is just moving by you, then no entry in CLEU, and then what?

    Now, if he casts, uses an item, or whatever, then maybe.


    Yes, that is my understanding. You could potentially have a PVP flagged enemy unit walk right past you completely undetected. However, I didn't find an event that fired when a unit was in a players vicinity. Ideally there would be a UNIT_IN_VICINITY that passed a unitid and coordinates of the unit, but since this doesn't exist (at least I haven't found it) then I think this is the next best thing. If you know of a better way, I'm all ears, err, eyes :)

    In addition though I am going to monitor the mouse over event as well which should increase the chance of finding these players.
    Posted in: Lua Code Discussion
  • 0

    posted a message on COMBAT_LOG_EVENT_UNFILTERED and unitid
    Quote from Brimmstone

    Just out of curiousity, what is the end result that you're trying to accomplish?


    Thanks for your reply. Well I'd like to write an addon. What I'd like to do has already been done before, but the point is I'd like to do one myself just for the sake of doing it and calling it my own. What I'd like to do is create monitor that will write to the chat log and play a sound when an enemy player that is flagged PVP is in my vicinity. So I started researching how to accomplish this and found these API's (http://www.wowwiki.com/World_of_Warcraft_API#Unit_Functions) It looked like it would be easy to monitor the combat log, then pass player names to UnitIsEnemy and UnitIsPVP and be done with it. But as you say, you can only pass player names to these API's when they are in your party/raid so I guess I'm gonna have to check the flags as suggested by Nevcairiel to get the information I want. It's a shame because it looked like it could be done so easily.
    Posted in: Lua Code Discussion
  • 0

    posted a message on COMBAT_LOG_EVENT_UNFILTERED and unitid
    Quote from myrroddin
    If it helps, you could look at the code for MrBigglesworthDeath, found on Curse, and see how I got the unitID (with help from Cladhaire and OrionShock).


    Thank you. I did take a look and it looks like your code assumes you already know the guid of the user your looking for, in your case Mr. Bigglesworth. In my case, I wouldn't know that because these would be live players within the game. I think I'm probably going to have to do something along the lines of Nevcairiel's suggestion. But thank you for your help. I guess Blizzard just doesn't want you to know to much about enemy players.
    Posted in: Lua Code Discussion
  • 0

    posted a message on COMBAT_LOG_EVENT_UNFILTERED and unitid
    Quote from Nevcairiel
    If the unit you're trying to check is a member of your party/raid, you can just use the name as a parameter for the Unit* functions. If its not, you'll have to scan all possible units and compare GUIDs and/or names.


    I'm not really concerned with friendly units. So what do I compare them against?

    What I'm trying to find out are things like UnitIsEnemy and UnitIsPVP when the unit is not a member of a party/raid, pet, npc or myself. I know you can tell from the GUID whether or not it is a player, npc or pet, but I'm not sure how to find out how to tell if it is an enemy or flagged PVP. I see Blizzard provides functions for this, but they require a unitid and I'm just not sure how to get it from the COMBAT_LOG_EVENT_UNFILTERED event or if it is possible.
    Posted in: Lua Code Discussion
  • 0

    posted a message on COMBAT_LOG_EVENT_UNFILTERED and unitid
    I'm a n00b and I can't find the answer to this anywhere. I'd like to know if it is possible to get the unitid in the COMBAT_LOG_EVENT_UNFILTERED event. Basically I'd like to be able to use the UnitIs* functions against the source. So I was thinking one could convert either sourceGUID or sourceName to a unitid but I'm beginning to think this is not possible. Any ideas?
    Posted in: Lua Code Discussion
  • To post a comment, please or register a new account.