Selaa lähdekoodia

BETA: Fixed a bug where trait invulnerability wasn't getting used correctly.

Reported by: Hindi, 
Reviewed by: !UnAfraid
Nos 11 vuotta sitten
vanhempi
sitoutus
fc05c38e9a

+ 2 - 2
L2J_Server_BETA/java/com/l2jserver/gameserver/model/stats/Formulas.java

@@ -1370,7 +1370,7 @@ public final class Formulas
 		}
 		
 		final double rate = baseMod * elementMod * traitMod * mAtkMod * buffDebuffMod;
-		final double finalRate = Math.min(Math.max(rate, skill.getMinChance()), skill.getMaxChance());
+		final double finalRate = traitMod > 0 ? Math.min(Math.max(rate, skill.getMinChance()), skill.getMaxChance()) : 0;
 		
 		if (attacker.isDebug())
 		{
@@ -1385,7 +1385,7 @@ public final class Formulas
 			Debug.sendSkillDebug(attacker, target, skill, set);
 		}
 		
-		if (finalRate < Rnd.get(100))
+		if (finalRate <= Rnd.get(100))
 		{
 			final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.C1_RESISTED_YOUR_S2);
 			sm.addCharName(env.getTarget());