• 0

    posted a message on AbramsFu - a tiny utility that displays tank stats
    Currently there are still few bugs in calculation of different stats. For example, value returned by AbramsFu:GetBaseDR() should be capped at 75%, that is
     local attackerLevel = self:GetCalcLevel();
     local _, armor = UnitArmor("player");
     if attackerLevel < 60 then
      dr = min(75, 100*armor/(armor + 400 + 85*attackerLevel));
     else
      dr = min(75, 100*armor/(armor - 22167.5 + 467.5*attackerLevel));
     end


    Combat table has several issues as well, major of those is that attacks are not being pushed off the table when the percentages add up to more than 100%. Here's my suggestion, it seems to work though few bugs may still be there
    function AbramsFu:OnUpdateFuBarTooltip()
     local formatPercentString = string.format("%%.%df%%%%",self.db.profile.displayPrecisionToolTip);
     
     local playerLevel = UnitLevel("player");
     local attackerLevel = self:GetCalcLevel();
     
     local baseArmor, totalArmor, _, armorBuffs, armorDebuffs = UnitArmor("player");
    
     local anticipation = self:GetAnticipationBonus();
     local resilience = GetCombatRating(CR_CRIT_TAKEN_MELEE);
     local baseDefense, armorDefense = UnitDefense("player");
     local totalDefense = baseDefense + armorDefense;
     baseDefense = baseDefense - anticipation;
     local defenseEffect = (totalDefense - attackerLevel*5) * 0.04;
     local levelEffect  = (playerLevel*5 - attackerLevel*5) * 0.04;
     local resilienceEffect = self.GetResilienceEffect();
     
     local missChance, dodgeChance, parryChance, critChance, blockChance, crushChance, hitChance;
     hitChance  = 100
     missChance = max(0, 5 + defenseEffect + (defenseEffect<0 and -defenseEffect/2 or 0) + (self.db.profile.dualwieldAttacker and 19 or 0));
     hitChance  = hitChance - missChance;
     dodgeChance = min(hitChance, GetDodgeChance() + levelEffect);
     hitChance  = hitChance - dodgeChance;
     parryChance = min(hitChance, GetParryChance() + levelEffect);
     hitChance  = hitChance - parryChance;
     critChance = min(hitChance, max(0, 5 - levelEffect - defenseEffect - resilienceEffect));
     hitChance  = hitChance - critChance;
     blockChance = min(hitChance, GetBlockChance() + levelEffect);
     hitChance  = hitChance - blockChance;
     crushChance = min(hitChance, max(0, (attackerLevel*5 - baseDefense)*2 - 15));
     hitChance  = hitChance - crushChance;
     
     GameTooltip:AddLine(L["name"]);
     GameTooltip:AddLine(" ");
    
     local hr,hg,hb = self:GetHeaderColor();
     local lr,lg,lb = self:GetLabelColor();
     local vr,vg,vb = self:GetValueColor();
    
     if self.db.profile.showToolTipDefense then
      GameTooltip:AddLine(L["defcalc"], hr,hg,hb);
      if baseDefense ~= totalDefense then
       GameTooltip:AddDoubleLine(L["bdef"], string.format("%d",baseDefense), lr,lg,lb,vr,vg,vb);
       if armorDefense > 0 then
        GameTooltip:AddDoubleLine(L["abon"], string.format("+%d",armorDefense), lr,lg,lb,vr,vg,vb);
       end
       if anticipation > 0 then
        GameTooltip:AddDoubleLine(L["anti"], string.format("+%d",anticipation), lr,lg,lb,vr,vg,vb);
       end
      end
      GameTooltip:AddDoubleLine(L["tdef"], string.format("%d",totalDefense), lr,lg,lb,vr,vg,vb);
      GameTooltip:AddLine(" ");
     end
    
     if self.db.profile.showToolTipCombat then
      GameTooltip:AddDoubleLine(L["ct"], "["..attackerLevel.."]", hr,hg,hb,lr,lg,lb);
      GameTooltip:AddDoubleLine(L["mc"], string.format(formatPercentString,missChance), lr,lg,lb,vr,vg,vb);
      GameTooltip:AddDoubleLine(L["dc"], string.format(formatPercentString,dodgeChance), lr,lg,lb,vr,vg,vb);
      GameTooltip:AddDoubleLine(L["pc"], string.format(formatPercentString,parryChance), lr,lg,lb,vr,vg,vb);
      GameTooltip:AddDoubleLine(L["bc"], string.format(formatPercentString,blockChance), lr,lg,lb,vr,vg,vb);
      GameTooltip:AddDoubleLine(L["tc"], string.format(formatPercentString,critChance), lr,lg,lb,vr,vg,vb);
      GameTooltip:AddDoubleLine(L["cc"], string.format(formatPercentString,crushChance), lr,lg,lb,vr,vg,vb);
      GameTooltip:AddDoubleLine(L["hc"], string.format(formatPercentString,hitChance),  lr,lg,lb,vr,vg,vb);
      GameTooltip:AddLine(" ");
     end
    
     if self.db.profile.showToolTipArmor then
      GameTooltip:AddLine(L["armor"], hr,hg,hb);
      if baseArmor ~= totalArmor then
       GameTooltip:AddDoubleLine(L["ba"],string.format("%d",baseArmor), lr,lg,lb,vr,vg,vb);
       if armorBuffs ~= 0 then
        GameTooltip:AddDoubleLine(L["ab"],string.format("+%d",armorBuffs), lr,lg,lb,vr,vg,vb);
       end
       if armorDebuffs ~= 0 then
        GameTooltip:AddDoubleLine(L["ad"],string.format("%d",armorDebuffs), lr,lg,lb,vr,vg,vb);
       end
      end
      GameTooltip:AddDoubleLine(L["armor"],string.format("%d",totalArmor), lr,lg,lb,vr,vg,vb);
      GameTooltip:AddLine(" ");
     end
    
     if self.db.profile.showToolTipDR then
      GameTooltip:AddLine(L["dr"], hr,hg,hb);
      GameTooltip:AddDoubleLine(L["badr"], string.format(formatPercentString,self:GetBaseDR()), lr,lg,lb,vr,vg,vb);
     end
    
    end


    There's a new variable self.db.profile.dualwieldAttacker there, which should be set somewhere in the Options/Calculation section. I'm pretty much sure there is no API function UnitDualwield("target"), so full automatization isn't possible.

    As for the armor - i haven't been able to reproduce situation when 2nd and 3rd values returned by UnitArmor("player") were different. I tested: devotion aura, armor kits, armor enchants, on use effect from trinket, priest's Inspiration effect.
    I don't know what was Blizzard's point, but right now mod shows armor contributions as
    Armor base:    10000
    Armor ench/kits:  +900
    Armor buffs:    +900
    Armor:       10900

    This doesn't seem right from pure arithmetic viewpoint, so i'd suggest to remove that division on magic and non-magic armor buffs altogether.
    Posted in: FuBar AddOns
  • 0

    posted a message on Addon to show guild alts
    Well i don't want to see all offline users - that's usually too many. Rather, i'd like to see those who are online + their alts (who are obviously offline).
    It could be useful if you want to quickly understand how many tanks/healers/dpsers are available now in the guild, assuming that you can ask your guildies to switch over.

    And thinking of it, useful option would be level threshold (don't show alts with level < X).
    Posted in: Addon Ideas
  • 0

    posted a message on Addon to show guild alts
    Suppose you have 8 people in your guild, and only 3 of them are online atm. Standard window displays them as follows:

    Alice
    Bob
    Charlie
    Devon
    Elan
    Freddy
    Garry
    Helen

    Now, suppose that Charlie and Freddy are Alice's alts, and similarly Bob is Elan's alt. Then an addon can display them as:

    Charlie
    Alice
    Freddy
    Devon
    Elan
    Bob
    Garry
    Helen

    with all the other information (like class/level/zone/rank) unchanged.

    Information about who's whose alt can be fetched from Public/Officer Note, or entered manually.
    Posted in: Addon Ideas
  • 0

    posted a message on DrDamage - Official Thread
    Elemental Precision talent for mages -- it's supposed to increase spell hit chance by 1% per rank for frost and fire schools.
    Mage.lua file has however:
    ["Elemental Precision"] = { 
      [1] = { Effect = 1, Spells = { "Frost", "Fire" }, ModType = "Hit" }, 
      [2] = { Effect = 1, Spells = "Frostbolt", ModType = "Hit" }, 
      },


    with the result that Frostbolt gets 2% hit chance per rank.
    With 3 ranks in that talent DrDamage lists hit chance for frostbolt as 89% instead of 86%.
    Posted in: General AddOns
  • 0

    posted a message on FuXPFu - (As inspired by Bant)
    You made a wonderful addon there Wobin, thanks for all the fish!

    I was wondering if you can include several augments in the next release:

    1) It seems that WoW redisplays its own rep&XP bars on every xp/rep gain. Probably if you include code to hide those bars into your OnDataUpdate() or OnTextUpdate() it would work.
    2) Also add
    MainMenuBarLeftEndCap:Hide()
    MainMenuBarRightEndCap:Hide()
    in the same place where you hiding rep&XP bars. These caps normally show up only in wide screen aspect but look quite ugly when XP&rep bars are hidden
    3) Add an option to show XP/rep text in compact format. Something like
    self:SetText(string.format("%2.2f%%", xp/max * 100))
    Otherwise there just never enough space on the FuBar panel ;)
    Posted in: FuBar AddOns
  • To post a comment, please or register a new account.