Reputation system rework.

TODO: Add more proper formulas.
This commit is contained in:
MobiusDev
2015-10-15 21:24:00 +00:00
parent bc513a7c24
commit 1fd489f2c0
46 changed files with 177 additions and 222 deletions

View File

@ -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);

View File

@ -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;

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;

View File

@ -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)

View File

@ -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

View File

@ -151,7 +151,7 @@ public class CharInfo extends L2GameServerPacket
}
writeC(_activeChar.getPvpFlag());
writeD(_activeChar.getKarma());
writeD(_activeChar.getReputation());
writeD(_mAtkSpd);
writeD(_pAtkSpd);

View File

@ -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);

View File

@ -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"));

View File

@ -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);

View File

@ -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