Spell casting fade #20


  • New
  • Patch
Open
  • _ForgeUser1194195 created this issue Oct 15, 2008

    http://www.tuxbubling.org/public/pitbull_spell_fade.patch

    Basically this patch enables the same Alpha level as "notfull" when casting something -
    Mount/Opening Chest/Crafting etc...

    It's particularly useful when you set player frame to alpha 0 when not in combat/restoring etc...

    ###############
    --- CombatFader.lua    2008-10-15 10:15:08.000000000 +0200
    +++ CombatFader.lua    2008-10-15 23:44:26.000000000 +0200
    @@ -127,6 +127,16 @@
         self:AddEventListener("PLAYER_TARGET_CHANGED", "OnFadeEvent")
         self:AddEventListener("UNIT_HEALTH", "OnPlayerHealthManaEvent")
         self:AddEventListener("UNIT_MANA", "OnPlayerHealthManaEvent")
    +    self:AddEventListener("UNIT_SPELLCAST_CHANNEL_START", "OnFadeEvent")
    +    self:AddEventListener("UNIT_SPELLCAST_CHANNEL_UPDATE", "OnFadeEvent")
    +    self:AddEventListener("UNIT_SPELLCAST_DELAYED", "OnFadeEvent")
    +    self:AddEventListener("UNIT_SPELLCAST_FAILED", "OnFadeEvent")
    +    self:AddEventListener("UNIT_SPELLCAST_SUCCEEDED", "OnFadeEvent")
    +    self:AddEventListener("UNIT_SPELLCAST_INTERRUPTED", "OnFadeEvent")
    +    self:AddEventListener("UNIT_SPELLCAST_START", "OnFadeEvent")
    +    self:AddEventListener("UNIT_SPELLCAST_STOP", "OnFadeEvent")
    +    self:AddEventListener("UNIT_SPELLCAST_CHANNEL_STOP", "OnFadeEvent")
    +
         self:AddRepeatingTimer(0, "UpdateAlphas")
    end

    @@ -144,6 +154,7 @@
             (UnitPowerType("player") == 1 and UnitMana('player') > 0) or
             (UnitPowerType("player") ~= 1 and UnitMana('player') ~= UnitManaMax('player'))
         local stop = GetTime() + self.db.profile.fadetime
    +    local spell = UnitCastingInfo("player")

         if inCombat then
             for unit, frame in PitBull:IterateUnitFrames() do
    @@ -166,6 +177,13 @@
                     activeframes[frame] = db[frame.group].notFullAlpha
                 end
             end
    +    elseif spell then
    +        for unit, frame in PitBull:IterateUnitFrames() do
    +            if (frame and frame.group and not db[frame.group].ignore) then
    +                frame.cfstop = stop
    +                activeframes[frame] = db[frame.group].notFullAlpha
    +            end
    +        end
         else
             for unit, frame in PitBull:IterateUnitFrames() do
                 if (frame and frame.group and not db[frame.group].ignore) then

  • _ForgeUser1194195 added the tags New Patch Oct 15, 2008

To post a comment, please login or register a new account.