• 0

    posted a message on FuBar TopScore
    According to http://www.wowwiki.com/UnitId "none" is a "A valid unit token that always refers to no unit."
    But the real problem I had was that for both nil, "none" and 'other invalid unitids' method call UnitClass(targetid) returns nil and then the method call babbleClass:GetColor(normal.class) fails. And I see now that it was my changes that caused the code:
    if not targetid then
    if UnitName("target") == target then
    targetid = "target"
    else
    return
    end
    end
    not to return when no target is selected when casting an AOE spells.
    But when i adedd the test:
    if not class then
    class = "UNKNOWN"
    end
    AOE hits was recorded almost correctly, the only thing wrong was that it was in gray with level as 0
    Posted in: FuBar AddOns
  • 0

    posted a message on FuBar TopScore
    Since there is, according to my experience, at least two scenarios when it is not possible to match dstName to unitid in the combatlog of 2.4
    • AOE spells
    • If target is changed in the time between a spell is cast and it actually do damage

    So it would be prudent to change the following code lines.
    On row 219
    if UnitExists(dstName) then
    unitid = dstName
    elseif bit_band(dstFlags, COMBATLOG_OBJECT_TARGET) == COMBATLOG_OBJECT_TARGET then
    unitid = "target"
    elseif bit_band(dstFlags, COMBATLOG_OBJECT_FOCUS) == COMBATLOG_OBJECT_FOCUS then
    unitid = "focus"
    end
    to:
    if UnitExists(dstName) then
    unitid = dstName
    elseif bit_band(dstFlags, COMBATLOG_OBJECT_TARGET) == COMBATLOG_OBJECT_TARGET then
    unitid = "target"
    elseif bit_band(dstFlags, COMBATLOG_OBJECT_FOCUS) == COMBATLOG_OBJECT_FOCUS then
    unitid = "focus"
    else
    unitid = "none"
    end

    On row 493:
    _,class = UnitClass(targetid)
    to:
    _,class = UnitClass(targetid)
    if not class then
    class = "UNKNOWN"
    end

    Last weekend I did my own adaption of TopScor to 2.4, just to learn how to make wow addons, and discoverd thees two problems with the new combatlog.
    Posted in: FuBar AddOns
  • To post a comment, please or register a new account.