Browse Source

BETA: Fixing NPE in !TargetCancel effect.
Reported by: lucan
Patch by: Nos
Reviewed by: Adry_85, Zoey76

Adry_85 12 years ago
parent
commit
aa8570e494

+ 1 - 1
L2J_DataPack_BETA/dist/game/data/scripts/handlers/effecthandlers/TargetCancel.java

@@ -36,7 +36,7 @@ public class TargetCancel extends L2Effect
 	public TargetCancel(Env env, EffectTemplate template)
 	{
 		super(env, template);
-		_chance = template.getParameters().getInteger("chance", 100);
+		_chance = template.hasParameters() ? template.getParameters().getInteger("chance", 100) : 100;
 	}
 	
 	@Override