Prechádzať zdrojové kódy

Updated packet information by Kerberos.

GodKratos 16 rokov pred
rodič
commit
4655151b4f

+ 3 - 0
L2_GameServer/java/net/sf/l2j/gameserver/network/clientpackets/RequestShortCutReg.java

@@ -32,6 +32,8 @@ public final class RequestShortCutReg extends L2GameClientPacket
 	private int _slot;
 	private int _page;
 	private int _unk;
+	@SuppressWarnings("unused")
+	private int _userShortCut;
 
 
 	@Override
@@ -41,6 +43,7 @@ public final class RequestShortCutReg extends L2GameClientPacket
 		int slot = readD();
 		_id = readD();
 		_unk = readD();
+		_userShortCut = readD();
 
 		_slot = slot % 12;
 		_page = slot / 12;

+ 9 - 7
L2_GameServer/java/net/sf/l2j/gameserver/network/serverpackets/CharSelected.java

@@ -43,8 +43,8 @@ public class CharSelected extends L2GameServerPacket
 		writeC(0x0b);
 
 		writeS(_activeChar.getName());
-		writeD(_activeChar.getCharId()); // ??
-		writeS(_activeChar.getTitle());
+		writeD(_activeChar.getCharId());
+		writeS("");
 		writeD(_sessionId);
 		writeD(_activeChar.getClanId());
 		writeD(0x00);  //??
@@ -62,7 +62,7 @@ public class CharSelected extends L2GameServerPacket
 		writeQ(_activeChar.getExp());
 		writeD(_activeChar.getLevel());
 		writeD(_activeChar.getKarma());	// thx evill33t
-		writeD(0x0);	//?
+		writeD(_activeChar.getPkKills());
 		writeD(_activeChar.getINT());
 		writeD(_activeChar.getSTR());
 		writeD(_activeChar.getCON());
@@ -75,12 +75,14 @@ public class CharSelected extends L2GameServerPacket
 
 		writeD(_activeChar.getClassId().getId());
 
-		writeD(0x00);
-		writeD(0x00);
-		writeD(0x00);
-		writeD(0x00); 
+		writeD(0x92DD59E4);
+		writeD(0x773CC9CF);
+		writeD(0x79DA6B02);
+		writeD(0x70DB0E7F); 
         
         writeB(new byte[64]);
+        
+        writeD(0x00);
 	}
 
 	/* (non-Javadoc)

+ 15 - 6
L2_GameServer/java/net/sf/l2j/gameserver/network/serverpackets/FriendList.java

@@ -50,22 +50,32 @@ public class FriendList extends L2GameServerPacket
     public FriendList(L2PcInstance character)
     {
         _activeChar = character;
-        this.getFriendList();
+        getFriendList();
     }
     
     private static class FriendStatus
     {
+    	private final int _charId;
         private final int _id;
         private final String _name;
         private final boolean _online;
         
-        public FriendStatus(int id, String name, boolean online)
+        public FriendStatus(int charId,int id, String name, boolean online)
         {
+        	_charId = charId;
             _id = id;
             _name = name;
             _online = online;
         }
         
+        /**
+         * @return Returns the Char id. (first created player in-game will have id 1 and so on)
+         */
+        public int getCharId()
+        {
+        	return _charId;
+        }
+        
         /**
          * @return Returns the id.
          */
@@ -117,7 +127,7 @@ public class FriendList extends L2GameServerPacket
                 
                 L2PcInstance friend = L2World.getInstance().getPlayer(friendName);
                 
-                fs = new FriendStatus(friendId, friendName, friend != null);
+                fs = new FriendStatus(0x00030b7a,friendId, friendName, friend != null);
                 _friends.add(fs);
             }
             
@@ -141,11 +151,10 @@ public class FriendList extends L2GameServerPacket
         writeD(_friends.size());
         for (FriendStatus fs : _friends)
         {
-            writeH(0); // ??
-            writeD(fs.getId());
+            writeD(fs.getCharId()); // character id
             writeS(fs.getName());
             writeD(fs.isOnline() ? 0x01 : 0x00); // online
-            writeH(0); // ??
+            writeD(fs.isOnline() ? fs.getId() : 0x00); // object id if online
         }
     }
     

+ 3 - 3
L2_GameServer/java/net/sf/l2j/gameserver/network/serverpackets/MagicSkillUse.java

@@ -80,9 +80,9 @@ public final class MagicSkillUse extends L2GameServerPacket
 		writeH(0x00);
 		//for()
 		//{
-			writeH(0x00);
-			writeH(0x00);
-			writeH(0x00);
+		//	writeH(0x00);
+		//	writeH(0x00);
+		//	writeH(0x00);
 		//}
 	}