public static void SendCharacterList(int Index_) { PacketWriter writer = new PacketWriter(); writer.SetOpcode(SERVER_OPCODES.GAME_SERVER_CHARACTER); writer.AppendWord(0x0102); int UserIndex = DatabaseCore.User.GetIndexByName(Player.General[Index_].User); writer.AppendByte(DatabaseCore.User.CharacterCount[UserIndex]); for (int i = 0; i < DatabaseCore.User.CharacterCount[UserIndex]; i++) { int tmpCharacterIndex = DatabaseCore.Character.GetIndexByName(DatabaseCore.User.Characters[UserIndex].CharacterName[i]); int[] CharacterItemIndex = DatabaseCore.Item.GetIndexByName(DatabaseCore.User.Characters[UserIndex].CharacterName[i]); writer.AppendDword(DatabaseCore.Character.Model[tmpCharacterIndex]); writer.AppendWord((ushort)DatabaseCore.Character.CharacterName[tmpCharacterIndex].Length); writer.AppendString(false, DatabaseCore.Character.CharacterName[tmpCharacterIndex]); writer.AppendByte(DatabaseCore.Character.Volume[tmpCharacterIndex]); writer.AppendByte(DatabaseCore.Character.Level[tmpCharacterIndex]); writer.AppendLword(DatabaseCore.Character.Experience[tmpCharacterIndex]); writer.AppendWord(DatabaseCore.Character.Strength[tmpCharacterIndex]); writer.AppendWord(DatabaseCore.Character.Intelligence[tmpCharacterIndex]); writer.AppendWord(DatabaseCore.Character.Attributes[tmpCharacterIndex]); writer.AppendInt(DatabaseCore.Character.CHP[tmpCharacterIndex]); writer.AppendInt(DatabaseCore.Character.CMP[tmpCharacterIndex]); //writer.AppendDword(0x00); writer.AppendByte(0x00); writer.AppendByte(0x00); writer.AppendByte(0x00); writer.AppendByte(0x01); byte PlayerItemCount = 0; for (byte j = 0; j < 10; j++) { if (DatabaseCore.Item.ItemId[CharacterItemIndex[j]] != 0) PlayerItemCount++; } writer.AppendByte(PlayerItemCount); for (int j = 0; j < 10; j++) { if (DatabaseCore.Item.ItemId[CharacterItemIndex[j]] != 0) { writer.AppendDword(DatabaseCore.Item.ItemId[CharacterItemIndex[j]]); writer.AppendByte(DatabaseCore.Item.PlusValue[CharacterItemIndex[j]]); } } writer.AppendByte(0x00); writer.AppendByte(0x00); } ServerSocket.Send(writer.getWorkspace(), Index_); }