Quantcast
WoWInterface - View Single Post - Help rectifying small batch of code 8.0 broke.
View Single Post
07-24-18, 04:07 PM   #1
Lesteryoung
A Cliff Giant
Join Date: Aug 2015
Posts: 76
Help rectifying small batch of code 8.0 broke.

Hi, I've gathered small bits of code from this forum and the WoW forum over the years and 8.0 seems to have broken two bits of code. Would appreciate any help. I'm sure it's a simple fix.

Code 1:

Lua Code:
  1. local f = CreateFrame("Frame")
  2. f:RegisterEvent("LOOT_OPENED")
  3. f:SetScript("OnEvent", function(self, event, ...)
  4.     for i = GetNumLootItems(), 1, -1 do
  5.         local slotType = GetLootSlotType(i)
  6.         local _, _, _, _, locked, isQuestItem = GetLootSlotInfo(i)
  7.         if not locked and (isQuestItem or slotType == LOOT_SLOT_MONEY or slotType == LOOT_SLOT_CURRENCY) then
  8.             LootSlot(i)
  9.         end
  10.     end
  11. end)

This just loots money on mobs.

Code 2:

Lua Code:
  1. hooksecurefunc("TargetFrame_UpdateAuras", function(s)
  2.           local name = s:GetName() .. "Buff"
  3.           for i = 1 ,MAX_TARGET_BUFFS do
  4.                local _, _, _, _, buffType = UnitAura(s.unit, i)
  5.                if buffType == 'Magic' then
  6.                     _G[name .. i .. "Stealable"]:Show()
  7.            end
  8.       end
  9. end)

This just shows the dispel effect around dispellable debuffs on any class/spec.

Both simply don't function since the patch.
  Reply With Quote