Fixed registering of light attack to work correctly with Melee attacks

Borut Lukič [09-29-18 - 22:34]
Fixed registering of light attack to work correctly with Melee attacks
Filename
src/RotationHero.lua
diff --git a/src/RotationHero.lua b/src/RotationHero.lua
index 546f9ba..8c680c1 100755
--- a/src/RotationHero.lua
+++ b/src/RotationHero.lua
@@ -141,8 +141,8 @@ function RotationHero.OnCombatEvent(eventID, result, isError, abilityName, abili
     end]]

     if sourceName == RotationHero.playerName then
-        if abilityActionSlotType == ACTION_SLOT_TYPE_LIGHT_ATTACK then
-            if powerType == 0 then
+        if abilityActionSlotType == ACTION_SLOT_TYPE_LIGHT_ATTACK then
+            if result == 1 or result == 2 then
                 RotationHero.AddCombatEvent(nowTime, { type = "damage", name = abilityName, ability = ACTION_SLOT_TYPE_LIGHT_ATTACK, critical = (result == 2 and true or false), damage = hitValue })
             end
         end