public static void Handle_ExitGetCurrentCharSetting(ClientConnection Client, byte last) { Account User = Client.CurrentAccount; //Client.SendAsync(new GetCurrentAvatarInfo_0X6D(User, last)); LoginHandle.updateCurrentAvatarInfo(User); Client.SendAsync(new GetCurrentAvatarInfo(User, last)); Client.SendAsync(new MyroomExitGetCurrentCharSetting_0X1D0_15(User, last)); if (User.InGame) { NormalRoom room = Rooms.NormalRoomList.Find(rm => rm.ID == User.CurrentRoomId); foreach (Account RoomPlayer in room.Players) { RoomPlayer.Connection.SendAsync(new MyroomExitGetCurrentCharSetting_GameRoom(User, last)); } } UpdateUserLuck(User); }
public static void Handle_BuyItem(ClientConnection Client, PacketReader reader, byte last) { /*FF 69 01 B4 0F 00 00 01 00 00 00 27 BA 00 00 * 70 D8 E9 1E FF FF FF FF FF FF FF FF 01 00 00 * 00 00 01 00 00 4E 13 A8 00 FF FF FF FF 00 00 * 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 * 00 00 00 93 08 00 00 00 00 00 00 40*/ Account User = Client.CurrentAccount; int unk1 = reader.ReadLEInt32(); int unk2 = reader.ReadLEInt32(); int itemid = reader.ReadLEInt32(); int unk3 = reader.ReadLEInt32(); reader.ReadLEInt64(); //FF FF FF FF FF FF FF FF reader.ReadLEInt32(); //00 00 00 00 int unk4 = reader.ReadLEInt32(); reader.ReadLEInt64(); //FF FF FF FF FF FF FF FF reader.Offset += 0x14; int unk5 = reader.ReadLEInt32(); bool check = ItemHolder.ItemShopInfos.TryGetValue(itemid, out ItemShopInfo info); if (check && info.CanBuy) { bool BuyCheckDone = BuyItemCheck(User, itemid); LoginHandle.getUserCash(User); if (BuyCheckDone) { Client.SendAsync(new ShopBuyItem_ACK(User, itemid, unk3, unk4, unk5, last)); if (info.ItemPosition == 115 || info.ItemPosition == 116) { Client.SendAsync(new ShopBuyFreePassUpdate(User, last)); Client.SendAsync(new ShopBuyFreePassUpdate2(User, last)); } Client.SendAsync(new MyroomGetAllItem_0X67_64(User, last)); //Client.SendAsync(new MyroomGetAllItem(User, last)); } } else { Client.SendAsync(new ShopBuyItemFail(User, itemid, unk3, unk4, unk5, last)); } }
public static void Handle_SelectStartCharacter(ClientConnection Client, PacketReader reader, byte last) { try { Account User = Client.CurrentAccount; int charid = reader.ReadLEInt16(); //MakeStartCharacter(charid, last); Client.SendAsync(new FirstLoginMakeStartCharacter_67_0X64(User, charid, last)); //MakeStartCharacterOK(last); Client.SendAsync(new FirstLoginMakeStartCharacterOK_0X71(User, last)); //GetCurrentAvatarInfo(last); //Client.SendAsync(new GetCurrentAvatarInfo_0X6D(User, last)); LoginHandle.getCurrentAvatarInfo(User); Client.SendAsync(new GetCurrentAvatarInfo(User, last)); } catch (Exception e) { Console.WriteLine(e.Message); } }