From eec5fb6f287a04fb44c37bf663515e2c8a8955cd Mon Sep 17 00:00:00 2001
From: Nos <NosBit@users.noreply.github.com>
Date: Mon, 21 Oct 2013 11:50:32 +0000
Subject: [PATCH] BETA: `TriggerSkillByDamage` effect should be disabled if
 chance or skill level is set to 0.

Reported by: !UnAfraid
---
 .../handlers/effecthandlers/TriggerSkillByDamage.java  | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDamage.java b/L2J_DataPack_BETA/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDamage.java
index 68cd3632e6..d9b399b630 100644
--- a/L2J_DataPack_BETA/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDamage.java
+++ b/L2J_DataPack_BETA/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDamage.java
@@ -126,6 +126,11 @@ public class TriggerSkillByDamage extends L2Effect implements IDamageReceivedEve
 	@Override
 	public void onExit()
 	{
+		if ((_chance == 0) || (_skill.getSkillLvl() == 0))
+		{
+			return;
+		}
+		
 		getEffected().getEvents().unregisterListener(this);
 		super.onExit();
 	}
@@ -133,6 +138,11 @@ public class TriggerSkillByDamage extends L2Effect implements IDamageReceivedEve
 	@Override
 	public boolean onStart()
 	{
+		if ((_chance == 0) || (_skill.getSkillLvl() == 0))
+		{
+			return false;
+		}
+		
 		getEffected().getEvents().registerListener(this);
 		return super.onStart();
 	}
-- 
GitLab