Beispiel #1
0
        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_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));
         User.CurrentAvatarInfo.AddRange(Enumerable.Repeat((ushort)0, 45));
         LoginHandle.updateCurrentAvatarInfo(User);
         //LoginHandle.getCurrentAvatarInfo(User);
         Client.SendAsync(new GetCurrentAvatarInfo(User, last));
     }
     catch (Exception e)
     {
         Console.WriteLine(e.Message);
     }
 }