Reputation system rework.
TODO: Add more proper formulas.
This commit is contained in:
@ -237,7 +237,7 @@ public class L2AttackableAI extends L2CharacterAI implements Runnable
|
||||
return GeoData.getInstance().canSeeTarget(me, player);
|
||||
}
|
||||
// Check if the L2PcInstance target has karma (=PK)
|
||||
if ((player != null) && (player.getKarma() > 0))
|
||||
if ((player != null) && (player.getReputation() < 0))
|
||||
{
|
||||
return GeoData.getInstance().canSeeTarget(me, player); // Los Check
|
||||
}
|
||||
@ -258,7 +258,7 @@ public class L2AttackableAI extends L2CharacterAI implements Runnable
|
||||
}
|
||||
|
||||
// Check if the L2PcInstance target has karma (=PK)
|
||||
if ((target instanceof L2PcInstance) && (((L2PcInstance) target).getKarma() > 0))
|
||||
if ((target instanceof L2PcInstance) && (((L2PcInstance) target).getReputation() < 0))
|
||||
{
|
||||
return GeoData.getInstance().canSeeTarget(me, target); // Los Check
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ public abstract class L2PlayableAI extends L2CharacterAI
|
||||
{
|
||||
if (target instanceof L2Playable)
|
||||
{
|
||||
if (target.getActingPlayer().isProtectionBlessingAffected() && ((_actor.getActingPlayer().getLevel() - target.getActingPlayer().getLevel()) >= 10) && (_actor.getActingPlayer().getKarma() > 0) && !(target.isInsideZone(ZoneId.PVP)))
|
||||
if (target.getActingPlayer().isProtectionBlessingAffected() && ((_actor.getActingPlayer().getLevel() - target.getActingPlayer().getLevel()) >= 10) && (_actor.getActingPlayer().getReputation() < 0) && !(target.isInsideZone(ZoneId.PVP)))
|
||||
{
|
||||
// If attacker have karma and have level >= 10 than his target and target have
|
||||
// Newbie Protection Buff,
|
||||
@ -54,7 +54,7 @@ public abstract class L2PlayableAI extends L2CharacterAI
|
||||
return;
|
||||
}
|
||||
|
||||
if (_actor.getActingPlayer().isProtectionBlessingAffected() && ((target.getActingPlayer().getLevel() - _actor.getActingPlayer().getLevel()) >= 10) && (target.getActingPlayer().getKarma() > 0) && !(target.isInsideZone(ZoneId.PVP)))
|
||||
if (_actor.getActingPlayer().isProtectionBlessingAffected() && ((target.getActingPlayer().getLevel() - _actor.getActingPlayer().getLevel()) >= 10) && (target.getActingPlayer().getReputation() < 0) && !(target.isInsideZone(ZoneId.PVP)))
|
||||
{
|
||||
// If target have karma and have level >= 10 than his target and actor have
|
||||
// Newbie Protection Buff,
|
||||
@ -86,7 +86,7 @@ public abstract class L2PlayableAI extends L2CharacterAI
|
||||
{
|
||||
if ((target instanceof L2Playable) && skill.isBad())
|
||||
{
|
||||
if (target.getActingPlayer().isProtectionBlessingAffected() && ((_actor.getActingPlayer().getLevel() - target.getActingPlayer().getLevel()) >= 10) && (_actor.getActingPlayer().getKarma() > 0) && !target.isInsideZone(ZoneId.PVP))
|
||||
if (target.getActingPlayer().isProtectionBlessingAffected() && ((_actor.getActingPlayer().getLevel() - target.getActingPlayer().getLevel()) >= 10) && (_actor.getActingPlayer().getReputation() < 0) && !target.isInsideZone(ZoneId.PVP))
|
||||
{
|
||||
// If attacker have karma and have level >= 10 than his target and target have
|
||||
// Newbie Protection Buff,
|
||||
@ -96,7 +96,7 @@ public abstract class L2PlayableAI extends L2CharacterAI
|
||||
return;
|
||||
}
|
||||
|
||||
if (_actor.getActingPlayer().isProtectionBlessingAffected() && ((target.getActingPlayer().getLevel() - _actor.getActingPlayer().getLevel()) >= 10) && (target.getActingPlayer().getKarma() > 0) && !target.isInsideZone(ZoneId.PVP))
|
||||
if (_actor.getActingPlayer().isProtectionBlessingAffected() && ((target.getActingPlayer().getLevel() - _actor.getActingPlayer().getLevel()) >= 10) && (target.getActingPlayer().getReputation() < 0) && !target.isInsideZone(ZoneId.PVP))
|
||||
{
|
||||
// If target have karma and have level >= 10 than his target and actor have
|
||||
// Newbie Protection Buff,
|
||||
|
@ -266,7 +266,7 @@ public final class MapRegionManager implements IXmlReader
|
||||
L2ClanHallZone zone = clanhall.getZone();
|
||||
if ((zone != null) && !player.isFlyingMounted())
|
||||
{
|
||||
if (player.getKarma() > 0)
|
||||
if (player.getReputation() < 0)
|
||||
{
|
||||
return zone.getChaoticSpawnLoc();
|
||||
}
|
||||
@ -292,7 +292,7 @@ public final class MapRegionManager implements IXmlReader
|
||||
|
||||
if ((castle != null) && (castle.getResidenceId() > 0))
|
||||
{
|
||||
if (player.getKarma() > 0)
|
||||
if (player.getReputation() < 0)
|
||||
{
|
||||
return castle.getResidenceZone().getChaoticSpawnLoc();
|
||||
}
|
||||
@ -317,7 +317,7 @@ public final class MapRegionManager implements IXmlReader
|
||||
|
||||
if ((fort != null) && (fort.getResidenceId() > 0))
|
||||
{
|
||||
if (player.getKarma() > 0)
|
||||
if (player.getReputation() < 0)
|
||||
{
|
||||
return fort.getResidenceZone().getChaoticSpawnLoc();
|
||||
}
|
||||
@ -371,7 +371,7 @@ public final class MapRegionManager implements IXmlReader
|
||||
}
|
||||
|
||||
// Karma player land out of city
|
||||
if (player.getKarma() > 0)
|
||||
if (player.getReputation() < 0)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
@ -49,7 +49,6 @@ public class CharSelectInfoPackage
|
||||
private int _maxMp = 0;
|
||||
private double _currentMp = 0;
|
||||
private final int[][] _paperdoll;
|
||||
private int _karma = 0;
|
||||
private int _reputation = 0;
|
||||
private int _pkKills = 0;
|
||||
private int _pvpKills = 0;
|
||||
@ -328,16 +327,6 @@ public class CharSelectInfoPackage
|
||||
return _paperdoll[Inventory.PAPERDOLL_RHAND][2];
|
||||
}
|
||||
|
||||
public void setKarma(int karma)
|
||||
{
|
||||
_karma = karma;
|
||||
}
|
||||
|
||||
public int getKarma()
|
||||
{
|
||||
return _karma;
|
||||
}
|
||||
|
||||
public void setReputation(int reputation)
|
||||
{
|
||||
_reputation = reputation;
|
||||
|
@ -80,7 +80,7 @@ public class CursedWeapon implements INamable
|
||||
private int _playerId = 0;
|
||||
protected L2PcInstance _player = null;
|
||||
private L2ItemInstance _item = null;
|
||||
private int _playerKarma = 0;
|
||||
private int _playerReputation = 0;
|
||||
private int _playerPkKills = 0;
|
||||
protected int transformationId = 0;
|
||||
|
||||
@ -103,7 +103,7 @@ public class CursedWeapon implements INamable
|
||||
|
||||
_player.abortAttack();
|
||||
|
||||
_player.setKarma(_playerKarma);
|
||||
_player.setReputation(_playerReputation);
|
||||
_player.setPkKills(_playerPkKills);
|
||||
_player.setCursedWeaponEquippedId(0);
|
||||
removeSkill();
|
||||
@ -153,7 +153,7 @@ public class CursedWeapon implements INamable
|
||||
}
|
||||
|
||||
// Restore the karma
|
||||
ps.setInt(1, _playerKarma);
|
||||
ps.setInt(1, _playerReputation);
|
||||
ps.setInt(2, _playerPkKills);
|
||||
ps.setInt(3, _playerId);
|
||||
if (ps.executeUpdate() != 1)
|
||||
@ -219,7 +219,7 @@ public class CursedWeapon implements INamable
|
||||
_endTime = 0;
|
||||
_player = null;
|
||||
_playerId = 0;
|
||||
_playerKarma = 0;
|
||||
_playerReputation = 0;
|
||||
_playerPkKills = 0;
|
||||
_item = null;
|
||||
_nbKills = 0;
|
||||
@ -274,7 +274,7 @@ public class CursedWeapon implements INamable
|
||||
{
|
||||
_item = _player.getInventory().getItemByItemId(_itemId);
|
||||
_player.dropItem("DieDrop", _item, killer, true);
|
||||
_player.setKarma(_playerKarma);
|
||||
_player.setReputation(_playerReputation);
|
||||
_player.setPkKills(_playerPkKills);
|
||||
_player.setCursedWeaponEquippedId(0);
|
||||
removeSkill();
|
||||
@ -422,13 +422,13 @@ public class CursedWeapon implements INamable
|
||||
// Player holding it data
|
||||
_player = player;
|
||||
_playerId = _player.getObjectId();
|
||||
_playerKarma = _player.getKarma();
|
||||
_playerReputation = _player.getReputation();
|
||||
_playerPkKills = _player.getPkKills();
|
||||
saveData();
|
||||
|
||||
// Change player stats
|
||||
_player.setCursedWeaponEquippedId(_itemId);
|
||||
_player.setKarma(9999999);
|
||||
_player.setReputation(-9999999);
|
||||
_player.setPkKills(0);
|
||||
if (_player.isInParty())
|
||||
{
|
||||
@ -498,7 +498,7 @@ public class CursedWeapon implements INamable
|
||||
{
|
||||
ps.setInt(1, _itemId);
|
||||
ps.setInt(2, _playerId);
|
||||
ps.setInt(3, _playerKarma);
|
||||
ps.setInt(3, _playerReputation);
|
||||
ps.setInt(4, _playerPkKills);
|
||||
ps.setInt(5, _nbKills);
|
||||
ps.setLong(6, _endTime);
|
||||
@ -523,7 +523,7 @@ public class CursedWeapon implements INamable
|
||||
// Unequip & Drop
|
||||
dropIt(null, null, killer, false);
|
||||
// Reset player stats
|
||||
_player.setKarma(_playerKarma);
|
||||
_player.setReputation(_playerReputation);
|
||||
_player.setPkKills(_playerPkKills);
|
||||
_player.setCursedWeaponEquippedId(0);
|
||||
removeSkill();
|
||||
@ -590,7 +590,7 @@ public class CursedWeapon implements INamable
|
||||
|
||||
public void setPlayerKarma(int playerKarma)
|
||||
{
|
||||
_playerKarma = playerKarma;
|
||||
_playerReputation = playerKarma;
|
||||
}
|
||||
|
||||
public void setPlayerPkKills(int playerPkKills)
|
||||
@ -666,7 +666,7 @@ public class CursedWeapon implements INamable
|
||||
|
||||
public int getPlayerKarma()
|
||||
{
|
||||
return _playerKarma;
|
||||
return _playerReputation;
|
||||
}
|
||||
|
||||
public int getPlayerPkKills()
|
||||
|
@ -2539,6 +2539,16 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
||||
{
|
||||
getSkillChannelized().abortChannelization();
|
||||
}
|
||||
|
||||
// FIXME: Karma reduction tempfix.
|
||||
if (isMonster() && (killer != null) && killer.isPlayer() && (killer.getActingPlayer().getReputation() < 0))
|
||||
{
|
||||
if (killer.getLevel() >= (getLevel() - 5))
|
||||
{
|
||||
killer.getActingPlayer().setKarma(killer.getActingPlayer().getReputation() - (killer.getActingPlayer().getReputation() / 8));
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -5257,11 +5267,11 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
||||
if (Config.ALT_GAME_KARMA_PLAYER_CAN_BE_KILLED_IN_PEACEZONE)
|
||||
{
|
||||
// allows red to be attacked and red to attack flagged players
|
||||
if ((target.getActingPlayer() != null) && (target.getActingPlayer().getKarma() > 0))
|
||||
if ((target.getActingPlayer() != null) && (target.getActingPlayer().getReputation() < 0))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if ((attacker.getActingPlayer() != null) && (attacker.getActingPlayer().getKarma() > 0) && (target.getActingPlayer() != null) && (target.getActingPlayer().getPvpFlag() > 0))
|
||||
if ((attacker.getActingPlayer() != null) && (attacker.getActingPlayer().getReputation() < 0) && (target.getActingPlayer() != null) && (target.getActingPlayer().getPvpFlag() > 0))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@ -5994,7 +6004,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
||||
if (target.isPlayer())
|
||||
{
|
||||
// Casting non offensive skill on player with pvp flag set or with karma
|
||||
if (!(target.equals(this) || target.equals(player)) && ((target.getActingPlayer().getPvpFlag() > 0) || (target.getActingPlayer().getKarma() > 0)))
|
||||
if (!(target.equals(this) || target.equals(player)) && ((target.getActingPlayer().getPvpFlag() > 0) || (target.getActingPlayer().getReputation() < 0)))
|
||||
{
|
||||
player.updatePvPStatus();
|
||||
}
|
||||
|
@ -933,7 +933,7 @@ public class L2Npc extends L2Character
|
||||
player.setTarget(player);
|
||||
return;
|
||||
}
|
||||
if (player.getKarma() > 0)
|
||||
if (player.getReputation() < 0)
|
||||
{
|
||||
if (!Config.ALT_GAME_KARMA_PLAYER_CAN_SHOP && (this instanceof L2MerchantInstance))
|
||||
{
|
||||
|
@ -232,7 +232,7 @@ public abstract class L2Playable extends L2Character
|
||||
return false; // Active player is null
|
||||
}
|
||||
|
||||
if (player.getKarma() != 0)
|
||||
if (player.getReputation() < 0)
|
||||
{
|
||||
return false; // Active player has karma
|
||||
}
|
||||
@ -247,7 +247,7 @@ public abstract class L2Playable extends L2Character
|
||||
{
|
||||
return false; // Target player is self
|
||||
}
|
||||
if (targetPlayer.getKarma() != 0)
|
||||
if (targetPlayer.getReputation() < 0)
|
||||
{
|
||||
return false; // Target player has karma
|
||||
}
|
||||
@ -346,8 +346,6 @@ public abstract class L2Playable extends L2Character
|
||||
|
||||
public abstract void doPickupItem(L2Object object);
|
||||
|
||||
public abstract int getKarma();
|
||||
|
||||
public abstract int getReputation();
|
||||
|
||||
public abstract byte getPvpFlag();
|
||||
|
@ -243,12 +243,6 @@ public abstract class L2Summon extends L2Playable
|
||||
return ExperienceData.getInstance().getExpForLevel(getLevel() + 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final int getKarma()
|
||||
{
|
||||
return getOwner() != null ? getOwner().getKarma() : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final int getReputation()
|
||||
{
|
||||
|
@ -50,10 +50,6 @@ public class PcAppearance
|
||||
/** The default title color is 0xECF9A2. */
|
||||
private int _titleColor = DEFAULT_TITLE_COLOR;
|
||||
|
||||
/** Karma and Reputation colors */
|
||||
private final int _redColor = 255;
|
||||
private final int _greenColor = 65280;
|
||||
|
||||
public PcAppearance(byte face, byte hColor, byte hStyle, boolean sex)
|
||||
{
|
||||
_face = face;
|
||||
@ -177,13 +173,9 @@ public class PcAppearance
|
||||
|
||||
public int getNameColor()
|
||||
{
|
||||
if (_owner.getKarma() > 0)
|
||||
if (_owner.getReputation() != 0)
|
||||
{
|
||||
return _redColor;
|
||||
}
|
||||
if (_owner.getReputation() > 0)
|
||||
{
|
||||
return _greenColor;
|
||||
return 0xFFFFFF; // Using 0xFFFFFF value in case _nameColor has changed.
|
||||
}
|
||||
return _nameColor;
|
||||
}
|
||||
|
@ -57,7 +57,7 @@ public class L2FriendlyMobInstance extends L2Attackable
|
||||
{
|
||||
if (attacker instanceof L2PcInstance)
|
||||
{
|
||||
return ((L2PcInstance) attacker).getKarma() > 0;
|
||||
return ((L2PcInstance) attacker).getReputation() < 0;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@ -368,8 +368,8 @@ public final class L2PcInstance extends L2Playable
|
||||
private static final String DELETE_ITEM_REUSE_SAVE = "DELETE FROM character_item_reuse_save WHERE charId=?";
|
||||
|
||||
// Character Character SQL String Definitions:
|
||||
private static final String INSERT_CHARACTER = "INSERT INTO characters (account_name,charId,char_name,level,maxHp,curHp,maxCp,curCp,maxMp,curMp,face,hairStyle,hairColor,sex,exp,sp,karma,reputation,fame,raidpoints,pvpkills,pkkills,clanid,race,classid,deletetime,cancraft,title,title_color,accesslevel,online,clan_privs,wantspeace,base_class,nobless,power_grade,createDate) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
|
||||
private static final String UPDATE_CHARACTER = "UPDATE characters SET level=?,maxHp=?,curHp=?,maxCp=?,curCp=?,maxMp=?,curMp=?,face=?,hairStyle=?,hairColor=?,sex=?,heading=?,x=?,y=?,z=?,exp=?,expBeforeDeath=?,sp=?,karma=?,reputation=?,fame=?,raidpoints=?,pvpkills=?,pkkills=?,clanid=?,race=?,classid=?,deletetime=?,title=?,title_color=?,accesslevel=?,online=?,clan_privs=?,wantspeace=?,base_class=?,onlinetime=?,nobless=?,power_grade=?,subpledge=?,lvl_joined_academy=?,apprentice=?,sponsor=?,clan_join_expiry_time=?,clan_create_expiry_time=?,char_name=?,death_penalty_level=?,bookmarkslot=?,vitality_points=?,pccafe_points=?,language=?,faction=? WHERE charId=?";
|
||||
private static final String INSERT_CHARACTER = "INSERT INTO characters (account_name,charId,char_name,level,maxHp,curHp,maxCp,curCp,maxMp,curMp,face,hairStyle,hairColor,sex,exp,sp,reputation,fame,raidpoints,pvpkills,pkkills,clanid,race,classid,deletetime,cancraft,title,title_color,accesslevel,online,clan_privs,wantspeace,base_class,nobless,power_grade,createDate) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
|
||||
private static final String UPDATE_CHARACTER = "UPDATE characters SET level=?,maxHp=?,curHp=?,maxCp=?,curCp=?,maxMp=?,curMp=?,face=?,hairStyle=?,hairColor=?,sex=?,heading=?,x=?,y=?,z=?,exp=?,expBeforeDeath=?,sp=?,reputation=?,fame=?,raidpoints=?,pvpkills=?,pkkills=?,clanid=?,race=?,classid=?,deletetime=?,title=?,title_color=?,accesslevel=?,online=?,clan_privs=?,wantspeace=?,base_class=?,onlinetime=?,nobless=?,power_grade=?,subpledge=?,lvl_joined_academy=?,apprentice=?,sponsor=?,clan_join_expiry_time=?,clan_create_expiry_time=?,char_name=?,death_penalty_level=?,bookmarkslot=?,vitality_points=?,pccafe_points=?,language=?,faction=? WHERE charId=?";
|
||||
private static final String RESTORE_CHARACTER = "SELECT * FROM characters WHERE charId=?";
|
||||
|
||||
// Character Premium System String Definitions:
|
||||
@ -449,10 +449,7 @@ public final class L2PcInstance extends L2Playable
|
||||
/** The Experience of the L2PcInstance before the last Death Penalty */
|
||||
private long _expBeforeDeath;
|
||||
|
||||
/** The Karma of the L2PcInstance (if higher than 0, the name of the L2PcInstance appears in red) */
|
||||
private int _karma = 0;
|
||||
|
||||
/** The Reputation of the L2PcInstance (if higher than 0, the name of the L2PcInstance appears in green) */
|
||||
/** The Reputation of the L2PcInstance (defines PKK color) */
|
||||
private int _reputation;
|
||||
|
||||
/** The number of player killed during a PvP (the player killed was PvP Flagged) */
|
||||
@ -1986,15 +1983,6 @@ public final class L2PcInstance extends L2Playable
|
||||
return _expBeforeDeath;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the Karma of the L2PcInstance.
|
||||
*/
|
||||
@Override
|
||||
public int getKarma()
|
||||
{
|
||||
return _karma;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the Karma of the L2PcInstance and send a Server->Client packet StatusUpdate (broadcast).
|
||||
* @param karma
|
||||
@ -2002,13 +1990,9 @@ public final class L2PcInstance extends L2Playable
|
||||
public void setKarma(int karma)
|
||||
{
|
||||
// Notify to scripts.
|
||||
EventDispatcher.getInstance().notifyEventAsync(new OnPlayerKarmaChanged(this, getKarma(), karma), this);
|
||||
EventDispatcher.getInstance().notifyEventAsync(new OnPlayerKarmaChanged(this, getReputation(), karma), this);
|
||||
|
||||
if (karma < 0)
|
||||
{
|
||||
karma = 0;
|
||||
}
|
||||
if ((_karma == 0) && (karma > 0))
|
||||
if ((getReputation() < 0) && (karma < 0))
|
||||
{
|
||||
Collection<L2Object> objs = getKnownList().getKnownObjects().values();
|
||||
|
||||
@ -2025,13 +2009,13 @@ public final class L2PcInstance extends L2Playable
|
||||
}
|
||||
}
|
||||
}
|
||||
else if ((_karma > 0) && (karma == 0))
|
||||
else if ((getReputation() < 0) && (karma >= 0))
|
||||
{
|
||||
// Send a Server->Client StatusUpdate packet with Karma and PvP Flag to the L2PcInstance and all L2PcInstance to inform (broadcast)
|
||||
setKarmaFlag(0);
|
||||
}
|
||||
|
||||
_karma = karma;
|
||||
_reputation = karma;
|
||||
broadcastKarma();
|
||||
}
|
||||
|
||||
@ -5430,6 +5414,12 @@ public final class L2PcInstance extends L2Playable
|
||||
|
||||
AntiFeedManager.getInstance().setLastDeathTime(getObjectId());
|
||||
|
||||
// FIXME: Karma reduction tempfix.
|
||||
if (getReputation() < 0)
|
||||
{
|
||||
setKarma(getReputation() - (getReputation() / 4));
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -5441,7 +5431,7 @@ public final class L2PcInstance extends L2Playable
|
||||
}
|
||||
|
||||
L2PcInstance pk = killer.getActingPlayer();
|
||||
if ((getKarma() <= 0) && (pk != null) && (pk.getClan() != null) && (getClan() != null) && (pk.getClan().isAtWarWith(getClanId())
|
||||
if ((getReputation() >= 0) && (pk != null) && (pk.getClan() != null) && (getClan() != null) && (pk.getClan().isAtWarWith(getClanId())
|
||||
// || getClan().isAtWarWith(((L2PcInstance)killer).getClanId())
|
||||
))
|
||||
{
|
||||
@ -5460,7 +5450,7 @@ public final class L2PcInstance extends L2Playable
|
||||
int dropLimit = 0;
|
||||
int dropPercent = 0;
|
||||
|
||||
if ((getKarma() > 0) && (getPkKills() >= pkLimit))
|
||||
if ((getReputation() < 0) && (getPkKills() >= pkLimit))
|
||||
{
|
||||
isKarmaDrop = true;
|
||||
dropPercent = Config.KARMA_RATE_DROP;
|
||||
@ -5605,15 +5595,15 @@ public final class L2PcInstance extends L2Playable
|
||||
}
|
||||
|
||||
// 'No war' or 'One way war' -> 'Normal PK'
|
||||
if (targetPlayer.getKarma() > 0) // Target player has karma
|
||||
if (targetPlayer.getReputation() < 0) // Target player has karma
|
||||
{
|
||||
if (Config.KARMA_AWARD_PK_KILL)
|
||||
{
|
||||
increasePvpKills(target);
|
||||
}
|
||||
if ((_karma <= 0) && AntiFeedManager.getInstance().check(this, targetPlayer))
|
||||
if ((_reputation >= 0) && AntiFeedManager.getInstance().check(this, targetPlayer))
|
||||
{
|
||||
_reputation += 100;
|
||||
_reputation += 100; // FIXME: Find more proper calculation.
|
||||
broadcastUserInfo();
|
||||
}
|
||||
}
|
||||
@ -5664,7 +5654,7 @@ public final class L2PcInstance extends L2Playable
|
||||
{
|
||||
if (!Config.FACTION_SYSTEM_ENABLED)
|
||||
{
|
||||
setKarma(getKarma() + addedKarma);
|
||||
setKarma(getReputation() - addedKarma); // karma is negative reputation
|
||||
}
|
||||
// PK Points are increased only if you kill a player.
|
||||
if (target.isPlayer())
|
||||
@ -5676,7 +5666,6 @@ public final class L2PcInstance extends L2Playable
|
||||
_PvPRegTask.cancel(true);
|
||||
updatePvPFlag(0);
|
||||
}
|
||||
_reputation = 0;
|
||||
}
|
||||
|
||||
// Update player's UI.
|
||||
@ -5717,7 +5706,7 @@ public final class L2PcInstance extends L2Playable
|
||||
{
|
||||
return;
|
||||
}
|
||||
if ((!isInsideZone(ZoneId.PVP) || !player_target.isInsideZone(ZoneId.PVP)) && (player_target.getKarma() == 0))
|
||||
if ((!isInsideZone(ZoneId.PVP) || !player_target.isInsideZone(ZoneId.PVP)) && (player_target.getReputation() >= 0))
|
||||
{
|
||||
if (checkIfPvP(player_target))
|
||||
{
|
||||
@ -5783,7 +5772,7 @@ public final class L2PcInstance extends L2Playable
|
||||
}
|
||||
}
|
||||
|
||||
if (getKarma() > 0)
|
||||
if (getReputation() < 0)
|
||||
{
|
||||
percentLost *= Config.RATE_KARMA_EXP_LOST;
|
||||
}
|
||||
@ -6851,7 +6840,7 @@ public final class L2PcInstance extends L2Playable
|
||||
public void setKarmaFlag(int flag)
|
||||
{
|
||||
StatusUpdate su = new StatusUpdate(this);
|
||||
su.addAttribute(StatusUpdate.PVP_FLAG, getKarma());
|
||||
su.addAttribute(StatusUpdate.PVP_FLAG, getReputation());
|
||||
sendPacket(su);
|
||||
|
||||
final Collection<L2PcInstance> plrs = getKnownList().getKnownPlayers().values();
|
||||
@ -6892,7 +6881,7 @@ public final class L2PcInstance extends L2Playable
|
||||
public void broadcastKarma()
|
||||
{
|
||||
StatusUpdate su = new StatusUpdate(this);
|
||||
su.addAttribute(StatusUpdate.KARMA, getKarma());
|
||||
su.addAttribute(StatusUpdate.KARMA, getReputation());
|
||||
sendPacket(su);
|
||||
|
||||
for (L2PcInstance player : getKnownList().getKnownPlayers().values())
|
||||
@ -6991,27 +6980,26 @@ public final class L2PcInstance extends L2Playable
|
||||
ps.setInt(14, getAppearance().getSex() ? 1 : 0);
|
||||
ps.setLong(15, getExp());
|
||||
ps.setLong(16, getSp());
|
||||
ps.setInt(17, getKarma());
|
||||
ps.setInt(18, getReputation());
|
||||
ps.setInt(19, getFame());
|
||||
ps.setInt(20, getRaidPoints());
|
||||
ps.setInt(21, getPvpKills());
|
||||
ps.setInt(22, getPkKills());
|
||||
ps.setInt(23, getClanId());
|
||||
ps.setInt(24, getRace().ordinal());
|
||||
ps.setInt(25, getClassId().getId());
|
||||
ps.setLong(26, getDeleteTimer());
|
||||
ps.setInt(27, hasDwarvenCraft() ? 1 : 0);
|
||||
ps.setString(28, getTitle());
|
||||
ps.setInt(29, getAppearance().getTitleColor());
|
||||
ps.setInt(30, getAccessLevel().getLevel());
|
||||
ps.setInt(31, isOnlineInt());
|
||||
ps.setInt(32, getClanPrivileges().getBitmask());
|
||||
ps.setInt(33, getWantsPeace());
|
||||
ps.setInt(34, getBaseClass());
|
||||
ps.setInt(35, isNoble() ? 1 : 0);
|
||||
ps.setLong(36, 0);
|
||||
ps.setTimestamp(37, new Timestamp(getCreateDate().getTimeInMillis()));
|
||||
ps.setInt(17, getReputation());
|
||||
ps.setInt(18, getFame());
|
||||
ps.setInt(19, getRaidPoints());
|
||||
ps.setInt(20, getPvpKills());
|
||||
ps.setInt(21, getPkKills());
|
||||
ps.setInt(22, getClanId());
|
||||
ps.setInt(23, getRace().ordinal());
|
||||
ps.setInt(24, getClassId().getId());
|
||||
ps.setLong(25, getDeleteTimer());
|
||||
ps.setInt(26, hasDwarvenCraft() ? 1 : 0);
|
||||
ps.setString(27, getTitle());
|
||||
ps.setInt(28, getAppearance().getTitleColor());
|
||||
ps.setInt(29, getAccessLevel().getLevel());
|
||||
ps.setInt(30, isOnlineInt());
|
||||
ps.setInt(31, getClanPrivileges().getBitmask());
|
||||
ps.setInt(32, getWantsPeace());
|
||||
ps.setInt(33, getBaseClass());
|
||||
ps.setInt(34, isNoble() ? 1 : 0);
|
||||
ps.setLong(35, 0);
|
||||
ps.setTimestamp(36, new Timestamp(getCreateDate().getTimeInMillis()));
|
||||
ps.executeUpdate();
|
||||
}
|
||||
catch (Exception e)
|
||||
@ -7062,7 +7050,6 @@ public final class L2PcInstance extends L2Playable
|
||||
|
||||
player.setHeading(rs.getInt("heading"));
|
||||
|
||||
player.setKarma(rs.getInt("karma"));
|
||||
player.setReputation(rs.getInt("reputation"));
|
||||
player.setFame(rs.getInt("fame"));
|
||||
player.setRaidPoints(rs.getInt("raidpoints"));
|
||||
@ -7625,23 +7612,22 @@ public final class L2PcInstance extends L2Playable
|
||||
ps.setLong(16, exp);
|
||||
ps.setLong(17, getExpBeforeDeath());
|
||||
ps.setLong(18, sp);
|
||||
ps.setInt(19, getKarma());
|
||||
ps.setInt(20, getReputation());
|
||||
ps.setInt(21, getFame());
|
||||
ps.setInt(22, getRaidPoints());
|
||||
ps.setInt(23, getPvpKills());
|
||||
ps.setInt(24, getPkKills());
|
||||
ps.setInt(25, getClanId());
|
||||
ps.setInt(26, getRace().ordinal());
|
||||
ps.setInt(27, getClassId().getId());
|
||||
ps.setLong(28, getDeleteTimer());
|
||||
ps.setString(29, getTitle());
|
||||
ps.setInt(30, getAppearance().getTitleColor());
|
||||
ps.setInt(31, getAccessLevel().getLevel());
|
||||
ps.setInt(32, isOnlineInt());
|
||||
ps.setInt(33, getClanPrivileges().getBitmask());
|
||||
ps.setInt(34, getWantsPeace());
|
||||
ps.setInt(35, getBaseClass());
|
||||
ps.setInt(19, getReputation());
|
||||
ps.setInt(20, getFame());
|
||||
ps.setInt(21, getRaidPoints());
|
||||
ps.setInt(22, getPvpKills());
|
||||
ps.setInt(23, getPkKills());
|
||||
ps.setInt(24, getClanId());
|
||||
ps.setInt(25, getRace().ordinal());
|
||||
ps.setInt(26, getClassId().getId());
|
||||
ps.setLong(27, getDeleteTimer());
|
||||
ps.setString(28, getTitle());
|
||||
ps.setInt(29, getAppearance().getTitleColor());
|
||||
ps.setInt(30, getAccessLevel().getLevel());
|
||||
ps.setInt(31, isOnlineInt());
|
||||
ps.setInt(32, getClanPrivileges().getBitmask());
|
||||
ps.setInt(33, getWantsPeace());
|
||||
ps.setInt(34, getBaseClass());
|
||||
|
||||
long totalOnlineTime = _onlineTime;
|
||||
if (_onlineBeginTime > 0)
|
||||
@ -7649,21 +7635,21 @@ public final class L2PcInstance extends L2Playable
|
||||
totalOnlineTime += (System.currentTimeMillis() - _onlineBeginTime) / 1000;
|
||||
}
|
||||
|
||||
ps.setLong(36, totalOnlineTime);
|
||||
ps.setInt(37, isNoble() ? 1 : 0);
|
||||
ps.setInt(38, getPowerGrade());
|
||||
ps.setInt(39, getPledgeType());
|
||||
ps.setInt(40, getLvlJoinedAcademy());
|
||||
ps.setLong(41, getApprentice());
|
||||
ps.setLong(42, getSponsor());
|
||||
ps.setLong(43, getClanJoinExpiryTime());
|
||||
ps.setLong(44, getClanCreateExpiryTime());
|
||||
ps.setString(45, getName());
|
||||
ps.setLong(46, 0); // unset
|
||||
ps.setInt(47, getBookMarkSlot());
|
||||
ps.setInt(48, _vitalityPoints); // unset
|
||||
ps.setInt(49, getPcBangPoints());
|
||||
ps.setString(50, getLang());
|
||||
ps.setLong(35, totalOnlineTime);
|
||||
ps.setInt(36, isNoble() ? 1 : 0);
|
||||
ps.setInt(37, getPowerGrade());
|
||||
ps.setInt(38, getPledgeType());
|
||||
ps.setInt(39, getLvlJoinedAcademy());
|
||||
ps.setLong(40, getApprentice());
|
||||
ps.setLong(41, getSponsor());
|
||||
ps.setLong(42, getClanJoinExpiryTime());
|
||||
ps.setLong(43, getClanCreateExpiryTime());
|
||||
ps.setString(44, getName());
|
||||
ps.setLong(45, 0); // unset
|
||||
ps.setInt(46, getBookMarkSlot());
|
||||
ps.setInt(47, _vitalityPoints); // unset
|
||||
ps.setInt(48, getPcBangPoints());
|
||||
ps.setString(49, getLang());
|
||||
|
||||
int factionId = 0;
|
||||
if (isGood())
|
||||
@ -7674,9 +7660,9 @@ public final class L2PcInstance extends L2Playable
|
||||
{
|
||||
factionId = 2;
|
||||
}
|
||||
ps.setInt(51, factionId);
|
||||
ps.setInt(50, factionId);
|
||||
|
||||
ps.setInt(52, getObjectId());
|
||||
ps.setInt(51, getObjectId());
|
||||
ps.execute();
|
||||
}
|
||||
catch (Exception e)
|
||||
@ -8701,7 +8687,7 @@ public final class L2PcInstance extends L2Playable
|
||||
}
|
||||
|
||||
// Check if the L2PcInstance has Karma
|
||||
if ((getKarma() > 0) || (getPvpFlag() > 0))
|
||||
if ((getReputation() < 0) || (getPvpFlag() > 0))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@ -9336,7 +9322,7 @@ public final class L2PcInstance extends L2Playable
|
||||
}
|
||||
|
||||
// On retail, it is impossible to debuff a "peaceful" player.
|
||||
if ((targetPlayer.getPvpFlag() == 0) && (targetPlayer.getKarma() == 0))
|
||||
if ((targetPlayer.getPvpFlag() == 0) && (targetPlayer.getReputation() >= 0))
|
||||
{
|
||||
// Check if skill can do dmg
|
||||
if ((skill.getEffectRange() > 0) && isCtrlPressed && (getTarget() == target))
|
||||
@ -9349,7 +9335,7 @@ public final class L2PcInstance extends L2Playable
|
||||
return false;
|
||||
}
|
||||
|
||||
if ((targetPlayer.getPvpFlag() > 0) || (targetPlayer.getKarma() > 0))
|
||||
if ((targetPlayer.getPvpFlag() > 0) || (targetPlayer.getReputation() < 0))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@ -12810,7 +12796,7 @@ public final class L2PcInstance extends L2Playable
|
||||
|
||||
if (killer.isInCategory(CategoryType.SHILENS_FOLLOWERS) || (Rnd.get(1, 100) <= ((Config.DEATH_PENALTY_CHANCE) * percent)))
|
||||
{
|
||||
if (!killer.isPlayable() || (getKarma() > 0))
|
||||
if (!killer.isPlayable() || (getReputation() < 0))
|
||||
{
|
||||
increaseShilensBreathDebuff();
|
||||
}
|
||||
@ -14374,7 +14360,7 @@ public final class L2PcInstance extends L2Playable
|
||||
}
|
||||
else if ((getClan() == null) || (target.getClan() == null))
|
||||
{
|
||||
if ((target.getPvpFlag() == 0) && (target.getKarma() == 0))
|
||||
if ((target.getPvpFlag() == 0) && (target.getReputation() >= 0))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -184,7 +184,7 @@ public final class L2TeleporterInstance extends L2Npc
|
||||
msg.setFile(player.getHtmlPrefix(), "html/teleporter/castleteleporter-busy.htm");
|
||||
player.sendPacket(msg);
|
||||
}
|
||||
else if (!Config.ALT_GAME_KARMA_PLAYER_CAN_USE_GK && (player.getKarma() != 0)) // TODO: Update me when Karma is replaced with Reputation system!
|
||||
else if (!Config.ALT_GAME_KARMA_PLAYER_CAN_USE_GK && (player.getReputation() < 0))
|
||||
{
|
||||
player.sendMessage("Go away, you're not welcome here.");
|
||||
}
|
||||
@ -516,7 +516,7 @@ public final class L2TeleporterInstance extends L2Npc
|
||||
player.sendPacket(SystemMessageId.YOU_CANNOT_TELEPORT_TO_A_VILLAGE_THAT_IS_IN_A_SIEGE);
|
||||
return;
|
||||
}
|
||||
else if (!Config.ALT_GAME_KARMA_PLAYER_CAN_USE_GK && (player.getKarma() > 0)) // karma
|
||||
else if (!Config.ALT_GAME_KARMA_PLAYER_CAN_USE_GK && (player.getReputation() < 0)) // karma
|
||||
{
|
||||
player.sendMessage("Go away, you're not welcome here.");
|
||||
return;
|
||||
|
@ -217,7 +217,7 @@ public final class L2TrapInstance extends L2Npc
|
||||
}
|
||||
|
||||
final L2PcInstance player = target.getActingPlayer();
|
||||
if ((player == null) || ((player.getPvpFlag() == 0) && (player.getKarma() == 0)))
|
||||
if ((player == null) || ((player.getPvpFlag() == 0) && (player.getReputation() >= 0)))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@ -248,9 +248,9 @@ public final class L2TrapInstance extends L2Npc
|
||||
return null;
|
||||
}
|
||||
|
||||
public int getKarma()
|
||||
public int getReputation()
|
||||
{
|
||||
return _owner != null ? _owner.getKarma() : 0;
|
||||
return _owner != null ? _owner.getReputation() : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -373,7 +373,7 @@ public final class L2TrapInstance extends L2Npc
|
||||
return;
|
||||
}
|
||||
|
||||
if ((_owner != null) && (_owner.getPvpFlag() == 0) && (_owner.getKarma() == 0))
|
||||
if ((_owner != null) && (_owner.getPvpFlag() == 0) && (_owner.getReputation() >= 0))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ public class GuardKnownList extends AttackableKnownList
|
||||
if (object.isPlayer())
|
||||
{
|
||||
// Check if the object added is a L2PcInstance that owns Karma
|
||||
if (object.getActingPlayer().getKarma() > 0)
|
||||
if (object.getActingPlayer().getReputation() < 0)
|
||||
{
|
||||
if (Config.DEBUG)
|
||||
{
|
||||
|
@ -130,7 +130,7 @@ public class NpcKnownList extends CharKnownList
|
||||
|
||||
for (L2PcInstance pl : getKnownPlayers().values())
|
||||
{
|
||||
if (!pl.isDead() && !pl.isInvul() && pl.isInsideRadius(monster, monster.getAggroRange(), true, false) && (monster.isMonster() || (monster.isInstanceTypes(InstanceType.L2GuardInstance) && (pl.getKarma() > 0))))
|
||||
if (!pl.isDead() && !pl.isInvul() && pl.isInsideRadius(monster, monster.getAggroRange(), true, false) && (monster.isMonster() || (monster.isInstanceTypes(InstanceType.L2GuardInstance) && (pl.getReputation() < 0))))
|
||||
{
|
||||
// Send aggroRangeEnter
|
||||
if (monster.getHating(pl) == 0)
|
||||
|
@ -90,14 +90,14 @@ public class PcStat extends PlayableStat
|
||||
}
|
||||
|
||||
// Set new karma
|
||||
if (!activeChar.isCursedWeaponEquipped() && (activeChar.getKarma() > 0) && (activeChar.isGM() || !activeChar.isInsideZone(ZoneId.PVP)))
|
||||
if (!activeChar.isCursedWeaponEquipped() && (activeChar.getReputation() < 0) && (activeChar.isGM() || !activeChar.isInsideZone(ZoneId.PVP)))
|
||||
{
|
||||
int karmaLost = Formulas.calculateKarmaLost(activeChar, value);
|
||||
if (karmaLost > 0)
|
||||
{
|
||||
activeChar.setKarma(activeChar.getKarma() - karmaLost);
|
||||
activeChar.setReputation(activeChar.getReputation() + karmaLost);
|
||||
final SystemMessage msg = SystemMessage.getSystemMessage(SystemMessageId.YOUR_REPUTATION_HAS_BEEN_CHANGED_TO_S1);
|
||||
msg.addInt(activeChar.getKarma());
|
||||
msg.addInt(activeChar.getReputation());
|
||||
activeChar.sendPacket(msg);
|
||||
}
|
||||
}
|
||||
|
@ -76,7 +76,7 @@ public class ConditionPlayerState extends Condition
|
||||
case CHAOTIC:
|
||||
if (player != null)
|
||||
{
|
||||
return ((player.getKarma() > 0) == _required);
|
||||
return ((player.getReputation() < 0) == _required);
|
||||
}
|
||||
return !_required;
|
||||
case OLYMPIAD:
|
||||
|
@ -51,7 +51,7 @@ public class ConditionTargetAggro extends Condition
|
||||
}
|
||||
if (effected instanceof L2PcInstance)
|
||||
{
|
||||
return ((L2PcInstance) effected).getKarma() > 0;
|
||||
return ((L2PcInstance) effected).getReputation() < 0;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@ -48,7 +48,7 @@ public final class PlayerEventHolder
|
||||
private final Location _loc;
|
||||
private final int _pvpKills;
|
||||
private final int _pkKills;
|
||||
private final int _karma;
|
||||
private final int _reputation;
|
||||
|
||||
private final List<L2PcInstance> _kills = new CopyOnWriteArrayList<>();
|
||||
private boolean _sitForced;
|
||||
@ -67,7 +67,7 @@ public final class PlayerEventHolder
|
||||
_loc = new Location(player);
|
||||
_pvpKills = player.getPvpKills();
|
||||
_pkKills = player.getPkKills();
|
||||
_karma = player.getKarma();
|
||||
_reputation = player.getReputation();
|
||||
|
||||
_sitForced = sitForced;
|
||||
}
|
||||
@ -80,7 +80,7 @@ public final class PlayerEventHolder
|
||||
_player.teleToLocation(_loc, true);
|
||||
_player.setPvpKills(_pvpKills);
|
||||
_player.setPkKills(_pkKills);
|
||||
_player.setKarma(_karma);
|
||||
_player.setReputation(_reputation);
|
||||
|
||||
}
|
||||
|
||||
|
@ -2174,7 +2174,7 @@ public final class Formulas
|
||||
*/
|
||||
public static int calculateKarmaGain(int pkCount, L2Character target)
|
||||
{
|
||||
if ((target.isPlayer() && (target.getActingPlayer().getKarma() > 0)) || (target.isSummon() && (target.getSummoner().getActingPlayer().getKarma() > 0)))
|
||||
if ((target.isPlayer() && (target.getActingPlayer().getReputation() < 0)) || (target.isSummon() && (target.getSummoner().getActingPlayer().getReputation() < 0)))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -1245,7 +1245,7 @@ public final class RequestActionUse extends L2GameClientPacket
|
||||
return;
|
||||
}
|
||||
|
||||
if (requester.getKarma() > 0)
|
||||
if (requester.getReputation() < 0)
|
||||
{
|
||||
sm = SystemMessage.getSystemMessage(SystemMessageId.C1_IS_IN_A_CHAOTIC_STATE_AND_CANNOT_BE_REQUESTED_FOR_A_COUPLE_ACTION);
|
||||
sm.addPcName(requester);
|
||||
@ -1334,7 +1334,7 @@ public final class RequestActionUse extends L2GameClientPacket
|
||||
return;
|
||||
}
|
||||
|
||||
if (partner.getKarma() > 0)
|
||||
if (partner.getReputation() < 0)
|
||||
{
|
||||
sm = SystemMessage.getSystemMessage(SystemMessageId.C1_IS_IN_A_CHAOTIC_STATE_AND_CANNOT_BE_REQUESTED_FOR_A_COUPLE_ACTION);
|
||||
sm.addPcName(partner);
|
||||
|
@ -96,7 +96,7 @@ public final class RequestBuyItem extends L2GameClientPacket
|
||||
}
|
||||
|
||||
// Alt game - Karma punishment
|
||||
if (!Config.ALT_GAME_KARMA_PLAYER_CAN_SHOP && (player.getKarma() > 0))
|
||||
if (!Config.ALT_GAME_KARMA_PLAYER_CAN_SHOP && (player.getReputation() < 0))
|
||||
{
|
||||
sendPacket(ActionFailed.STATIC_PACKET);
|
||||
return;
|
||||
|
@ -65,7 +65,7 @@ public final class RequestGiveItemToPet extends L2GameClientPacket
|
||||
}
|
||||
|
||||
// Alt game - Karma punishment
|
||||
if (!Config.ALT_GAME_KARMA_PLAYER_CAN_TRADE && (player.getKarma() > 0))
|
||||
if (!Config.ALT_GAME_KARMA_PLAYER_CAN_TRADE && (player.getReputation() < 0))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -96,7 +96,7 @@ public final class RequestMagicSkillUse extends L2GameClientPacket
|
||||
}
|
||||
|
||||
// If Alternate rule Karma punishment is set to true, forbid skill Return to player with Karma
|
||||
if (!Config.ALT_GAME_KARMA_PLAYER_CAN_TELEPORT && (activeChar.getKarma() > 0) && skill.hasEffectType(L2EffectType.TELEPORT))
|
||||
if (!Config.ALT_GAME_KARMA_PLAYER_CAN_TELEPORT && (activeChar.getReputation() < 0) && skill.hasEffectType(L2EffectType.TELEPORT))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -106,7 +106,7 @@ public class RequestPackageSend extends L2GameClientPacket
|
||||
}
|
||||
|
||||
// Alt game - Karma punishment
|
||||
if (!Config.ALT_GAME_KARMA_PLAYER_CAN_USE_WAREHOUSE && (player.getKarma() > 0))
|
||||
if (!Config.ALT_GAME_KARMA_PLAYER_CAN_USE_WAREHOUSE && (player.getReputation() < 0))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -128,7 +128,7 @@ public final class RequestPreviewItem extends L2GameClientPacket
|
||||
}
|
||||
|
||||
// If Alternate rule Karma punishment is set to true, forbid Wear to player with Karma
|
||||
if (!Config.ALT_GAME_KARMA_PLAYER_CAN_SHOP && (activeChar.getKarma() > 0))
|
||||
if (!Config.ALT_GAME_KARMA_PLAYER_CAN_SHOP && (activeChar.getReputation() < 0))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -104,7 +104,7 @@ public final class RequestSellItem extends L2GameClientPacket
|
||||
}
|
||||
|
||||
// Alt game - Karma punishment
|
||||
if (!Config.ALT_GAME_KARMA_PLAYER_CAN_SHOP && (player.getKarma() > 0))
|
||||
if (!Config.ALT_GAME_KARMA_PLAYER_CAN_SHOP && (player.getReputation() < 0))
|
||||
{
|
||||
sendPacket(ActionFailed.STATIC_PACKET);
|
||||
return;
|
||||
|
@ -116,7 +116,7 @@ public final class SendWareHouseDepositList extends L2GameClientPacket
|
||||
}
|
||||
|
||||
// Alt game - Karma punishment
|
||||
if (!Config.ALT_GAME_KARMA_PLAYER_CAN_USE_WAREHOUSE && (player.getKarma() > 0))
|
||||
if (!Config.ALT_GAME_KARMA_PLAYER_CAN_USE_WAREHOUSE && (player.getReputation() < 0))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -107,7 +107,7 @@ public final class SendWareHouseWithDrawList extends L2GameClientPacket
|
||||
}
|
||||
|
||||
// Alt game - Karma punishment
|
||||
if (!Config.ALT_GAME_KARMA_PLAYER_CAN_USE_WAREHOUSE && (player.getKarma() > 0))
|
||||
if (!Config.ALT_GAME_KARMA_PLAYER_CAN_USE_WAREHOUSE && (player.getReputation() < 0))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -123,13 +123,13 @@ public final class TradeRequest extends L2GameClientPacket
|
||||
}
|
||||
|
||||
// L2J Customs: Karma punishment
|
||||
if (!Config.ALT_GAME_KARMA_PLAYER_CAN_TRADE && (player.getKarma() > 0))
|
||||
if (!Config.ALT_GAME_KARMA_PLAYER_CAN_TRADE && (player.getReputation() < 0))
|
||||
{
|
||||
player.sendMessage("You cannot trade while you are in a chaotic state.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!Config.ALT_GAME_KARMA_PLAYER_CAN_TRADE && (partner.getKarma() > 0))
|
||||
if (!Config.ALT_GAME_KARMA_PLAYER_CAN_TRADE && (partner.getReputation() < 0))
|
||||
{
|
||||
player.sendMessage("You cannot request a trade while your target is in a chaotic state.");
|
||||
return;
|
||||
|
@ -157,7 +157,7 @@ public final class UseItem extends L2GameClientPacket
|
||||
return;
|
||||
}
|
||||
|
||||
if (!Config.ALT_GAME_KARMA_PLAYER_CAN_TELEPORT && (activeChar.getKarma() > 0))
|
||||
if (!Config.ALT_GAME_KARMA_PLAYER_CAN_TELEPORT && (activeChar.getReputation() < 0))
|
||||
{
|
||||
SkillHolder[] skills = item.getItem().getSkills();
|
||||
if (skills != null)
|
||||
|
@ -118,7 +118,7 @@ public abstract class AbstractNpcInfo extends L2GameServerPacket
|
||||
writeD(0x00); // title color 0 = client default
|
||||
|
||||
writeD(_trap.getPvpFlag());
|
||||
writeD(_trap.getKarma());
|
||||
writeD(_trap.getReputation());
|
||||
|
||||
writeD(0); // was AVE and was adding stealth
|
||||
writeD(0x00); // clan id
|
||||
|
@ -151,7 +151,7 @@ public class CharInfo extends L2GameServerPacket
|
||||
}
|
||||
|
||||
writeC(_activeChar.getPvpFlag());
|
||||
writeD(_activeChar.getKarma());
|
||||
writeD(_activeChar.getReputation());
|
||||
|
||||
writeD(_mAtkSpd);
|
||||
writeD(_pAtkSpd);
|
||||
|
@ -59,7 +59,7 @@ public class CharSelected extends L2GameServerPacket
|
||||
writeQ(_activeChar.getSp());
|
||||
writeQ(_activeChar.getExp());
|
||||
writeD(_activeChar.getLevel());
|
||||
writeD(_activeChar.getKarma()); // thx evill33t
|
||||
writeD(_activeChar.getReputation());
|
||||
writeD(_activeChar.getPkKills());
|
||||
writeD(GameTimeController.getInstance().getGameTime() % (24 * 60)); // "reset" on 24th hour
|
||||
writeD(0x00);
|
||||
|
@ -134,7 +134,7 @@ public class CharSelectionInfo extends L2GameServerPacket
|
||||
writeF((float) (charInfoPackage.getExp() - ExperienceData.getInstance().getExpForLevel(charInfoPackage.getLevel())) / (ExperienceData.getInstance().getExpForLevel(charInfoPackage.getLevel() + 1) - ExperienceData.getInstance().getExpForLevel(charInfoPackage.getLevel()))); // High Five
|
||||
writeD(charInfoPackage.getLevel());
|
||||
|
||||
writeD(charInfoPackage.getKarma() > 0 ? charInfoPackage.getKarma() * -1 : charInfoPackage.getReputation());
|
||||
writeD(charInfoPackage.getReputation());
|
||||
writeD(charInfoPackage.getPkKills());
|
||||
writeD(charInfoPackage.getPvPKills());
|
||||
|
||||
@ -278,7 +278,6 @@ public class CharSelectionInfo extends L2GameServerPacket
|
||||
charInfopackage.setCurrentHp(chardata.getDouble("curhp"));
|
||||
charInfopackage.setMaxMp(chardata.getInt("maxmp"));
|
||||
charInfopackage.setCurrentMp(chardata.getDouble("curmp"));
|
||||
charInfopackage.setKarma(chardata.getInt("karma"));
|
||||
charInfopackage.setReputation(chardata.getInt("reputation"));
|
||||
charInfopackage.setPkKills(chardata.getInt("pkkills"));
|
||||
charInfopackage.setPvPKills(chardata.getInt("pvpkills"));
|
||||
|
@ -114,7 +114,7 @@ public class GMViewCharacterInfo extends L2GameServerPacket
|
||||
writeD(_activeChar.getMCriticalHit(null, null));
|
||||
|
||||
writeD(_activeChar.getPvpFlag()); // 0-non-pvp 1-pvp = violett name
|
||||
writeD(_activeChar.getKarma());
|
||||
writeD(_activeChar.getReputation());
|
||||
|
||||
writeD(_runSpd);
|
||||
writeD(_walkSpd);
|
||||
|
@ -127,7 +127,7 @@ public class PetInfo extends L2GameServerPacket
|
||||
writeS(_summon.getTitle()); // owner name
|
||||
|
||||
writeC(_summon.getPvpFlag()); // confirmed
|
||||
writeD(_summon.getKarma()); // confirmed
|
||||
writeD(_summon.getReputation()); // confirmed
|
||||
|
||||
writeD(_curFed); // how fed it is
|
||||
writeD(_maxFed); // max fed it can be
|
||||
|
Reference in New Issue
Block a user