View Single Post
01-14-16, 04:44 AM   #1
Lesteryoung
A Black Drake
Join Date: Aug 2015
Posts: 81
Troubleshooting a few errors.

I've been getting these few errors for a few weeks and it doesn't seem to effect much, but it's really annoying nonetheless and shouldn't be happening. Would appreciate if someone more knowledgeable than I could take a look.

The errors only happen in combat, and seem to happen more in groups.

Errors:

Lua Code:
  1. 4x [ADDON_ACTION_BLOCKED] AddOn 'Tweaks' tried to call the protected function 'Boss2TargetFrame:Hide()'.
  2. !BugGrabber\BugGrabber.lua:573: in function <!BugGrabber\BugGrabber.lua:573>
  3. [C]: in function `Hide'
  4. FrameXML\TargetFrame.lua:108: in function `TargetFrame_Update'
  5. FrameXML\TargetFrame.lua:174: in function `OnEvent'
  6. FrameXML\UnitFrame.lua:676: in function <FrameXML\UnitFrame.lua:674>
  7.  
  8.  
  9. 1x [ADDON_ACTION_BLOCKED] AddOn 'Tweaks' tried to call the protected function 'Boss2TargetFrame:Show()'.
  10. !BugGrabber\BugGrabber.lua:573: in function <!BugGrabber\BugGrabber.lua:573>
  11. [C]: in function `Show'
  12. FrameXML\TargetFrame.lua:110: in function `TargetFrame_Update'
  13. FrameXML\TargetFrame.lua:174: in function `OnEvent'
  14. FrameXML\UnitFrame.lua:676: in function <FrameXML\UnitFrame.lua:674>
  15.  
  16.  
  17. 1x [ADDON_ACTION_BLOCKED] AddOn 'Tweaks' tried to call the protected function 'CompactRaidFrame11:Show()'.
  18. !BugGrabber\BugGrabber.lua:573: in function <!BugGrabber\BugGrabber.lua:573>
  19. [C]: in function `Show'
  20. FrameXML\CompactUnitFrame.lua:290: in function `CompactUnitFrame_UpdateVisible'
  21. FrameXML\CompactUnitFrame.lua:248: in function <FrameXML\CompactUnitFrame.lua:246>
  22. [C]: in function `CompactUnitFrame_UpdateAll'
  23. FrameXML\CompactUnitFrame.lua:100: in function <FrameXML\CompactUnitFrame.lua:47>
  24.  
  25.  
  26. 8x FrameXML\UnitFrame.lua:410: Usage: GameTooltip:SetUnit("unit"[, hideStatus])
  27. [C]: in function `SetUnit'
  28. FrameXML\UnitFrame.lua:410: in function `UnitFrame_UpdateTooltip'
  29. FrameXML\UnitFrame.lua:396: in function <FrameXML\UnitFrame.lua:383>

Code:

Lua Code:
  1. -- red bars
  2.  
  3. hooksecurefunc('CooldownFrame_SetTimer', function(self) if self.currentCooldownType == COOLDOWN_TYPE_LOSS_OF_CONTROL then self:SetCooldown(0,0) end end)
  4.  
  5. -- no bling on GCD
  6.  
  7. for k,v in pairs(_G) do if type(v)=="table" and type(v.SetDrawBling)=="function" then v:SetDrawBling(false) end end
  8. hooksecurefunc(getmetatable(ActionButton1Cooldown).__index, 'SetCooldown', function(self) self:SetDrawBling(false) end)
  9.  
  10. --- percent hp on target frame
  11.  
  12. hooksecurefunc("TextStatusBar_UpdateTextStringWithValues",function(statusFrame, textString, value, valueMin, valueMax)
  13.  if valueMax == 0 then return end
  14.  if statusFrame.powerToken then return end
  15.  if string.find(statusFrame:GetName(),"PlayerFrame") == 1 then return end
  16.  if string.find(statusFrame:GetName(),"FocusFrame") == 1 then return end
  17.  if string.find(statusFrame:GetName(),"PetFrame") == 1 then return end
  18.  local unit = statusFrame:GetParent().unit
  19.  if unit and UnitIsDead(unit) then return end
  20.  textString:SetText(tostring(AbbreviateLargeNumbers(value)).." / "..tostring(AbbreviateLargeNumbers(valueMax)).." "..tostring(math.ceil((value / valueMax) * 100)).."%");
  21.  if(statusFrame.LeftText and statusFrame.RightText) then
  22.  statusFrame.LeftText:Hide();
  23.  statusFrame.RightText:Hide();
  24.  textString:Show();
  25.  end
  26. end)
  27.  
  28. function AbbreviateLargeNumbers(value)
  29.  local strLen = strlen(value);
  30.  local retString = value;
  31.  if ( strLen > 6 ) then
  32.  retString = string.sub(value, 1, -7)..SECOND_NUMBER_CAP;
  33.  elseif ( strLen > 4 ) then
  34.  retString = string.sub(value, 1, -4)..FIRST_NUMBER_CAP;
  35.  elseif (strLen > 3 ) then
  36.  retString = BreakUpLargeNumbers(value);
  37.  end
  38.  return retString;
  39. end
  40.  
  41. ---
  42.  
  43. -- /rl command in chat to Reload
  44.  
  45. SlashCmdList["RELOADUI"] = function() ReloadUI() end
  46.     SLASH_RELOADUI1 = "/rl"
  47.  
  48. -- /clear command to clear chat window
  49.  
  50. SlashCmdList["CLEAR"] = function()
  51.     SELECTED_CHAT_FRAME:Clear()
  52. end
  53.  
  54. -- /clearcombat
  55.  
  56. SlashCmdList["CLEARCOMBAT"] = function() CombatLogClearEntries() end
  57. SLASH_CLEARCOMBAT1 = "/clearcombat"
  58.  
  59. -- leaves group
  60.  
  61. SlashCmdList["LEAVEGROUP"] = function() LeaveParty() end
  62.     SLASH_LEAVEGROUP1 = "/lg"
  63.  
  64. -- Hides gryphons
  65.  
  66. MainMenuBarLeftEndCap:Hide()
  67. MainMenuBarRightEndCap:Hide()
  68.  
  69. -- No delay on Combo points
  70.  
  71. COMBOFRAME_FADE_IN = 0
  72. COMBOFRAME_FADE_OUT = 0
  73. COMBOFRAME_SHINE_FADE_IN = 0
  74. COMBOFRAME_SHINE_FADE_OUT = 0
  75. COMBOFRAME_HIGHLIGHT_FADE_IN = 0
  76.  
  77. -- Hide minimap zoom icons, enable scroll wheel zooming
  78.  
  79. MinimapZoomIn:Hide()
  80. MinimapZoomOut:Hide()
  81.  
  82.     Minimap:EnableMouseWheel(true)
  83.     Minimap:SetScript('OnMouseWheel', function(self, arg1)
  84.         if arg1 > 0 then
  85.             Minimap_ZoomIn()
  86.         else
  87.             Minimap_ZoomOut()
  88.         end
  89.     end)
  90.  
  91. -- loot money
  92.  
  93. local f = CreateFrame("Frame")
  94. f:RegisterEvent("LOOT_OPENED")
  95. f:SetScript("OnEvent", function(self, event, ...)
  96.     for i = GetNumLootItems(), 1, -1 do
  97.         local slotType = GetLootSlotType(i)
  98.         local _, _, _, _, locked, isQuestItem = GetLootSlotInfo(i)
  99.         if not locked and (slotType == LOOT_SLOT_MONEY or slotType == LOOT_SLOT_CURRENCY) then
  100.             LootSlot(i)
  101.         end
  102.     end
  103. end)
  104.  
  105. -- adds caster of buffs/debuffs to their tooltips
  106.  
  107. hooksecurefunc(GameTooltip,"SetUnitAura",function(self,unit,index,filter)
  108.  local caster = select(8,UnitAura(unit,index,filter))
  109.  if caster and UnitExists(caster) then
  110.  GameTooltip:AddLine("Cast by: "..UnitName(caster),.65,.85,1,1)
  111.  GameTooltip:Show()
  112.  end
  113. end)
  114.  
  115. -- disable healing prediction
  116.  
  117. local oldfunc=CompactUnitFrameUtil_UpdateFillBar;
  118. function CompactUnitFrameUtil_UpdateFillBar(frame,previous,bar,...)
  119.     if bar==frame.myHealPrediction or bar==frame.otherHealPrediction then
  120.         return previous;
  121.     end
  122.  
  123.     return oldfunc(frame,previous,bar,...);
  124. end
  125.  
  126. hooksecurefunc("CompactUnitFrame_SetUpFrame",function(frame)
  127.     frame.myHealPrediction:Hide();
  128.     frame.otherHealPrediction:Hide();
  129. end);
  130.  
  131. -- repair
  132.  
  133. local f = CreateFrame'Frame'
  134. f:RegisterEvent'MERCHANT_SHOW'
  135. f:SetScript('OnEvent', function()
  136.     local cost, canRepair = GetRepairAllCost()
  137.     if canRepair and GetMoney() > cost then
  138.         ChatFrame1:AddMessage('Your items have been repaired for '..GetCoinText(cost, ", ")..".", 1, 1, 0)
  139.         RepairAllItems()
  140.     end
  141. end)
  142.  
  143. --- tooltip stuff
  144.  
  145. local SET_TEXT = TARGET .. ": |cff%02x%02x%02x%s|r"
  146. local MATCH_TEXT = "^" .. TARGET
  147.  
  148. local last
  149. GameTooltip:HookScript("OnUpdate", function(self)
  150.     local name = UnitName("mouseovertarget")
  151.     if not name or name == "" then return end
  152.     last = name
  153.  
  154.     local r, g, b
  155.     if UnitIsPlayer("mouseovertarget") then
  156.         local _, class = UnitClass("mouseovertarget")
  157.         local color = (CUSTOM_CLASS_COLORS or RAID_CLASS_COLORS)[class]
  158.         r, g, b = color.r, color.g, color.b
  159.     else
  160.         r, g, b = GameTooltip_UnitColor("mouseovertarget")
  161.     end
  162.  
  163.     for i = 2, self:NumLines() do
  164.         local line = _G["GameTooltipTextLeft"..i]
  165.         if strfind(line:GetText() or "", MATCH_TEXT) then
  166.             line:SetFormattedText(SET_TEXT, r * 255, g * 255, b * 255, name)
  167.             return self:Show()
  168.         end
  169.     end
  170.     self:AddLine(format(SET_TEXT, r * 255, g * 255, b * 255, name))
  171.     self:Show()
  172. end)
  173.  
  174. -- color
  175.  
  176. GameTooltip:HookScript("OnTooltipSetUnit", function(GameTooltip)
  177.     local _, unit = GameTooltip:GetUnit()
  178.     if UnitIsPlayer(unit) then
  179.         local _, class = UnitClass(unit)
  180.         local color = class and (CUSTOM_CLASS_COLORS or RAID_CLASS_COLORS)[class]
  181.         if color then
  182.             local text = GameTooltipTextLeft1:GetText()
  183.             GameTooltipTextLeft1:SetFormattedText("|cff%02x%02x%02x%s|r", color.r * 255, color.g * 255, color.b * 255, text:match("|cff\x\x\x\x\x\x(.+)|r") or text)
  184.         end
  185.     end
  186. end)
  187.  
  188. --- class color on unit frames
  189.  
  190. local frame = CreateFrame("FRAME")
  191. frame:RegisterEvent("GROUP_ROSTER_UPDATE")
  192. frame:RegisterEvent("PLAYER_TARGET_CHANGED")
  193. frame:RegisterEvent("PLAYER_FOCUS_CHANGED")
  194. frame:RegisterEvent("UNIT_FACTION")
  195.  
  196. local function eventHandler(self, event, ...)
  197.         if UnitIsPlayer("target") then
  198.                 local c = RAID_CLASS_COLORS[select(2, UnitClass("target"))]
  199.                 if c then
  200.                     TargetFrameNameBackground:SetVertexColor(c.r, c.g, c.b)
  201.                 end
  202.         end
  203.         if UnitIsPlayer("focus") then
  204.                 local c = RAID_CLASS_COLORS[select(2, UnitClass("focus"))]
  205.                 if c then
  206.                     FocusFrameNameBackground:SetVertexColor(c.r, c.g, c.b)
  207.                 end
  208.         end
  209. end
  210.  
  211. frame:SetScript("OnEvent", eventHandler)
  212.  
  213. for _, BarTextures in pairs({TargetFrameNameBackground, FocusFrameNameBackground}) do
  214.         BarTextures:SetTexture("Interface\\TargetingFrame\\UI-StatusBar")
  215. end
  216.  
  217. local fontStrings = {
  218.     PlayerName,
  219.  
  220.     TargetFrameTextureFrameName,
  221.     TargetFrameTextureFrameDeadText,
  222.  
  223.     FocusFrameTextureFrameName,
  224.     FocusFrameTextureFrameDeadText
  225. }
  226.  
  227. for _, v in pairs(fontStrings) do
  228.     v:SetFont("Fonts\\FRIZQT__.TTF", 10, "OUTLINE")
  229.     v:SetShadowOffset(0, 0)
  230.     v:SetTextColor(1,.92,0)
  231. end
  232.  
  233. TargetFrameTextureFrameName:SetWidth(117)
  234. TargetFrameToTTextureFrameName:SetWidth(64)
  235.  
  236. FocusFrameTextureFrameName:SetWidth(117)
  237. FocusFrameToTTextureFrameName:SetWidth(64)
  238.  
  239. local fontStrings = {
  240.     TargetFrameToTTextureFrameName,
  241.     FocusFrameToTTextureFrameName
  242. }
  243.  
  244. for _, v in pairs(fontStrings) do
  245.     v:SetTextColor(1,.92,0)
  246. end

Last edited by Lesteryoung : 01-14-16 at 04:49 AM.
  Reply With Quote