Detecting a spell sound or registering a callback on it
Hiya!
As the title says... Would it be possible to detect a spell sound or register a callback on it? I'm asking this because of Bag of Tricks (192657) and afaik, it doesn't show any GUI indications on both player and enemies, but only a sound effect or AoE texture on floor when it pops :( Any ideas, please? Thank you! |
You can't detect when a specific sound is played (unless it was played by the UI code or an addon) but you can detect when a spell is cast.
Try this: Code:
local f = CreateFrame("Frame") |
Quote:
Just tried your approach and seems like this particular spell cannot be tracked that way :/ I also attempted printing all those succeeded spells' name and id, but no luck... Lua Code:
|
The major goal is to track the start time and expiration of Poison Bomb (192660) and since the duration is fixed to 3 seconds, the expiration could be easily calculated, but obtaining a start time is bit complicating.
I had a go with COMBAT_LOG_EVENT_UNFILTERED and thankfully(?), it does track the damage done via Poison Bomb, but there is still a case where the Poison Bomb is newly applied before the previous one is expired :confused: |
Usually when you apply a dot, hot, aura on a target that does not have it from you, you get a SPELL_AURA_APPLIED as your combat log sub event and when reapplying a non-expired dot, hot, aura you get a SPELL_AURA_REFRESH sub-event instead. Maybe that is the case.
|
Quote:
The first thing that I've done with COMBAT_LOG_EVENT_UNFILTERED was to see which sub events are fired with those spells (192657 and 192660). Lua Code:
Sadly, the only sub event fired was SPELL_DAMAGE :( If I'm guessing correctly, SPELL_AURA_APPLIED and SPELL_AURA_REFRESH are not fired since this spell doesn't even apply any debuff on enemies. So... yeah :/ |
I would be very surprised if UNIT_SPELLCAST_SUCCEEDED didn't fire for this spell.
Try using RegisterEvent instead of RegisterUnitEvent, and then filter by source after you determine if it fires. RegisterUnitEvent sometimes doesn't behave the way you would expect it to. Also don't assume you have the spell IDs correct, watch for the spell name if you need to filter it or just don't filter it at all if it isn't too spammy, then once you know you have the right spell ID you can watch for that. Occasionally scripted spells aren't considered "cast" by the player and can't be tracked directly, but they're relatively uncommon. |
Quote:
Just had a shot with RegisterEvent (instead of RegisterUnitEvent) as you've advised, but yeah...... It's still not getting it... Lua Code:
In addition to this, I've tried to print all available results from COMBAT_LOG_EVENT_UNFILTERED, but same for this one. Lua Code:
The only sub event fired for a poison bomb related spell is SPELL_DAMAGE. Hm..................... This is so tricky :confused: |
If the only thing you can watch that even identifies whether the spell has procced is SPELL_DAMAGE, and it only has a chance of happening after casting Envenom or Rupture, then you can possibly measure the time difference between the SPELL_DAMAGE event and when the last Envenom or Rupture was cast (on the same target) to gauge whether it was spawned by a new cast or not.
This relies on relatively stable timings, so it might not be a particularly good solution, but it doesn't look like there are a lot of alternatives here. You can also judge by how frequently the damage ticks are happening on a particular target (eg. if the pool ticks every 0.5ish seconds, but the mob took 2 hits before the next tick should have happened, there must be more than one out). I pulled up a random assassination rogue on warcraftlogs to check timings, it might help you with this if you want to go that route. |
I have not deeply considered the first solution yet, but since the second solution also came across my mind, I have thought of some possible cases.
You are right. The duration of this spell is 3 seconds and according to COMBAT_LOG_EVENT_UNFILTERED, this ticks every 0.5ish second and in total does 6 ticks. BUT, I ain't sure if this is affected by haste... 1. Poison Bomb A (pbA) and Poison Bomb B (pbB) Let's say pbA did spawn and already did some damage ticks. But, what if pbB newly spawns and does its first tick damage on the same time as pbA's next tick? I know the chance is SUPER low, but theoretically it is possible, isn't it? 2. Poison Bomb A (pbA) + Enemy A (eA) and Enemy B (eB) There's only one poison bomb, pbA, spawned underneath eA which already did couple of damage ticks, then eB suddenly jumps onto pbA. If poison bomb ticks same for both creature no matter whether they jumped on late or not, that should be fine. However, what if that single poison bomb ticks differently for each creatures? This could be confirmed by testing, but I currently can't enter the game :/ EDIT #1 Thank you for warcraftlogs link! I'll have a look into it :) EDIT #2 I guess your first solution would be more suitable in this case. It's more reasonable, straight-forward and just makes more sense. But, would still need more consideration to identify whether it's new cast or not. According to the log, poison bombs are mostly spawned within 0.6 second after Rupture or Envenom, but there is still a case where it's spawned only 0.062 second after Rupture :eek: OR where the current poison bomb's next tick is still done within 0.6 second after Rupture or Envenom. |
Quote:
Quote:
I didn't notice overlapping casts of Poison Bomb in the couple of logs I looked at, so I'm not sure how common this is, or how important it is to track separate instances of it for whatever it is that you're creating. Quote:
Alright, I think this graph should show both the casts and the damage events in the same list. |
Quote:
Quote:
+ Guess I should do some research (or experiment) on how Poison Bomb works. |
So, here's what I've got so far.
(It took a time... I know... I was just lazy and didn't do any research or test for a week :p) According to the log that semlar had provided, the first tick of poison bomb normally occurs about 0.5 seconds after either by envenom or rupture cast. Here's the calculation that I've done with that log. Code:
00:00:06.778 Rupture And here's the most cheaty way that I could think of... Lua Code:
This is working fine against single training dummy. And since semlar had confirmed that the single poison bomb pool works equally against multiple targets even if they jump in late, that's not a problem. However, in case if I'm in raid or mythic+ where I could fire those finishers fast enough which didn't even spawn new poison bomb pool, but has a time stamp gap between 0.4 and 0.6 with existing pool's damage tick... Like semlar questioned, spawning two overlapping pools are pretty rare cases, but still possible and sometimes it's quite easy to observe especially when encountering bosses or large number of trashes. However, since the poison bomb is not visible by other group members (especially by TANKS) lots and lots of pools are wasted and ultimately you'll lose tons of DPS which depresses me playing Assassination rogue :( I wish WoW Dev team to revise such spells and make it more flexible (or visible) so that it could be easily tracked with Lua. |
All times are GMT -6. The time now is 04:27 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI