aggixx

Untitled

Sep 13th, 2012
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.97 KB | None | 0 0
  1. function (event, ...)
  2. local isFinisher, isCombo, fcpId
  3. WA_feralCP_spellIDs = WA_feralCP_spellIDs or {
  4. --SPELL_DAMAGE
  5. {5221, "addCombo_pf"}, -- [1] Shred
  6. {114236, "addCombo_pf"}, -- [2] Shred!
  7. {33876, "addCombo_pf"}, -- [3] Mangle
  8. {6785, "addCombo_pf"}, -- [4] Ravage
  9. {102545, "addCombo_pf"}, -- [5] Ravage!
  10. {22568, "spendCombo"}, -- [6] Ferocious Bite
  11. {62078, "addCombo_aoe"}, -- [7] Swipe
  12.  
  13. --SPELL_CAST_SUCCESS
  14. {1822, "addCombo_pf"}, -- [8] Rake
  15. {1079, "spendCombo"}, -- [9] Rip
  16. {127538, "spendCombo"}, -- [10] Savage Roar
  17. }
  18.  
  19. WA_feralCP_count = WA_feralCP_count or 0
  20. WA_feralCP_GCD = WA_feralCP_GCD or 0
  21.  
  22. if event == "COMBAT_LOG_EVENT_UNFILTERED" then
  23. local _, cleuevent, hideCaster, sourceGUID, sourceName, _, _, destGUID, destName = ...
  24. if sourceGUID == UnitGUID("player") then
  25. if cleuevent == "SPELL_DAMAGE" then
  26. local _, _, _, _, _, _, _, _, _, _, _, spellId = ...
  27. for i=1,7 do
  28. if spellId == WA_feralCP_spellIDs[i][1] then fcpId = i end
  29. end
  30. elseif cleuevent == "SPELL_CAST_SUCCESS" then
  31. local _, _, _, _, _, _, _, _, _, _, _, spellId = ...
  32. for i=8,10 do
  33. if spellId == WA_feralCP_spellIDs[i][1] then fcpId = i end
  34. end
  35. end
  36. if fcpId ~= nil then
  37. if WA_feralCP_spellIDs[fcpId][2] == "addCombo_pf" then
  38. WA_feralCP_target = destGUID
  39. local _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, critical = ...
  40. print(critical)
  41. if critical == 1 then
  42. WA_feralCP_count = WA_feralCP_count + 1
  43. print(GetTime()..": "..WA_feralCP_count)
  44. else
  45. --WA_feralCP_count = WA_feralCP_count + 1
  46. end
  47. elseif WA_feralCP_spellIDs[fcpId][2] == "spendCombo" then
  48. WA_feralCP_target = nil
  49. WA_feralCP_count = 0
  50. elseif WA_feralCP_spellIDs[fcpId][2] == "addCombo_aoe" then
  51. if WA_feralCP_target == nil and destGUID == UnitGUID("target") or destGUID == WA_feralCP_target then
  52. WA_feralCP_target = destGUID
  53. --WA_feralCP_count = WA_feralCP_count + 1
  54. end
  55. end
  56. end
  57. end
  58. elseif event == "UNIT_COMBO_POINTS" then
  59. local unit = ...
  60. if unit == "player" then
  61. local start = GetSpellCooldown("Shred")
  62. if start ~= WA_feralCP_GCD then
  63. WA_feralCP_count = GetComboPoints("player", "target")
  64. print(GetTime()..": "..WA_feralCP_count)
  65. end
  66. WA_feralCP_GCD = start
  67. end
  68. end
  69. end
Advertisement
Add Comment
Please, Sign In to add comment