Castbars

101 - CLEU update for 4.2

While scanning the addons that I'm using for patches needed to support the recent WoW 4.2 patch, I came across some for Castbars.

What does the provided patch do?

Compensates for added CLEU fields (second source & destination raid flags field inserted after the respective old flags fields) in 4.2. This is untested as I don't use the swing timer feature myself.

Please provide any additional information below.

CLEU handling for swing timer needs to be updated for patch 4.2. (Also, I suspect it didn't work properly in 4.1 either due to "dstGUID" already offseted by an extra field and the select values for the ellipsis not increased by 1 to compensate for the inserted "hideCaster" field.) The following replacement of lines 576 - 598 in Castbars.lua should work:

            if (event == "COMBAT_LOG_EVENT_UNFILTERED") then
            -- In patch 4.2, first 11: timestamp, eventType, hideCaster, srcGUID, srcName, srcFlags, srcRaidFlags, dstGUID, dstName, dstFlags, dstRaidFlags ..
                local _, combatevent, _, srcGUID, _, _, _, dstGUID = ...;
                local playerGuid = UnitGUID("player");
                if (srcGUID == playerGuid) then
                    if (combatevent == "SPELL_EXTRA_ATTACKS") then
                        -- for "SPELL_EXTRA_ATTACKS", first 11 followed by: .. spellId, spellName, spellSchool, amount
                        frameSwing.extraAttacks = select(15 , ...);
                        frameSwing.extraInhibit = true;
                    elseif (combatevent == "SWING_DAMAGE" or combatevent == "SWING_MISSED") then
                        -- for "SWING_DAMAGE", first 11 followed by: .. amount, school, resisted, blocked, absorbed, critical, glancing, crushing
                        -- for "SWING_MISSED", first 11 followed by: .. missType
                        if ((frameSwing.extraAttacks or 0) > 0 and not frameSwing.extraInhibit) then
                            frameSwing.extraAttacks = (frameSwing.extraAttacks or 0) - 1;
                        elseif (not self:IsDualWielding()) then
                            frameSwing.extraInhibit = false;
                            frameSwing.duration = UnitAttackSpeed("player");
                            frameSwing.startTime = GetTime();
                            frameSwing:Show();
                        end
                    end
                elseif (dstGuid == playerGuid and combatevent == "SWING_MISSED") then
                    -- for "SWING_MISSED", first 11 followed by: .. missType
                    local missType = select(12, ...);
                    if (missType == "PARRY" and frameSwing.duration) then
                        frameSwing.duration = frameSwing.duration * 0.6;
                    end
                end
User When Change
xbeeps Jul 01, 2011 at 19:13 UTC Changed status from New to Fixed
CaptWhyNot Jun 30, 2011 at 03:40 UTC Create

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

  • 3 comments
  • Avatar of CaptWhyNot CaptWhyNot Jul 01, 2011 at 23:36 UTC - 0 likes

    No problem. Glad to help.

  • Avatar of xbeeps xbeeps Jul 01, 2011 at 19:13 UTC - 0 likes

    In 3.25.

    Thanks for the details

  • Avatar of Bluti Bluti Jul 01, 2011 at 17:39 UTC - 0 likes

    Yeah, would love to see an update for this great mod!

  • 3 comments

Facts

Last updated
Mar 30, 2012
Reported
Jun 30, 2011
Status
Fixed - Developer made requested changes. QA should verify.
Type
Patch - Source code patch for review
Priority
Medium - Normal priority.
Votes
2

Reported by

Possible assignees