Advertisement
Guest User

Untitled

a guest
Feb 21st, 2020
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.02 KB | None | 0 0
  1. Message: [string "--[==[ Error in 'Ignore Pain absorb bar + o..."]:64: attempt to index a nil value
  2. Time: Fri Feb 21 17:53:59 2020
  3. Count: 2
  4. Stack: [string "--[==[ Error in 'Ignore Pain absorb bar + o..."]:64: attempt to index a nil value
  5. [string "--[==[ Error in 'Ignore Pain absorb bar + overlay':'initialization' ]==] return function() aura_env.spell = 190456
  6. aura_env.rage = UnitPower("player", 1)
  7. aura_env.surrender = IsPlayerSpell(202561)
  8.  
  9. aura_env.ShortenNumber = function(value)
  10. if not value then return end
  11. if(value > 999999999) then return string.format("%.2f", value/1000000000) .. "B" end
  12. if(value > 999999) then return string.format("%.2f", value/1000000) .. "M" end
  13. if(value > 99999) then return string.format("%.f", value/1000) .. "K" end
  14. if(value > 999) then return string.format("%.1f", value/1000) .. "K" end
  15. return value
  16. end
  17.  
  18. aura_env.countAzeriteTrait = function(spellId)
  19. local count = 0
  20. local azeriteItemLocation = C_AzeriteItem.FindActiveAzeriteItem()
  21. if (not azeriteItemLocation) then return 0 end
  22.  
  23. local azeritePowerLevel = C_AzeriteItem.GetPowerLevel(azeriteItemLocation)
  24. local specID = GetSpecializationInfo(GetSpecialization())
  25.  
  26. for slot = 1, 5, 2 do
  27. local item = Item:CreateFromEquipmentSlot(slot)
  28. if (not item:IsItemEmpty()) then
  29. local itemLocation = item:GetItemLocation()
  30. if (C_AzeriteEmpoweredItem.IsAzeriteEmpoweredItem(itemLocation)) then
  31. local tierInfo = C_AzeriteEmpoweredItem.GetAllTierInfo(itemLocation)
  32. for tier, info in next, tierInfo do
  33. if (info.unlockLevel <= azeritePowerLevel) then
  34. for _, powerID in next, info.azeritePowerIDs do
  35. if specID and C_AzeriteEmpoweredItem.IsPowerSelected(itemLocation, powerID)
  36. and C_AzeriteEmpoweredItem.IsPowerAvailableForSpec(powerID, specID)
  37. then
  38. local powerInfo = C_AzeriteEmpoweredItem.GetPowerInfo(powerID)
  39. if powerInfo.spellID == spellId then
  40. count = count + 1
  41. end
  42. end
  43. end
  44. end
  45. end
  46. end
  47. end
  48. end
  49. return count
  50. end
  51.  
  52. aura_env.IPtraits = aura_env.countAzeriteTrait(279172)
  53.  
  54. aura_env.GetIPinfo = function()
  55. local cur, max
  56. if WeakAuras.triggerState[aura_env.id][4] then
  57. cur = WeakAuras.triggerState[aura_env.id][4][""] and WeakAuras.triggerState[aura_env.id][4][""].value or 0
  58. max = WeakAuras.triggerState[aura_env.id][4][""] and WeakAuras.triggerState[aura_env.id][4][""].total or 0
  59. else
  60. cur = UnitHealth("player")
  61. max = UnitHealthMax("player")
  62. end
  63.  
  64. local missing = (max - cur) / max
  65. local mod = aura_env.surrender and (1 + missing) or 1
  66. local desc = GetSpellDescription(190456)
  67. if desc ~= "" then
  68. local tooltip = tonumber((desc:match("%%.+%d"):gsub("%D","")))
  69. local IP = type(tooltip)=="number" and tooltip * mod or -1
  70.  
  71. local cap = floor(IP * 1.3)
  72. if aura_env.IPtraits >= 1 then
  73. cap = floor(IP * 1.295)
  74. end
  75. return IP, cap
  76. end
  77. return -1, -1*1.3
  78. end
  79.  
  80. aura_env.cur, aura_env.max = aura_env.GetIPinfo()
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110. end"]:64: in function `GetIPinfo'
  111. [string "--[==[ Error in 'Ignore Pain absorb bar + overlay' ]==] return function(states, event, ...)
  112. if event == "CREATE_IP" then --create TSU
  113. local amount = select(16, WA_GetUnitAura("player", aura_env.spell, "HELPFUL|PLAYER")) or 0
  114. aura_env.rage = UnitPower("player", 1)
  115. aura_env.cur, aura_env.max = aura_env.GetIPinfo()
  116.  
  117. states[""] = {
  118. name = "Ignore Pain",
  119. value = amount,
  120. progressType = "static",
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement