View Single Post
07-28-23, 11:07 AM   #5
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,892
Originally Posted by Infinite-Loop-Alchemist View Post
but spell normals work but not crits.
I'm not exactly sure what you mean by this. Is it that you never see this triggered?
Lua Code:
  1. else
  2.           if amount > CritMaticData[spellName].highestCrit then
  3.             if spellName == "Auto Attack" then
  4.               return
  5.             end
  6.             CritMaticData[spellName].highestCrit = amount
  7.             PlaySound(888, "SFX")
  8.             CritMatic.ShowNewCritMessage(spellName, amount)
  9.             print("New highest crit hit for " .. spellName .. ": " .. CritMaticData[spellName].highestCrit)
  10.           end
  11. end

Or something else?

Edit: Taking a closer look:
Lua Code:
  1. if eventType == "SWING_DAMAGE" then
  2.     spellName = "Auto Attack"
  3.     spellID = 6603 -- or specify the path to a melee icon, if you have one
  4.     amount, _, _, _, _, _, critical = unpack(eventInfo, 12, 18)
  5.   else
  6.     spellID, spellName, spellSchool = unpack(eventInfo, 12, 14)
  7.     amount, overhealing, absorbed, critical = unpack(eventInfo, 15, 21)
  8.   end
If the eventType is not "SWING_DAMAGE" then critical is unpacked from argument 18 not 21
Lua Code:
  1. amount, overhealing, _, _, _, absorbed, critical = unpack(eventInfo, 15, 21)
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.

Last edited by Fizzlemizz : 07-28-23 at 11:32 AM.
  Reply With Quote