L2JMobius
Free Users => Solved/Invalid Bug Reports => Topic started by: G-hamsteR on August 09, 2020, 04:17:11 PM
-
Hello,
I edited my configs and I put DeathPenaltyChance = 0, however players were getting death penalty. I haven't tested it yet, but I'm almost certain that this will fix it.
diff --git java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java
index 28a118e..d61097d 100644
--- java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java
+++ java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java
@@ -14997,7 +14997,7 @@
*/
public void calculateDeathPenaltyBuffLevel(Creature killer)
{
- if ((Rnd.get(100) <= Config.DEATH_PENALTY_CHANCE) && !(killer instanceof PlayerInstance) && !isGM() && (!getCharmOfLuck() || (!(killer instanceof GrandBossInstance) && !(killer instanceof RaidBossInstance))) && (!isInsideZone(ZoneId.PVP) && !isInsideZone(ZoneId.SIEGE)))
+ if ((Rnd.get(100) >= Config.DEATH_PENALTY_CHANCE) && !(killer instanceof PlayerInstance) && !isGM() && (!getCharmOfLuck() || (!(killer instanceof GrandBossInstance) && !(killer instanceof RaidBossInstance))) && (!isInsideZone(ZoneId.PVP) && !isInsideZone(ZoneId.SIEGE)))
{
increaseDeathPenaltyBuffLevel();
}
-
Try
Index: java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java
===================================================================
--- java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java (revision 7474)
+++ java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java (working copy)
@@ -14814,7 +14814,7 @@
*/
public void calculateDeathPenaltyBuffLevel(Creature killer)
{
- if ((Rnd.get(100) <= Config.DEATH_PENALTY_CHANCE) && !(killer instanceof PlayerInstance) && !isGM() && (!getCharmOfLuck() || (!(killer instanceof GrandBossInstance) && !(killer instanceof RaidBossInstance))) && (!isInsideZone(ZoneId.PVP) && !isInsideZone(ZoneId.SIEGE)))
+ if ((Config.DEATH_PENALTY_CHANCE > 0) && (Rnd.get(100) < Config.DEATH_PENALTY_CHANCE) && !killer.isPlayer() && !isGM() && !getCharmOfLuck() && !(killer instanceof GrandBossInstance) && !(killer instanceof RaidBossInstance) && !isInsideZone(ZoneId.PVP) && !isInsideZone(ZoneId.SIEGE))
{
increaseDeathPenaltyBuffLevel();
}
-
Seems 100% right. I will test it tomorrow and post my result. I understand the logic of Rnd.get(100) < Config.DEATH_PENALTY_CHANCE. It's like (100 - Rnd.get(100)) > Config.DEATH_PENALTY_CHANCE)
-
Try
Index: java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java
===================================================================
--- java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java (revision 7474)
+++ java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java (working copy)
@@ -14814,7 +14814,7 @@
*/
public void calculateDeathPenaltyBuffLevel(Creature killer)
{
- if ((Rnd.get(100) <= Config.DEATH_PENALTY_CHANCE) && !(killer instanceof PlayerInstance) && !isGM() && (!getCharmOfLuck() || (!(killer instanceof GrandBossInstance) && !(killer instanceof RaidBossInstance))) && (!isInsideZone(ZoneId.PVP) && !isInsideZone(ZoneId.SIEGE)))
+ if ((Config.DEATH_PENALTY_CHANCE > 0) && (Rnd.get(100) < Config.DEATH_PENALTY_CHANCE) && !killer.isPlayer() && !isGM() && !getCharmOfLuck() && !(killer instanceof GrandBossInstance) && !(killer instanceof RaidBossInstance) && !isInsideZone(ZoneId.PVP) && !isInsideZone(ZoneId.SIEGE))
{
increaseDeathPenaltyBuffLevel();
}
Any news on this?
-
I haven't received any reports for death penalty. It's fixed :)
-
Fixed with https://bitbucket.org/MobiusDev/l2j_mobius/commits/991311865372b6b5bd0438fd94de6c8960a26f65