Classic karma item drop calculation.

This commit is contained in:
MobiusDev 2018-04-12 18:04:41 +00:00
parent 198f42c0a7
commit d397887309
6 changed files with 18 additions and 14 deletions

View File

@ -22,8 +22,11 @@ ListOfPetItems = 2375,3500,3501,3502,4422,4423,4424,4425,6648,6649,6650
# Default: 57,1147,425,1146,461,10,2368,7,6,2370,2369,6842,6611,6612,6613,6614,6615,6616,6617,6618,6619,6620,6621,7694,8181,5575,7694,9388,9389,9390
ListOfNonDroppableItems = 57,1147,425,1146,461,10,2368,7,6,2370,2369,6842,6611,6612,6613,6614,6615,6616,6617,6618,6619,6620,6621,7694,8181,5575,7694,9388,9389,9390
# Default: 6
MinimumPKRequiredToDrop = 6
# Classic setting.
# Counts only when killed by players.
# When killed by monsters there is no need for PK check.
MinimumPKRequiredToDrop = 4
# ---------------------------------------------------------------------------

View File

@ -2124,7 +2124,7 @@ public final class Config
KARMA_DROP_GM = PVPSettings.getBoolean("CanGMDropEquipment", false);
KARMA_AWARD_PK_KILL = PVPSettings.getBoolean("AwardPKKillPVPPoint", false);
KARMA_PK_LIMIT = PVPSettings.getInt("MinimumPKRequiredToDrop", 5);
KARMA_PK_LIMIT = PVPSettings.getInt("MinimumPKRequiredToDrop", 4);
KARMA_NONDROPPABLE_PET_ITEMS = PVPSettings.getString("ListOfPetItems", "2375,3500,3501,3502,4422,4423,4424,4425,6648,6649,6650,9882");
KARMA_NONDROPPABLE_ITEMS = PVPSettings.getString("ListOfNonDroppableItems", "57,1147,425,1146,461,10,2368,7,6,2370,2369,6842,6611,6612,6613,6614,6615,6616,6617,6618,6619,6620,6621,7694,8181,5575,7694,9388,9389,9390");

View File

@ -5077,15 +5077,14 @@ public final class L2PcInstance extends L2Playable
if ((!isInsideZone(ZoneId.PVP) || (pk == null)) && (!isGM() || Config.KARMA_DROP_GM))
{
boolean isKarmaDrop = false;
final int pkLimit = Config.KARMA_PK_LIMIT;
int dropEquip = 0;
int dropEquipWeapon = 0;
int dropItem = 0;
int dropLimit = 0;
int dropPercent = 0;
if ((getReputation() < 0) && (getPkKills() >= pkLimit))
// Classic calculation.
if (killer.isPlayable() && (getReputation() < 0) && (getPkKills() >= Config.KARMA_PK_LIMIT))
{
isKarmaDrop = true;
dropPercent = Config.KARMA_RATE_DROP;
@ -5094,7 +5093,7 @@ public final class L2PcInstance extends L2Playable
dropItem = Config.KARMA_RATE_DROP_ITEM;
dropLimit = Config.KARMA_DROP_LIMIT;
}
else if (killer.isNpc() && (getLevel() > 4))
else if (killer.isNpc())
{
dropPercent = Config.PLAYER_RATE_DROP;
dropEquip = Config.PLAYER_RATE_DROP_EQUIP;

View File

@ -22,8 +22,11 @@ ListOfPetItems = 2375,3500,3501,3502,4422,4423,4424,4425,6648,6649,6650
# Default: 57,1147,425,1146,461,10,2368,7,6,2370,2369,6842,6611,6612,6613,6614,6615,6616,6617,6618,6619,6620,6621,7694,8181,5575,7694,9388,9389,9390
ListOfNonDroppableItems = 57,1147,425,1146,461,10,2368,7,6,2370,2369,6842,6611,6612,6613,6614,6615,6616,6617,6618,6619,6620,6621,7694,8181,5575,7694,9388,9389,9390
# Default: 6
MinimumPKRequiredToDrop = 6
# Classic setting.
# Counts only when killed by players.
# When killed by monsters there is no need for PK check.
MinimumPKRequiredToDrop = 4
# ---------------------------------------------------------------------------

View File

@ -2128,7 +2128,7 @@ public final class Config
KARMA_DROP_GM = PVPSettings.getBoolean("CanGMDropEquipment", false);
KARMA_AWARD_PK_KILL = PVPSettings.getBoolean("AwardPKKillPVPPoint", false);
KARMA_PK_LIMIT = PVPSettings.getInt("MinimumPKRequiredToDrop", 5);
KARMA_PK_LIMIT = PVPSettings.getInt("MinimumPKRequiredToDrop", 4);
KARMA_NONDROPPABLE_PET_ITEMS = PVPSettings.getString("ListOfPetItems", "2375,3500,3501,3502,4422,4423,4424,4425,6648,6649,6650,9882");
KARMA_NONDROPPABLE_ITEMS = PVPSettings.getString("ListOfNonDroppableItems", "57,1147,425,1146,461,10,2368,7,6,2370,2369,6842,6611,6612,6613,6614,6615,6616,6617,6618,6619,6620,6621,7694,8181,5575,7694,9388,9389,9390");

View File

@ -5077,15 +5077,14 @@ public final class L2PcInstance extends L2Playable
if ((!isInsideZone(ZoneId.PVP) || (pk == null)) && (!isGM() || Config.KARMA_DROP_GM))
{
boolean isKarmaDrop = false;
final int pkLimit = Config.KARMA_PK_LIMIT;
int dropEquip = 0;
int dropEquipWeapon = 0;
int dropItem = 0;
int dropLimit = 0;
int dropPercent = 0;
if ((getReputation() < 0) && (getPkKills() >= pkLimit))
// Classic calculation.
if (killer.isPlayable() && (getReputation() < 0) && (getPkKills() >= Config.KARMA_PK_LIMIT))
{
isKarmaDrop = true;
dropPercent = Config.KARMA_RATE_DROP;
@ -5094,7 +5093,7 @@ public final class L2PcInstance extends L2Playable
dropItem = Config.KARMA_RATE_DROP_ITEM;
dropLimit = Config.KARMA_DROP_LIMIT;
}
else if (killer.isNpc() && (getLevel() > 4))
else if (killer.isNpc())
{
dropPercent = Config.PLAYER_RATE_DROP;
dropEquip = Config.PLAYER_RATE_DROP_EQUIP;