Should not gain karma when killing opposing faction player.
This commit is contained in:
+12
-2
@@ -5234,12 +5234,22 @@ public final class L2PcInstance extends L2Playable
|
|||||||
setReputation(0);
|
setReputation(0);
|
||||||
setPkKills(getPkKills() + 1);
|
setPkKills(getPkKills() + 1);
|
||||||
}
|
}
|
||||||
else
|
else // Calculate new karma and increase pk count
|
||||||
|
{
|
||||||
|
if (Config.FACTION_SYSTEM_ENABLED)
|
||||||
|
{
|
||||||
|
if ((_isGood && killedPlayer.isGood()) || (_isEvil && killedPlayer.isEvil()))
|
||||||
{
|
{
|
||||||
// Calculate new karma and increase pk count
|
|
||||||
setReputation(getReputation() - Formulas.calculateKarmaGain(getPkKills(), killedPlayable.isSummon()));
|
setReputation(getReputation() - Formulas.calculateKarmaGain(getPkKills(), killedPlayable.isSummon()));
|
||||||
setPkKills(getPkKills() + 1);
|
setPkKills(getPkKills() + 1);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
setReputation(getReputation() - Formulas.calculateKarmaGain(getPkKills(), killedPlayable.isSummon()));
|
||||||
|
setPkKills(getPkKills() + 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
final UserInfo ui = new UserInfo(this, false);
|
final UserInfo ui = new UserInfo(this, false);
|
||||||
ui.addComponentType(UserInfoType.SOCIAL);
|
ui.addComponentType(UserInfoType.SOCIAL);
|
||||||
|
|||||||
+12
-2
@@ -5240,12 +5240,22 @@ public final class L2PcInstance extends L2Playable
|
|||||||
setReputation(0);
|
setReputation(0);
|
||||||
setPkKills(getPkKills() + 1);
|
setPkKills(getPkKills() + 1);
|
||||||
}
|
}
|
||||||
else
|
else // Calculate new karma and increase pk count
|
||||||
|
{
|
||||||
|
if (Config.FACTION_SYSTEM_ENABLED)
|
||||||
|
{
|
||||||
|
if ((_isGood && killedPlayer.isGood()) || (_isEvil && killedPlayer.isEvil()))
|
||||||
{
|
{
|
||||||
// Calculate new karma and increase pk count
|
|
||||||
setReputation(getReputation() - Formulas.calculateKarmaGain(getPkKills(), killedPlayable.isSummon()));
|
setReputation(getReputation() - Formulas.calculateKarmaGain(getPkKills(), killedPlayable.isSummon()));
|
||||||
setPkKills(getPkKills() + 1);
|
setPkKills(getPkKills() + 1);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
setReputation(getReputation() - Formulas.calculateKarmaGain(getPkKills(), killedPlayable.isSummon()));
|
||||||
|
setPkKills(getPkKills() + 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
final UserInfo ui = new UserInfo(this, false);
|
final UserInfo ui = new UserInfo(this, false);
|
||||||
ui.addComponentType(UserInfoType.SOCIAL);
|
ui.addComponentType(UserInfoType.SOCIAL);
|
||||||
|
|||||||
+12
-2
@@ -5242,12 +5242,22 @@ public final class L2PcInstance extends L2Playable
|
|||||||
setReputation(0);
|
setReputation(0);
|
||||||
setPkKills(getPkKills() + 1);
|
setPkKills(getPkKills() + 1);
|
||||||
}
|
}
|
||||||
else
|
else // Calculate new karma and increase pk count
|
||||||
|
{
|
||||||
|
if (Config.FACTION_SYSTEM_ENABLED)
|
||||||
|
{
|
||||||
|
if ((_isGood && killedPlayer.isGood()) || (_isEvil && killedPlayer.isEvil()))
|
||||||
{
|
{
|
||||||
// Calculate new karma and increase pk count
|
|
||||||
setReputation(getReputation() - Formulas.calculateKarmaGain(getPkKills(), killedPlayable.isSummon()));
|
setReputation(getReputation() - Formulas.calculateKarmaGain(getPkKills(), killedPlayable.isSummon()));
|
||||||
setPkKills(getPkKills() + 1);
|
setPkKills(getPkKills() + 1);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
setReputation(getReputation() - Formulas.calculateKarmaGain(getPkKills(), killedPlayable.isSummon()));
|
||||||
|
setPkKills(getPkKills() + 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
final UserInfo ui = new UserInfo(this, false);
|
final UserInfo ui = new UserInfo(this, false);
|
||||||
ui.addComponentType(UserInfoType.SOCIAL);
|
ui.addComponentType(UserInfoType.SOCIAL);
|
||||||
|
|||||||
+12
-2
@@ -5240,12 +5240,22 @@ public final class L2PcInstance extends L2Playable
|
|||||||
setReputation(0);
|
setReputation(0);
|
||||||
setPkKills(getPkKills() + 1);
|
setPkKills(getPkKills() + 1);
|
||||||
}
|
}
|
||||||
else
|
else // Calculate new karma and increase pk count
|
||||||
|
{
|
||||||
|
if (Config.FACTION_SYSTEM_ENABLED)
|
||||||
|
{
|
||||||
|
if ((_isGood && killedPlayer.isGood()) || (_isEvil && killedPlayer.isEvil()))
|
||||||
{
|
{
|
||||||
// Calculate new karma and increase pk count
|
|
||||||
setReputation(getReputation() - Formulas.calculateKarmaGain(getPkKills(), killedPlayable.isSummon()));
|
setReputation(getReputation() - Formulas.calculateKarmaGain(getPkKills(), killedPlayable.isSummon()));
|
||||||
setPkKills(getPkKills() + 1);
|
setPkKills(getPkKills() + 1);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
setReputation(getReputation() - Formulas.calculateKarmaGain(getPkKills(), killedPlayable.isSummon()));
|
||||||
|
setPkKills(getPkKills() + 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
final UserInfo ui = new UserInfo(this, false);
|
final UserInfo ui = new UserInfo(this, false);
|
||||||
ui.addComponentType(UserInfoType.SOCIAL);
|
ui.addComponentType(UserInfoType.SOCIAL);
|
||||||
|
|||||||
+12
-2
@@ -5241,12 +5241,22 @@ public final class L2PcInstance extends L2Playable
|
|||||||
setReputation(0);
|
setReputation(0);
|
||||||
setPkKills(getPkKills() + 1);
|
setPkKills(getPkKills() + 1);
|
||||||
}
|
}
|
||||||
else
|
else // Calculate new karma and increase pk count
|
||||||
|
{
|
||||||
|
if (Config.FACTION_SYSTEM_ENABLED)
|
||||||
|
{
|
||||||
|
if ((_isGood && killedPlayer.isGood()) || (_isEvil && killedPlayer.isEvil()))
|
||||||
{
|
{
|
||||||
// Calculate new karma and increase pk count
|
|
||||||
setReputation(getReputation() - Formulas.calculateKarmaGain(getPkKills(), killedPlayable.isSummon()));
|
setReputation(getReputation() - Formulas.calculateKarmaGain(getPkKills(), killedPlayable.isSummon()));
|
||||||
setPkKills(getPkKills() + 1);
|
setPkKills(getPkKills() + 1);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
setReputation(getReputation() - Formulas.calculateKarmaGain(getPkKills(), killedPlayable.isSummon()));
|
||||||
|
setPkKills(getPkKills() + 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
final UserInfo ui = new UserInfo(this, false);
|
final UserInfo ui = new UserInfo(this, false);
|
||||||
ui.addComponentType(UserInfoType.SOCIAL);
|
ui.addComponentType(UserInfoType.SOCIAL);
|
||||||
|
|||||||
+12
-2
@@ -5241,12 +5241,22 @@ public final class L2PcInstance extends L2Playable
|
|||||||
setReputation(0);
|
setReputation(0);
|
||||||
setPkKills(getPkKills() + 1);
|
setPkKills(getPkKills() + 1);
|
||||||
}
|
}
|
||||||
else
|
else // Calculate new karma and increase pk count
|
||||||
|
{
|
||||||
|
if (Config.FACTION_SYSTEM_ENABLED)
|
||||||
|
{
|
||||||
|
if ((_isGood && killedPlayer.isGood()) || (_isEvil && killedPlayer.isEvil()))
|
||||||
{
|
{
|
||||||
// Calculate new karma and increase pk count
|
|
||||||
setReputation(getReputation() - Formulas.calculateKarmaGain(getPkKills(), killedPlayable.isSummon()));
|
setReputation(getReputation() - Formulas.calculateKarmaGain(getPkKills(), killedPlayable.isSummon()));
|
||||||
setPkKills(getPkKills() + 1);
|
setPkKills(getPkKills() + 1);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
setReputation(getReputation() - Formulas.calculateKarmaGain(getPkKills(), killedPlayable.isSummon()));
|
||||||
|
setPkKills(getPkKills() + 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
final UserInfo ui = new UserInfo(this, false);
|
final UserInfo ui = new UserInfo(this, false);
|
||||||
ui.addComponentType(UserInfoType.SOCIAL);
|
ui.addComponentType(UserInfoType.SOCIAL);
|
||||||
|
|||||||
+10
@@ -5370,8 +5370,18 @@ public final class L2PcInstance extends L2Playable
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (targetPlayer.getPvpFlag() == 0) // Target player doesn't have karma
|
else if (targetPlayer.getPvpFlag() == 0) // Target player doesn't have karma
|
||||||
|
{
|
||||||
|
if (Config.FACTION_SYSTEM_ENABLED)
|
||||||
|
{
|
||||||
|
if ((_isGood && targetPlayer.isGood()) || (_isEvil && targetPlayer.isEvil()))
|
||||||
{
|
{
|
||||||
increasePkKillsAndKarma(target);
|
increasePkKillsAndKarma(target);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
increasePkKillsAndKarma(target);
|
||||||
|
}
|
||||||
checkItemRestriction(); // Unequip adventurer items
|
checkItemRestriction(); // Unequip adventurer items
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+12
-2
@@ -5205,12 +5205,22 @@ public final class L2PcInstance extends L2Playable
|
|||||||
setReputation(0);
|
setReputation(0);
|
||||||
setPkKills(getPkKills() + 1);
|
setPkKills(getPkKills() + 1);
|
||||||
}
|
}
|
||||||
else
|
else // Calculate new karma and increase pk count
|
||||||
|
{
|
||||||
|
if (Config.FACTION_SYSTEM_ENABLED)
|
||||||
|
{
|
||||||
|
if ((_isGood && killedPlayer.isGood()) || (_isEvil && killedPlayer.isEvil()))
|
||||||
{
|
{
|
||||||
// Calculate new karma and increase pk count
|
|
||||||
setReputation(getReputation() - Formulas.calculateKarmaGain(getPkKills(), killedPlayable.isSummon()));
|
setReputation(getReputation() - Formulas.calculateKarmaGain(getPkKills(), killedPlayable.isSummon()));
|
||||||
setPkKills(getPkKills() + 1);
|
setPkKills(getPkKills() + 1);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
setReputation(getReputation() - Formulas.calculateKarmaGain(getPkKills(), killedPlayable.isSummon()));
|
||||||
|
setPkKills(getPkKills() + 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
final UserInfo ui = new UserInfo(this, false);
|
final UserInfo ui = new UserInfo(this, false);
|
||||||
ui.addComponentType(UserInfoType.SOCIAL);
|
ui.addComponentType(UserInfoType.SOCIAL);
|
||||||
|
|||||||
+12
-2
@@ -5206,12 +5206,22 @@ public final class L2PcInstance extends L2Playable
|
|||||||
setReputation(0);
|
setReputation(0);
|
||||||
setPkKills(getPkKills() + 1);
|
setPkKills(getPkKills() + 1);
|
||||||
}
|
}
|
||||||
else
|
else // Calculate new karma and increase pk count
|
||||||
|
{
|
||||||
|
if (Config.FACTION_SYSTEM_ENABLED)
|
||||||
|
{
|
||||||
|
if ((_isGood && killedPlayer.isGood()) || (_isEvil && killedPlayer.isEvil()))
|
||||||
{
|
{
|
||||||
// Calculate new karma and increase pk count
|
|
||||||
setReputation(getReputation() - Formulas.calculateKarmaGain(getPkKills(), killedPlayable.isSummon()));
|
setReputation(getReputation() - Formulas.calculateKarmaGain(getPkKills(), killedPlayable.isSummon()));
|
||||||
setPkKills(getPkKills() + 1);
|
setPkKills(getPkKills() + 1);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
setReputation(getReputation() - Formulas.calculateKarmaGain(getPkKills(), killedPlayable.isSummon()));
|
||||||
|
setPkKills(getPkKills() + 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
final UserInfo ui = new UserInfo(this, false);
|
final UserInfo ui = new UserInfo(this, false);
|
||||||
ui.addComponentType(UserInfoType.SOCIAL);
|
ui.addComponentType(UserInfoType.SOCIAL);
|
||||||
|
|||||||
+12
-2
@@ -5207,12 +5207,22 @@ public final class L2PcInstance extends L2Playable
|
|||||||
setReputation(0);
|
setReputation(0);
|
||||||
setPkKills(getPkKills() + 1);
|
setPkKills(getPkKills() + 1);
|
||||||
}
|
}
|
||||||
else
|
else // Calculate new karma and increase pk count
|
||||||
|
{
|
||||||
|
if (Config.FACTION_SYSTEM_ENABLED)
|
||||||
|
{
|
||||||
|
if ((_isGood && killedPlayer.isGood()) || (_isEvil && killedPlayer.isEvil()))
|
||||||
{
|
{
|
||||||
// Calculate new karma and increase pk count
|
|
||||||
setReputation(getReputation() - Formulas.calculateKarmaGain(getPkKills(), killedPlayable.isSummon()));
|
setReputation(getReputation() - Formulas.calculateKarmaGain(getPkKills(), killedPlayable.isSummon()));
|
||||||
setPkKills(getPkKills() + 1);
|
setPkKills(getPkKills() + 1);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
setReputation(getReputation() - Formulas.calculateKarmaGain(getPkKills(), killedPlayable.isSummon()));
|
||||||
|
setPkKills(getPkKills() + 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
final UserInfo ui = new UserInfo(this, false);
|
final UserInfo ui = new UserInfo(this, false);
|
||||||
ui.addComponentType(UserInfoType.SOCIAL);
|
ui.addComponentType(UserInfoType.SOCIAL);
|
||||||
|
|||||||
+12
-2
@@ -5207,12 +5207,22 @@ public final class L2PcInstance extends L2Playable
|
|||||||
setReputation(0);
|
setReputation(0);
|
||||||
setPkKills(getPkKills() + 1);
|
setPkKills(getPkKills() + 1);
|
||||||
}
|
}
|
||||||
else
|
else // Calculate new karma and increase pk count
|
||||||
|
{
|
||||||
|
if (Config.FACTION_SYSTEM_ENABLED)
|
||||||
|
{
|
||||||
|
if ((_isGood && killedPlayer.isGood()) || (_isEvil && killedPlayer.isEvil()))
|
||||||
{
|
{
|
||||||
// Calculate new karma and increase pk count
|
|
||||||
setReputation(getReputation() - Formulas.calculateKarmaGain(getPkKills(), killedPlayable.isSummon()));
|
setReputation(getReputation() - Formulas.calculateKarmaGain(getPkKills(), killedPlayable.isSummon()));
|
||||||
setPkKills(getPkKills() + 1);
|
setPkKills(getPkKills() + 1);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
setReputation(getReputation() - Formulas.calculateKarmaGain(getPkKills(), killedPlayable.isSummon()));
|
||||||
|
setPkKills(getPkKills() + 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
final UserInfo ui = new UserInfo(this, false);
|
final UserInfo ui = new UserInfo(this, false);
|
||||||
ui.addComponentType(UserInfoType.SOCIAL);
|
ui.addComponentType(UserInfoType.SOCIAL);
|
||||||
|
|||||||
Reference in New Issue
Block a user