View Single Post
03/23/15, 09:33 AM   #3
Garkin
 
Garkin's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 832
Small hack how to add mitigation values:

Lua Code:
  1. local function GetDisplayValue(self)
  2.     local value = self:GetValue() / ((GetUnitLevel("player") + GetUnitVeteranRank("player")) * 10)
  3.     return zo_strformat(SI_STAT_VALUE_PERCENT, value)
  4. end
  5.  
  6. local CreateAttributesSection_Orig = ZO_Stats.CreateAttributesSection
  7. local function CreateAttributesSection(self)
  8.     CreateAttributesSection_Orig(self)
  9.     self:SetNextControlPadding(0)
  10.     self:AddStatRow(STAT_SPELL_MITIGATION, STAT_MITIGATION)
  11.     self.statEntries[STAT_SPELL_MITIGATION].name:SetText("Spell Resistance Value")
  12.     self.statEntries[STAT_SPELL_MITIGATION].value.statType = STAT_SPELL_RESIST
  13.     self.statEntries[STAT_SPELL_MITIGATION].GetDisplayValue = GetDisplayValue
  14.     self.statEntries[STAT_MITIGATION].name:SetText("Physical Resistance Value")
  15.     self.statEntries[STAT_MITIGATION].value.statType = STAT_PHYSICAL_RESIST
  16.     self.statEntries[STAT_MITIGATION].GetDisplayValue = GetDisplayValue
  17. end
  18. ZO_Stats.CreateAttributesSection = CreateAttributesSection

Result:

  Reply With Quote