Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Message: [string "--[==[ Error in 'Ignore Pain absorb bar + o..."]:64: attempt to index a nil value
- Time: Fri Feb 21 17:53:59 2020
- Count: 2
- Stack: [string "--[==[ Error in 'Ignore Pain absorb bar + o..."]:64: attempt to index a nil value
- [string "--[==[ Error in 'Ignore Pain absorb bar + overlay':'initialization' ]==] return function() aura_env.spell = 190456
- aura_env.rage = UnitPower("player", 1)
- aura_env.surrender = IsPlayerSpell(202561)
- aura_env.ShortenNumber = function(value)
- if not value then return end
- if(value > 999999999) then return string.format("%.2f", value/1000000000) .. "B" end
- if(value > 999999) then return string.format("%.2f", value/1000000) .. "M" end
- if(value > 99999) then return string.format("%.f", value/1000) .. "K" end
- if(value > 999) then return string.format("%.1f", value/1000) .. "K" end
- return value
- end
- aura_env.countAzeriteTrait = function(spellId)
- local count = 0
- local azeriteItemLocation = C_AzeriteItem.FindActiveAzeriteItem()
- if (not azeriteItemLocation) then return 0 end
- local azeritePowerLevel = C_AzeriteItem.GetPowerLevel(azeriteItemLocation)
- local specID = GetSpecializationInfo(GetSpecialization())
- for slot = 1, 5, 2 do
- local item = Item:CreateFromEquipmentSlot(slot)
- if (not item:IsItemEmpty()) then
- local itemLocation = item:GetItemLocation()
- if (C_AzeriteEmpoweredItem.IsAzeriteEmpoweredItem(itemLocation)) then
- local tierInfo = C_AzeriteEmpoweredItem.GetAllTierInfo(itemLocation)
- for tier, info in next, tierInfo do
- if (info.unlockLevel <= azeritePowerLevel) then
- for _, powerID in next, info.azeritePowerIDs do
- if specID and C_AzeriteEmpoweredItem.IsPowerSelected(itemLocation, powerID)
- and C_AzeriteEmpoweredItem.IsPowerAvailableForSpec(powerID, specID)
- then
- local powerInfo = C_AzeriteEmpoweredItem.GetPowerInfo(powerID)
- if powerInfo.spellID == spellId then
- count = count + 1
- end
- end
- end
- end
- end
- end
- end
- end
- return count
- end
- aura_env.IPtraits = aura_env.countAzeriteTrait(279172)
- aura_env.GetIPinfo = function()
- local cur, max
- if WeakAuras.triggerState[aura_env.id][4] then
- cur = WeakAuras.triggerState[aura_env.id][4][""] and WeakAuras.triggerState[aura_env.id][4][""].value or 0
- max = WeakAuras.triggerState[aura_env.id][4][""] and WeakAuras.triggerState[aura_env.id][4][""].total or 0
- else
- cur = UnitHealth("player")
- max = UnitHealthMax("player")
- end
- local missing = (max - cur) / max
- local mod = aura_env.surrender and (1 + missing) or 1
- local desc = GetSpellDescription(190456)
- if desc ~= "" then
- local tooltip = tonumber((desc:match("%%.+%d"):gsub("%D","")))
- local IP = type(tooltip)=="number" and tooltip * mod or -1
- local cap = floor(IP * 1.3)
- if aura_env.IPtraits >= 1 then
- cap = floor(IP * 1.295)
- end
- return IP, cap
- end
- return -1, -1*1.3
- end
- aura_env.cur, aura_env.max = aura_env.GetIPinfo()
- end"]:64: in function `GetIPinfo'
- [string "--[==[ Error in 'Ignore Pain absorb bar + overlay' ]==] return function(states, event, ...)
- if event == "CREATE_IP" then --create TSU
- local amount = select(16, WA_GetUnitAura("player", aura_env.spell, "HELPFUL|PLAYER")) or 0
- aura_env.rage = UnitPower("player", 1)
- aura_env.cur, aura_env.max = aura_env.GetIPinfo()
- states[""] = {
- name = "Ignore Pain",
- value = amount,
- progressType = "static",
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement