More reputation related changes.
This commit is contained in:
parent
ef15efb834
commit
1c13685dbb
@ -50,10 +50,6 @@ public class PcAppearance
|
|||||||
/** The default title color is 0xECF9A2. */
|
/** The default title color is 0xECF9A2. */
|
||||||
private int _titleColor = DEFAULT_TITLE_COLOR;
|
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)
|
public PcAppearance(byte face, byte hColor, byte hStyle, boolean sex)
|
||||||
{
|
{
|
||||||
_face = face;
|
_face = face;
|
||||||
@ -177,14 +173,6 @@ public class PcAppearance
|
|||||||
|
|
||||||
public int getNameColor()
|
public int getNameColor()
|
||||||
{
|
{
|
||||||
if (_owner.getKarma() > 0)
|
|
||||||
{
|
|
||||||
return _redColor;
|
|
||||||
}
|
|
||||||
if (_owner.getReputation() > 0)
|
|
||||||
{
|
|
||||||
return _greenColor;
|
|
||||||
}
|
|
||||||
return _nameColor;
|
return _nameColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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
|
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.getLevel());
|
||||||
|
|
||||||
writeD(charInfoPackage.getKarma() > 0 ? 0 /* 255? */: charInfoPackage.getReputation());
|
writeD(charInfoPackage.getKarma() > 0 ? charInfoPackage.getKarma() * -1 : charInfoPackage.getReputation());
|
||||||
writeD(charInfoPackage.getPkKills());
|
writeD(charInfoPackage.getPkKills());
|
||||||
writeD(charInfoPackage.getPvPKills());
|
writeD(charInfoPackage.getPvPKills());
|
||||||
|
|
||||||
|
@ -68,7 +68,7 @@ public final class RelationChanged extends L2GameServerPacket
|
|||||||
_singled._objId = activeChar.getObjectId();
|
_singled._objId = activeChar.getObjectId();
|
||||||
_singled._relation = relation;
|
_singled._relation = relation;
|
||||||
_singled._autoAttackable = autoattackable ? 1 : 0;
|
_singled._autoAttackable = autoattackable ? 1 : 0;
|
||||||
_singled._reputation = activeChar.getReputation();
|
_singled._reputation = activeChar.getKarma() > 0 ? activeChar.getKarma() * -1 : activeChar.getReputation();
|
||||||
_singled._pvpFlag = activeChar.getPvpFlag();
|
_singled._pvpFlag = activeChar.getPvpFlag();
|
||||||
setInvisible(activeChar.isInvisible());
|
setInvisible(activeChar.isInvisible());
|
||||||
}
|
}
|
||||||
@ -91,7 +91,7 @@ public final class RelationChanged extends L2GameServerPacket
|
|||||||
r._objId = activeChar.getObjectId();
|
r._objId = activeChar.getObjectId();
|
||||||
r._relation = relation;
|
r._relation = relation;
|
||||||
r._autoAttackable = autoattackable ? 1 : 0;
|
r._autoAttackable = autoattackable ? 1 : 0;
|
||||||
r._reputation = activeChar.getReputation();
|
r._reputation = activeChar.getKarma() > 0 ? activeChar.getKarma() * -1 : activeChar.getReputation();
|
||||||
r._pvpFlag = activeChar.getPvpFlag();
|
r._pvpFlag = activeChar.getPvpFlag();
|
||||||
_multi.add(r);
|
_multi.add(r);
|
||||||
}
|
}
|
||||||
|
@ -300,7 +300,7 @@ public class UserInfo extends AbstractMaskPacket<UserInfoType>
|
|||||||
{
|
{
|
||||||
writeH(22);
|
writeH(22);
|
||||||
writeC(_activeChar.getPvpFlag());
|
writeC(_activeChar.getPvpFlag());
|
||||||
writeD(_activeChar.getReputation());
|
writeD(_activeChar.getKarma() > 0 ? _activeChar.getKarma() * -1 : _activeChar.getReputation());
|
||||||
writeC(_activeChar.isNoble() ? 0x01 : 0x00);
|
writeC(_activeChar.isNoble() ? 0x01 : 0x00);
|
||||||
writeC(_activeChar.isHero() ? 0x01 : 0x00);
|
writeC(_activeChar.isHero() ? 0x01 : 0x00);
|
||||||
writeC(_activeChar.getPledgeClass());
|
writeC(_activeChar.getPledgeClass());
|
||||||
|
Loading…
Reference in New Issue
Block a user