1. #1

    [Lua/WoW API] Problems with first addon (concerning Prayer of Mending)

    This is the first addon I've tried writing myself and I'm no professional programmer, so please keep that in mind when reading this.

    Imagine the following scenario:

    I buff Prayer of Mending (ProM) on myself.
    Then, I get damaged and the ProM buff jumps to a party member. There are 4 charges left on the ProM buff.
    Then, I cast ProM on the party member that already has the buff with 4 charges, so that they now have 5 charges.

    Shouldn't the change from 4 charges to 5 charges trigger a COMBAT_LOG_EVENT_UNFILTERED, like SPELL_AURA_APPLIED_DOSE or SPELL_AURA_REFRESH? I wrote the following line to detect any events involving ProM:

    Code:
    -- inside the COMBAT_LOG_EVENT_UNFILTERED handler
    -- spellName is the spell name of the event
    -- event is the event name
    -- promName is the localized name of Prayer of Mending ("Prayer of Mending")
    if spellName == promName then self:Print(event) end
    The only event I detect during the problematic moment in the given scenario is SPELL_CAST_SUCCESS, which isn't what I'm looking for (because those ProM events are too damn complicated/unreliable... long story). Is it possible that there is a server side bug preventing SPELL_AURA_APPLIED_DOSE from firing? Or is that very unlikely (which means I'm missing something)?


    The addon is supposed to track where the ProM buff is at the moment and how many charges there are left. Am I better off just constantly scanning all my party/raid members for ProM buffs? My concern is that this is too expensive, but I'm getting really frustrated with my current approach, which is tracing the ProM path by scanning the combat log events.

  2. #2
    Deleted
    Without seeing the rest of the function / addon I really can't comment on the issue, however:
    You can use the builtin /eventtrace command to check which events are fired, this should atleast help you identify if the problem is on your side.

  3. #3
    Quote Originally Posted by ccKep View Post
    Without seeing the rest of the function / addon I really can't comment on the issue, however:
    You can use the builtin /eventtrace command to check which events are fired, this should atleast help you identify if the problem is on your side.
    I didn't know that command, thanks for pointing that out, I will try it out tomorrow (I'm on a different computer right now) and see if I get different reports.

  4. #4
    because the stack goes from 4 to 5, i dont think it will fire the spell refresh, instead it will just fire spell aura applied. if you had 5 stacks and then cast prom on yourself again, then it should fire spell refreshed as stacks were unchanged

  5. #5
    So I tried this again using /etrace and if ProM is applied to a target which already has 4 charges of ProM, the only COMBAT_LOG_EVENT_UNFILTERED that fires will be SPELL_CAST_SUCCESS. There is no SPELL_AURA_APPLIED, SPELL_AURA_APPLIED_DOSE or SPELL_AURA_REFRESH or anything like it.

    I've managed to make the tracking work (using SPELL_CAST_SUCCESS) regardless. Thanks for the help!

    EDIT: And in case anyone cares, SPELL_CAST_SUCCESS is fired before the charges on the target have been set to 5 (or 4 if glyphed).
    Last edited by reckoner04; 2012-12-28 at 02:09 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •