WeakAuras

Focus Magic notification

  • 4 posts
    #1 May 12, 2011 at 23:36 UTC - 0 likes

    I'm using a text notification to remind me to cast Focus Magic if not already present on someone, including who it was most previously cast on. I have a set of two text displays, which works, but I'm wondering if there is a better or more efficient way to do it.

    The first display simply triggers when I cast Focus Magic, and records who it was cast on. The custom trigger will always return false as I don't want it to display anything, just set the global variable.

    • Trigger: Custom
    • Event Type: Event
    • Event(s): COMBAT_LOG_EVENT_UNFILTERED
    • Custom Trigger:
      function(_, _, message, _, _, source, _, destGUID, dest, _, _, spellName)
      	if(message == "SPELL_CAST_SUCCESS" and UnitIsUnit(source or "", "player") and spellName and spellName:find("Focus Magic")) then
      		WeakAuras_FM_Target = dest
      		return false
      	end
      end
      
    • Load: Not In Combat, Talent Spec: first tree, Instance Type: 5man, 10man, 25man

    The second display triggers if Focus Magic is not found.

    • Display Text: %c
    • Custom Function:
      function()
      	if (WeakAuras_FM_Target) then
      		return "Reapply FM on\n"..WeakAuras_FM_Target
      	else
      		return "Apply FM"
      	end
      end
      
    • Trigger: Aura
    • Aura(s): Focus Magic
    • Unit: Group
    • Group Member Count: =0
    • Aura Type: Buff
    • Own Only: on
    • Load: Not In Combat, Talent Spec: first tree, Instance Type: 5man, 10man, 25man

    Is there a way to achieve the same thing with 1 display? Or a more efficient way to do it with 2 displays?

    Last edited May 12, 2011 by martinc
    #2 May 13, 2011 at 01:23 UTC - 0 likes

    Well, I would recommend condensing it into one display using two triggers. Use the Custom Trigger as the Main Trigger, but instead of making it always return false, make it always return true. Also, you could move the Custom Text function to the Name Info of your Custom Trigger, and change the Display Text from "%c" to "%n" (that should make it update far less often, provided the mechanics of dynamic info updates are working how I think they should).

    #3 May 13, 2011 at 01:46 UTC - 0 likes

    Actually this display requires a little finesse to make it visible when necessary but not update unnecessarily all the time. Once I'm done raiding I'll think about it more.

    #4 May 13, 2011 at 04:55 UTC - 0 likes

    After some thought, I don't think there is any elegant way to improve the CPU efficiency of this display; trying to keep the Custom Text function (which updates every frame) from handling the displayed string either causes updates that occur too frequently or too infrequently (for example, my first suggested alteration caused updates too infrequently).

    You can still move the two displays into a single display with two triggers (with Required for Activation set to "Any Triggers") for better organization.

  • 4 posts

You must login to post a comment. Don't have an account? Register to get one!