View Single Post
06/17/20, 06:33 AM   #2
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,989
Code:
oponent is one of harrowstorm ennemies (ppl tend to bring aggroed mobs with them)
I guess you won't be able to track this properly as there is nothing except MAYBE the name of the enemy unit.
Maybe the "sourceType" states that it was a kind of NPC and you can use this to track it was not done by other players.
But afaik ZOs changed the combat event results (at least for other "players") to retrur nothing anymore.

Found this in the Wiki:
Note: In most cases combat events will only return relevant values if the player character is either the source or the target of the event! In most other cases they only return the abilityId and the target's unitId!

So you'd ned to use the unitId and GetUnitName(unitId), multi language, as I thought :-(
And for those you get hit it would be sourceType = COMBAT_UNIT_TYPE_NONE I guess, as (COMBAT_UNIT_TYPE_OTHER would be another player, says the Wiki)

Code:
(random( 0..x) seconds to avoid 50 parallel zone chat announcments by different players with addon)
(x might have to be sufficiently high, zone chat lags sometimes)
I'd rather listen to chat message event and if any message about the same HS was broadcasted in the same zone chat in the last x seconds forget your broadcast at all -> supress it.
Else you still get the chat spam by 20+ addon users within a few secons which will be makign A LOT of the players mad that woudl like to use teh chat for other searches (mobs, bosses, qeusts) as well


Maybe also/instead of using the harrowstorm coordinates on the map, simply add a context menu to the harrowstorms map pin. Users can start the broadcast via the context menu more reliably as the name of the map pin should be unique and reusable for the chat broadcast.
You'd only need to pre-collect the multiple languages of the Harrowstorm names... But easier than collecting the "positions" imo

Maybe there also is some kind of function in the LibGPS and/or other libraries to track if you are near such a map pin, already

Last edited by Baertram : 06/17/20 at 06:46 AM.
  Reply With Quote