public static void KRoomInfo(Session right, PacketRead rs) { libcomservice.REQUEST.Room room = new libcomservice.REQUEST.Room(); ushort m_usRoomID = rs.UShort(); room.m_strRoomName = rs.UnicodeString(); room.m_bPublic = rs.Bool(); room.m_bGuild = rs.Bool(); room.m_strRoomPasswd = rs.UnicodeString(); short m_usUsers = rs.Short(); room.m_usMaxUsers = rs.Get_Short(); room.m_bPlaying = rs.Bool(); room.m_cGrade = rs.Byte(); room.m_cGameCategory = rs.Byte(); room.m_iGameMode = rs.Int(); room.m_iSubGameMode = rs.Int(); room.m_bRandomableMap = rs.Bool(); room.m_iMapID = rs.Int(); room.m_iP2PVersion = rs.Int(); byte[] m_abSlotOpen = rs.Buffer_Array_Bytes(6); room.m_vecMonsterSlot = rs.Int(); room.m_cDifficulty = rs.Int(); rs.Jump(17); ushort index_room = 0; for (ushort i = 1; i < GameServer.m_usMaxUsers; i++) { if (GameServer.List_Rooms.ContainsKey(i)) { continue; } index_room = i; break; } room.m_usRoomID = index_room; room.m_dwSlots[0].Active = true; room.m_dwSlots[0].usr = right; room.m_dwSlots[0].Leader = true; room.m_dwSlots[0].Open = false; room.m_dwSlots[0].Status = 0; room.m_dwSlots[0].AFK = false; room.m_dwSlots[0].Team = 0; for (int i = 1; i < room.m_usMaxUsers; i++) { room.m_dwSlots[i].Active = false; room.m_dwSlots[i].usr = null; room.m_dwSlots[i].Leader = false; room.m_dwSlots[i].Open = true; room.m_dwSlots[i].Status = 0; room.m_dwSlots[i].AFK = false; room.m_dwSlots[i].Team = 0; } right.PInfo.CurRoom = room; }
public void DepotInfo(Session p, PacketRead r) { r.Jump(5); p.PInfo.m_ucCharType = r.Byte(); //Log.Write("Depot, CharType:{0}", p.PInfo.m_ucCharType); PacketWrite pw = new PacketWrite(); pw.Int(5); pw.Byte(0); pw.Byte(p.PInfo.m_ucCharType); pw.HexArray("01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00"); p.SendPacket(pw, 1342); }
public static void KUserInfo(Session right, PacketRead rs) { string m_strLogin = rs.String(); int m_dwID = rs.Int(); string m_strNickName = rs.String(); rs.Int(); byte m_cStatus = rs.Byte(); rs.Jump(22); int m_iGamePoint = rs.Int(); rs.Short(); right.PInfo.m_ucCharType = m_cStatus; }
public void ChangeCharInChannel(Session right, PacketRead r) { try { ChangeJob(right); WorldBossContrib(right); CharacterUserInfo(right); CharsEquipsInfo(right); r.Jump(1); byte newCharacter = r.Byte(); int m_dwCharPosition = right.PCharacters.PositionCharacter(newCharacter, right); right.PInfo.m_ucCharType = newCharacter; PacketWrite ks = new PacketWrite(); ks.Int(0); ks.Int(0); ks.Byte(newCharacter); ks.HexArray("00 00 00 00 00 00 00 00 00 00 00 8C 00 00 78 6E 00 00 00 01 00 00 00 00 00 00 00 00 00 00 78 78 00 00 00 01 00 00 00 00 00 00 00 00 00 00 78 82 00 00 00 01 00 00 00 00 00 00 00 00 00 00 78 8C 00 00 00 01 00 00 00 00 00 00 00 00 00 00 78 96 00 00 00 01 00 00 00 00 00 00 00 00 00 00 78 A0 00 00 00 01 00 00 00 00 00 00 00 00 00 00 78 AA 00 00 00 01 00 00 00 00 00 00 00 00 00 00 78 B4 00 00 00 01 00 00 00 00 00 00 00 00 00 00 78 BE 00 00 00 01 00 00 00 00 00 00 00 00 00 00 78 C8 00 00 00 01 00 00 00 00 00 00 00 00 00 00 78 D2 00 00 00 01 00 00 00 00 00 00 00 00 00 00 78 DC 00 00 00 01 00 00 00 00 00 00 00 00 00 00 78 E6 00 00 00 01 00 00 00 00 00 00 00 00 00 00 78 F0 00 00 00 01 00 00 00 00 00 00 00 00 00 00 78 FA 00 00 00 01 00 00 00 00 00 00 00 00 00 00 79 04 00 00 00 01 00 00 00 00 00 00 00 00 00 00 79 0E 00 00 00 01 00 00 00 00 00 00 00 00 00 00 79 18 00 00 00 01 00 00 00 00 00 00 00 00 00 00 79 22 00 00 00 01 00 00 00 00 00 00 00 00 00 00 79 2C 00 00 00 01 00 00 00 00 00 00 00 00 00 00 79 36 00 00 00 01 00 00 00 00 00 00 00 00 00 00 79 40 00 00 00 01 00 00 00 00 00 00 00 00 00 00 79 4A 00 00 00 01 00 00 00 00 00 00 00 00 00 00 85 C0 00 00 00 01 00 00 00 00 00 00 00 00 00 00 85 CA 00 00 00 01 00 00 00 00 00 00 00 00 00 00 85 D4 00 00 00 01 00 00 00 00 00 00 00 00 00 00 85 DE 00 00 00 01 00 00 00 00 00 00 00 00 00 00 85 E8 00 00 00 01 00 00 00 00 00 00 00 00 00 00 85 F2 00 00 00 01 00 00 00 00 00 00 00 00 00 00 85 FC 00 00 00 01 00 00 00 00 00 00 00 00 00 00 86 06 00 00 00 01 00 00 00 00 00 00 00 00 00 00 86 10 00 00 00 01 00 00 00 00 00 00 00 00 00 00 86 1A 00 00 00 01 00 00 00 00 00 00 00 00 00 00 86 24 00 00 00 01 00 00 00 00 00 00 00 00 00 00 86 2E 00 00 00 01 00 00 00 00 00 00 00 00 00 00 86 38 00 00 00 01 00 00 00 00 00 00 00 00 00 00 86 42 00 00 00 01 00 00 00 00 00 00 00 00 00 00 86 4C 00 00 00 01 00 00 00 00 00 00 00 00 00 01 45 8C 00 00 00 01 00 00 00 00 00 00 00 00 00 01 45 96 00 00 00 01 00 00 00 00 00 00 00 00 00 01 45 A0 00 00 00 01 00 00 00 00 00 00 00 00 00 01 45 AA 00 00 00 01 00 00 00 00 00 00 00 00 00 01 45 B4 00 00 00 01 00 00 00 00 00 00 00 00 00 01 45 BE 00 00 00 01 00 00 00 00 00 00 00 00 00 01 45 C8 00 00 00 01 00 00 00 00 00 00 00 00 00 01 45 D2 00 00 00 01 00 00 00 00 00 00 00 00 00 01 45 DC 00 00 00 01 00 00 00 00 00 00 00 00 00 01 45 E6 00 00 00 01 00 00 00 00 00 00 00 00 00 01 45 F0 00 00 00 01 00 00 00 00 00 00 00 00 00 01 45 FA 00 00 00 01 00 00 00 00 00 00 00 00 00 01 46 04 00 00 00 01 00 00 00 00 00 00 00 00 00 01 46 0E 00 00 00 01 00 00 00 00 00 00 00 00 00 01 46 18 00 00 00 01 00 00 00 00 00 00 00 00 00 01 46 22 00 00 00 01 00 00 00 00 00 00 00 00 00 01 46 2C 00 00 00 01 00 00 00 00 00 00 00 00 00 01 46 36 00 00 00 01 00 00 00 00 00 00 00 00 00 01 46 40 00 00 00 01 00 00 00 00 00 00 00 00 00 01 46 4A 00 00 00 01 00 00 00 00 00 00 00 00 00 01 9B 18 00 00 00 01 00 00 00 00 00 00 00 00 00 01 FF 40 00 00 00 01 00 00 00 00 00 00 00 00 00 01 FF 4A 00 00 00 01 00 00 00 00 00 00 00 00 00 02 1E 9E 00 00 00 01 00 00 00 00 00 00 00 00 00 02 29 A2 00 00 00 01 00 00 00 00 00 00 00 00 00 02 41 08 00 00 00 01 00 00 00 00 00 00 00 00 00 02 CA 56 00 00 00 01 00 00 00 00 00 00 00 00 00 02 CA 60 00 00 00 01 00 00 00 00 00 00 00 00 00 02 CA 6A 00 00 00 01 00 00 00 00 00 00 00 00 00 02 CA 74 00 00 00 01 00 00 00 00 00 00 00 00 00 02 D1 2C 00 00 00 01 00 00 00 00 00 00 00 00 00 02 D1 36 00 00 00 01 00 00 00 00 00 00 00 00 00 02 D1 40 00 00 00 01 00 00 00 00 00 00 00 00 00 02 D1 4A 00 00 00 01 00 00 00 00 00 00 00 00 00 02 E0 54 00 00 00 01 00 00 00 00 00 00 00 00 00 02 E0 5E 00 00 00 01 00 00 00 00 00 00 00 00 00 02 E0 68 00 00 00 01 00 00 00 00 00 00 00 00 00 02 E0 72 00 00 00 01 00 00 00 00 00 00 00 00 00 02 E0 7C 00 00 00 01 00 00 00 00 00 00 00 00 00 02 E0 86 00 00 00 01 00 00 00 00 00 00 00 00 00 03 4A 76 00 00 00 01 00 00 00 00 00 00 00 00 00 03 4A 80 00 00 00 01 00 00 00 00 00 00 00 00 00 03 4A 8A 00 00 00 01 00 00 00 00 00 00 00 00 00 03 4A 94 00 00 00 01 00 00 00 00 00 00 00 00 00 04 89 86 00 00 00 01 00 00 00 00 00 00 00 00 00 04 89 90 00 00 00 01 00 00 00 00 00 00 00 00 00 05 0F 6E 00 00 00 01 00 00 00 00 00 00 00 00 00 05 0F 78 00 00 00 01 00 00 00 00 00 00 00 00 00 05 9A 42 00 00 00 01 00 00 00 00 00 00 00 00 00 06 E2 3A 00 00 00 01 00 00 00 00 00 00 00 00 00 08 33 1A 00 00 00 01 00 00 00 00 00 00 00 00 00 08 33 24 00 00 00 01 00 00 00 00 00 00 00 00 00 09 54 66 00 00 00 01 00 00 00 00 00 00 00 00 00 09 54 70 00 00 00 01 00 00 00 00 00 00 00 00 00 09 54 7A 00 00 00 01 00 00 00 00 00 00 00 00 00 09 54 84 00 00 00 01 00 00 00 00 00 00 00 00 00 09 54 8E 00 00 00 01 00 00 00 00 00 00 00 00 00 0A 1E 28 00 00 00 01 00 00 00 00 00 00 00 00 00 0A 1E 32 00 00 00 01 00 00 00 00 00 00 00 00 00 0C 55 08 00 00 00 01 00 00 00 00 00 00 00 00 00 0C 55 12 00 00 00 01 00 00 00 00 00 00 00 00 00 0D 72 94 00 00 00 01 00 00 00 00 00 00 00 00 00 0D 72 9E 00 00 00 01 00 00 00 00 00 00 00 00 00 0E E9 E4 00 00 00 01 00 00 00 00 00 00 00 00 00 0E E9 EE 00 00 00 01 00 00 00 00 00 00 00 00 00 0E E9 F8 00 00 00 01 00 00 00 00 00 00 00 00 00 0E EA 02 00 00 00 01 00 00 00 00 00 00 00 00 00 0E EA 0C 00 00 00 01 00 00 00 00 00 00 00 00 00 0E EA 16 00 00 00 01 00 00 00 00 00 00 00 00 00 0F 85 98 00 00 00 01 00 00 00 00 00 00 00 00 00 0F 85 A2 00 00 00 01 00 00 00 00 00 00 00 00 00 10 49 60 00 00 00 01 00 00 00 00 00 00 00 00 00 10 49 6A 00 00 00 01 00 00 00 00 00 00 00 00 00 10 6A 3A 00 00 00 01 00 00 00 00 00 00 00 00 00 10 6A 44 00 00 00 01 00 00 00 00 00 00 00 00 00 10 A5 18 00 00 00 01 00 00 00 00 00 00 00 00 00 10 A5 22 00 00 00 01 00 00 00 00 00 00 00 00 00 10 E6 E0 00 00 00 01 00 00 00 00 00 00 00 00 00 10 E6 EA 00 00 00 01 00 00 00 00 00 00 00 00 00 12 6A A6 00 00 00 01 00 00 00 00 00 00 00 00 00 12 6A B0 00 00 00 01 00 00 00 00 00 00 00 00 00 12 6A BA 00 00 00 01 00 00 00 00 00 00 00 00 00 12 6A C4 00 00 00 01 00 00 00 00 00 00 00 00 00 12 6A CE 00 00 00 01 00 00 00 00 00 00 00 00 00 12 6A D8 00 00 00 01 00 00 00 00 00 00 00 00 00 12 9F 26 00 00 00 01 00 00 00 00 00 00 00 00 00 12 9F 30 00 00 00 01 00 00 00 00 00 00 00 00 00 12 9F 3A 00 00 00 01 00 00 00 00 00 00 00 00 00 12 9F 44 00 00 00 01 00 00 00 00 00 00 00 00 00 12 9F 4E 00 00 00 01 00 00 00 00 00 00 00 00 00 13 8C 24 00 00 00 01 00 00 00 00 00 00 00 00 00 13 8C 2E 00 00 00 01 00 00 00 00 00 00 00 00 00 13 8C 38 00 00 00 01 00 00 00 00 00 00 00 00 00 13 8C 42 00 00 00 01 00 00 00 00 00 00 00 00 00 13 8C 4C 00 00 00 01 00 00 00 00 00 00 00 00 00 13 8C 56 00 00 00 01 00 00 00 00 00 00 00 00 00 13 8C 60 00 00 00 01 00 00 00 00 00 00 00 00 00 13 8C 6A 00 00 00 01 00 00 00 00 00 00 00 00 00 13 8C 74 00 00 00 01 00 00 00 00 00 00 00 00 00 13 8C 7E 00 00 00 01 00 00 00 00 00 00 00 00 00 13 8C 88 00 00 00 01 00 00 00 00 00 00 00 00 00 13 8C 92 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 02 00 14 DC DC 00 00 00 01 3B 9C 50 A1 00"); ks.Int(500);//talvez rank ks.HexArray("35 8E F2 5A 34 3D 72 00 00 00 00 00 14 DC E6 00 00 00 01 3B 9C 50 A2 00 00 00 00 5A 35 8E F2 5A 34 3D 72 00 00 00 00"); Serializables.SerializeStages(right, ks); ks.Byte(0); ks.Int(right.PCharacters.CharInfo[m_dwCharPosition].Equipements.Count); for (int x = 0; x < right.PCharacters.CharInfo[m_dwCharPosition].Equipements.Count; x += 1) { ks.Int(right.PCharacters.CharInfo[m_dwCharPosition].Equipements[x].ItemID); ks.Int(0); ks.Int(right.PCharacters.CharInfo[m_dwCharPosition].Equipements[x].ItemUID); ks.HexArray("00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00"); } ks.HexArray("00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00"); ks.Int(right.PInfo.m_dwInvetoryInfo); ks.HexArray("00 00 00 64 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF 00 00 00 00 00 00 00 00 00 00 40 47 1C"); right.SendPacket(ks, 1621); CharsEquipsInfo(right); } catch (Exception ex) { Log.Write("\n===========:Error:===========\n{0}\n{1}\n=============================n", ex.Message, ex.StackTrace); } }
public void EnterRoom(Session p, PacketRead r) { try { r.Jump(4); ushort roomID = (ushort)r.Get_Short(); string Password = r.UnicodeString(); r.Jump(5); string userLogin = r.UnicodeString(); r.Jump(4); string userNick = r.UnicodeString(); r.Jump(4); p.PInfo.m_ucCharType = r.Byte(); Room room = RoomExists(roomID); if (room == null) { PacketWrite pw2 = new PacketWrite(); pw2.Int(1); p.SendPacket(pw2, 54); return; } else if (room.m_abTotalSlotsOpen() == 0) { PacketWrite pw2 = new PacketWrite(); pw2.Int(1); p.SendPacket(pw2, 54); return; } else if (room.m_bPlaying == true) { PacketWrite pw2 = new PacketWrite(); pw2.Int(1); p.SendPacket(pw2, 54); return; } else if (room.m_strRoomPasswd != Password) { PacketWrite pw2 = new PacketWrite(); pw2.Int(1); p.SendPacket(pw2, 54); return; } int pos = 0; if (room.m_cGameCategory == 2) { pos = room.m_abSlotOpen(); } else { byte Team1 = 0, Team2 = 0; int EmptyPos1 = -1, EmptyPos2 = -1; for (int i = 0; i < 3; i++) { if (room.m_dwSlots[i].Active == true) { Team1++; } if (EmptyPos1 == -1 && room.m_dwSlots[i].Open == true) { EmptyPos1 = i; } } for (int i = 3; i < 6; i++) { if (room.m_dwSlots[i].Active == true) { Team2++; } if (EmptyPos2 == -1 && room.m_dwSlots[i].Open == true) { EmptyPos2 = i; } } pos = EmptyPos1; if (Team1 >= Team2) { pos = EmptyPos2; } } room.m_dwSlots[pos].Active = true; room.m_dwSlots[pos].usr = p; room.m_dwSlots[pos].Open = false; room.m_dwSlots[pos].AFK = false; room.m_dwSlots[pos].Deaths = 0; room.m_dwSlots[pos].Kills = 0; room.m_dwSlots[pos].Win = 0; room.m_dwSlots[pos].PositionSlot = pos; room.m_dwSlots[pos].Leader = false; p.PInfo.CurRoom = room; p.PInfo.m_cStatus = "ROOM"; GameServer.UsersList.Remove(p); PacketWrite pw = new PacketWrite(); pw.UnicodeStr(p.PInfo.m_strLogin); pw.Int(p.PInfo.m_dwUserUID); pw.UnicodeStr(p.PInfo.m_strNickName); pw.Int(pos); pw.Byte(p.PInfo.m_ucCharType); pw.Int(0); pw.HexArray("00 FF 00 FF 00 FF 00 00 00 00"); pw.Byte((byte)(pos / 3)); pw.HexArray("01 00 00 00 64 00 00"); pw.Int(p.PInfo.m_iGamePoint); pw.Short(0); Serializables.SerializeStages(p, pw); if (room.m_sSearchLeader() == p) { pw.Bool(true); } else { pw.Bool(false); } pw.HexArray("01 00 00 00 00 00 00 00 00 00 00 00 00"); Serializables.m_roomCharacterInfo(p, pw); pw.HexArray("00 00 00 02 76 19 A8 C0 10 0C D6 BA 00 00 00 01 7F 39 00 00 00 00 00 00 00 00 00 00 00"); pw.Byte(room.m_dwSlots[pos].Status); pw.HexArray("00 00 00 00 00 12 C8 F2 00 00 00 00 00 D6 D9 BE 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 04 42 00 52 00 0B 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 01 00 00 00 01 00 00 00 00 00 00 00 D2 F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 D2 F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 01 00 00 00 00 00 06 11 16 00 00 00 00 00 00 00 00 46 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 97 D8 00 00 01 A0 04 7B 00 00 00 00 00 00 00 00"); room.SendForAllPlayersInRoom(pw, 54); RoomInfo(p, room); RoomInfoDivide(p, room); } catch (Exception ex) { Log.Write("{0}", ex.StackTrace); PacketWrite pw = new PacketWrite(); pw.Int(1); p.SendPacket(pw, 54); p.PInfo.CurRoom = null; p.PInfo.m_cStatus = "LOBBY"; GameServer.UsersList.Add(p); } }
public void ListRooms(Session p, PacketRead r) { try { byte RoomType = r.Byte(); byte RoomMode = r.Byte(); int RoomsCount = 0; foreach (ushort i in GameServer.List_Rooms.Keys) { if (p.PInfo.m_dwChannelUID == 6) { if (RoomMode != GameServer.List_Rooms[i].m_iGameMode) { continue; } } else { if (GameServer.List_Rooms[i].m_cGameCategory != 0) { continue; } } if (RoomType == 1) { if (GameServer.List_Rooms[i].m_bPlaying == true || GameServer.List_Rooms[i].m_abTotalSlotsOpen() == 0) { continue; } } RoomsCount += 1; } PacketWrite pw = new PacketWrite(); pw.Int(RoomsCount); foreach (ushort RoomPosition in GameServer.List_Rooms.Keys) { if (p.PInfo.m_dwChannelUID == 6) { if (RoomMode != GameServer.List_Rooms[RoomPosition].m_iGameMode) { continue; } } else { if (GameServer.List_Rooms[RoomPosition].m_cGameCategory != 0) { continue; } } if (RoomType == 1) { if (GameServer.List_Rooms[RoomPosition].m_bPlaying == true || GameServer.List_Rooms[RoomPosition].m_abTotalSlotsOpen() == 0) { continue; } } pw.UShort(GameServer.List_Rooms[RoomPosition].m_usRoomID); pw.UnicodeStr(GameServer.List_Rooms[RoomPosition].m_strRoomName); if (GameServer.List_Rooms[RoomPosition].m_strRoomPasswd.Length > 0) { pw.Bool(false); } else { pw.Bool(true); } pw.Byte(0); pw.UnicodeStr(GameServer.List_Rooms[RoomPosition].m_strRoomPasswd); pw.Short((short)(GameServer.List_Rooms[RoomPosition].m_abTotalSlotsOpen() + 1)); pw.Short(GameServer.List_Rooms[RoomPosition].m_usUsers()); pw.Bool(GameServer.List_Rooms[RoomPosition].m_bPlaying); pw.HexArray("6F 0C CC FA 0B 08 00 00 00 20 63 00 00 F5 00 00 00 03 00 00 00 00"); pw.Short(0); pw.Short(GameServer.List_Rooms[RoomPosition].m_usUsers()); for (int x = 0; x < GameServer.List_Rooms[RoomPosition].m_usMaxUsers; x++) { if (GameServer.List_Rooms[RoomPosition].m_dwSlots[x].Active) { pw.UnicodeStr(GameServer.List_Rooms[RoomPosition].m_dwSlots[x].usr.PInfo.m_strNickName); pw.Byte(11); } } pw.HexArray("00 00 00 00 01 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 04 42 00 52 00 00 00 00 00 07 00 00 00 00 FF FF FF FF"); } p.SendPacket(PacketCompress.HalfCompress(pw.Get_Packet()), 49); } catch { PacketWrite pw = new PacketWrite(); pw.Int(0); p.SendPacket(PacketCompress.HalfCompress(pw.Get_Packet()), 49); } }
public static void KEquipItemInfo(Session right, PacketRead rs, int m_vecCharInfo) { for (int i = 0; i < m_vecCharInfo; i += 1) { byte m_cCharIndex = rs.Byte(); int m_vecEquipInfo = rs.Int(); int m_dwCharPosition = right.PCharacters.PositionCharacter(m_cCharIndex, right); for (int x = 0; x < m_vecEquipInfo; x += 1) { int m_dwID = rs.Int(); int m_dwUnk = rs.Int(); int m_dwUID = rs.Int(); byte m_cUpgrade = rs.Byte(); byte m_cGrade = rs.Byte(); int m_dwLevel = rs.Int(); byte[] test = rs.Buffer_Array_Bytes(9); int m_dwAtrribs = rs.Int(); for (int x2 = 0; x2 < m_dwAtrribs; x2++) { rs.Jump(7); } right.PCharacters.AddEquipment(m_dwID, m_dwUID, m_dwCharPosition, right); //Log.Write("Character:{0} Equips: {1} Current Item:{2} Atribbs:{3}", m_cCharIndex, m_vecEquipInfo, m_dwID, m_dwAtrribs); } int m_vecDelInfo = rs.Int(); for (int x = 0; x < m_vecDelInfo; x += 1) { int m_dwID = rs.Int(); int m_dwUnk = rs.Int(); int m_dwUID = rs.Int(); byte m_cUpgrade = rs.Byte(); byte m_cGrade = rs.Byte(); int m_dwLevel = rs.Int(); byte[] test = rs.Buffer_Array_Bytes(9); int m_dwAtrribs = rs.Int(); for (int x2 = 0; x2 < m_dwAtrribs; x2++) { rs.Jump(7); } right.PCharacters.RemoveEquipment(m_dwID, m_dwCharPosition, right); } int m_dwPetIsNew = rs.Int(); int m_dwPetUID = rs.Int(); int m_dwPetID = rs.Int(); string m_strPetName = rs.String(); int m_mapInitExp = rs.Int(); for (int x = 0; x < m_mapInitExp; x++) { rs.Byte(); rs.Int(); } uint m_dwExp = rs.UInt(); int m_iLevel = rs.Int(); byte m_cPromotion = rs.Byte(); int m_nHatchingID = rs.Int(); int m_iInitSatiation = rs.Int(); int m_iSatiation = rs.Int(); uint m_vecEquipItem = rs.UInt(); right.PCharacters.CharInfo[m_dwCharPosition].Pets[0].Slot1.Clear(); for (uint x = 0; x < m_vecEquipItem; x++) { uint m_dwPetAtkId = rs.UInt(); rs.Jump(4); uint m_dwPetAtkUID = rs.UInt(); rs.Byte(); right.PCharacters.AddAtkPetSlot1((int)m_dwPetAtkId, m_dwPetAtkUID, m_dwCharPosition, right); } uint m_vecEquipItem2 = rs.UInt(); right.PCharacters.CharInfo[m_dwCharPosition].Pets[0].Slot2.Clear(); for (uint x = 0; x < m_vecEquipItem2; x++) { uint m_dwPetAtkId = rs.UInt(); rs.Jump(4); uint m_dwPetAtkUID = rs.UInt(); rs.Byte(); right.PCharacters.AddAtkPetSlot2((int)m_dwPetAtkId, m_dwPetAtkUID, m_dwCharPosition, right); } byte[] restantPet = rs.Buffer_Array_Bytes(14); right.PCharacters.CharInfo[m_dwCharPosition].Pets[0].m_dwUID = m_dwPetUID; right.PCharacters.CharInfo[m_dwCharPosition].Pets[0].m_dwID = m_dwPetID; right.PCharacters.CharInfo[m_dwCharPosition].Pets[0].m_strName = m_strPetName; right.PCharacters.CharInfo[m_dwCharPosition].Pets[0].m_cPromotion = m_cPromotion; right.PCharacters.CharInfo[m_dwCharPosition].Pets[0].m_dwEXP = m_dwExp; right.PCharacters.CharInfo[m_dwCharPosition].Pets[0].m_iInitSatiation = m_iInitSatiation; right.PCharacters.CharInfo[m_dwCharPosition].Pets[0].m_iLevel = m_iLevel; right.PCharacters.CharInfo[m_dwCharPosition].Pets[0].m_iSatiation = m_iSatiation; right.PCharacters.CharInfo[m_dwCharPosition].Pets[0].m_mapInitExp = m_mapInitExp; right.PCharacters.CharInfo[m_dwCharPosition].Pets[0].m_nHatchingID = m_nHatchingID; //Log.Write("Character:{0} PetID: {1} PetName:{2} Equips:{3}", m_cCharIndex, m_dwPetID, m_strPetName, m_vecEquipItem); rs.Jump(41); } }