CharInfo and UserInfo packet adjustments.
Thanks to nasseka.
This commit is contained in:
@@ -132,7 +132,7 @@ public class CharInfo implements IClientOutgoingPacket
|
||||
packet.writeH(_player.getRace().ordinal()); // Confirmed
|
||||
packet.writeC(_player.getAppearance().isFemale() ? 0x01 : 0x00); // Confirmed
|
||||
|
||||
packet.writeD(_player.isDeathKnight() ? 212 : _player.getBaseClass());
|
||||
packet.writeD(_player.getBaseTemplate().getClassId().getRootClassId().getId());
|
||||
|
||||
for (int slot : getPaperdollOrder())
|
||||
{
|
||||
@@ -282,12 +282,14 @@ public class CharInfo implements IClientOutgoingPacket
|
||||
}
|
||||
|
||||
// Rank.
|
||||
packet.writeD(RankManager.getInstance().getPlayerGlobalRank(_player) == 1 ? 1 : RankManager.getInstance().getPlayerRaceRank(_player) == 1 ? 2 : 0);
|
||||
packet.writeD(RankManager.getInstance().getPlayerGlobalRank(_player) == 1 ? 1 : RankManager.getInstance().getPlayerRaceRank(_player) == 1 ? 2 : RankManager.getInstance().getPlayerClassRank(_player) == 1 ? 4 : 0);
|
||||
|
||||
packet.writeD(0x00); // 272 - hNotoriety
|
||||
packet.writeD(0x00); // 286 - nMainClass
|
||||
packet.writeH(0x00);
|
||||
packet.writeC(0x00);
|
||||
packet.writeD(_player.getClassId().getId());
|
||||
packet.writeC(0x00);
|
||||
packet.writeD(_player.getVisualHairColor() + 1); // 338 - DK color.
|
||||
packet.writeD(0x00); // 338 - nWorldID
|
||||
packet.writeD(0x00);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@@ -21,7 +21,6 @@ import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.data.xml.ExperienceData;
|
||||
import org.l2jmobius.gameserver.enums.AttributeType;
|
||||
import org.l2jmobius.gameserver.enums.BonusExpType;
|
||||
import org.l2jmobius.gameserver.enums.ClassId;
|
||||
import org.l2jmobius.gameserver.enums.ItemGrade;
|
||||
import org.l2jmobius.gameserver.enums.UserInfoType;
|
||||
import org.l2jmobius.gameserver.instancemanager.CastleManager;
|
||||
@@ -158,13 +157,10 @@ public class UserInfo extends AbstractMaskPacket<UserInfoType>
|
||||
packet.writeC(_player.isGM() ? 0x01 : 0x00);
|
||||
packet.writeC(_player.getRace().ordinal());
|
||||
packet.writeC(_player.getAppearance().isFemale() ? 0x01 : 0x00);
|
||||
packet.writeD(ClassId.getClassId(_player.getBaseTemplate().getClassId().getId()).getRootClassId().getId());
|
||||
packet.writeD(_player.getBaseTemplate().getClassId().getRootClassId().getId());
|
||||
packet.writeD(_player.getClassId().getId());
|
||||
packet.writeC(_player.getLevel());
|
||||
packet.writeC(0x00); // 270
|
||||
packet.writeC(0x00); // 270
|
||||
packet.writeC(0x00); // 270
|
||||
packet.writeD(0x00); // 286
|
||||
packet.writeD(_player.getLevel()); // 270
|
||||
packet.writeD(_player.getClassId().getId()); // 286
|
||||
}
|
||||
|
||||
if (containsMask(UserInfoType.BASE_STATS))
|
||||
@@ -426,7 +422,7 @@ public class UserInfo extends AbstractMaskPacket<UserInfoType>
|
||||
if (containsMask(UserInfoType.RANKING)) // 196
|
||||
{
|
||||
packet.writeH(6);
|
||||
packet.writeD(RankManager.getInstance().getPlayerGlobalRank(_player) == 1 ? 1 : RankManager.getInstance().getPlayerRaceRank(_player) == 1 ? 2 : 0);
|
||||
packet.writeD(RankManager.getInstance().getPlayerGlobalRank(_player) == 1 ? 1 : RankManager.getInstance().getPlayerRaceRank(_player) == 1 ? 2 : RankManager.getInstance().getPlayerClassRank(_player) == 1 ? 4 : 0);
|
||||
}
|
||||
|
||||
if (containsMask(UserInfoType.STAT_POINTS)) // 235
|
||||
|
Reference in New Issue
Block a user