Exemple #1
0
 public static void HandleGameContextCreateMessage(FakeClient client, GameContextCreateMessage message)
 {
     if (client.Id == 1)
     {
         client.Send(new NpcGenericActionRequestMessage(-1, 3, 83887104));
         Thread.Sleep(1000);
         client.Send(new NpcDialogReplyMessage(259));
     }
 }
Exemple #2
0
 public static void HandleCharactersListMessage(FakeClient client, CharactersListMessage message)
 {
     if (client.Id == 1)
     {
         client.Send(new CharacterSelectionMessage(message.characters.First(x => x.name == "Loom2").id));
     }
     if (client.Id == 2)
     {
         client.Send(new CharacterSelectionMessage(message.characters.First(x => x.name == "Loom").id));
     }
 }
Exemple #3
0
        public static void HandleHelloConnectMessage(FakeClient client, HelloConnectMessage message)
        {
            var writer = new BigEndianWriter();

            writer.WriteUTF(client.AccountName);
            writer.WriteUTF(client.AccountPassword);

            client.Send(new IdentificationMessage(false, false, false, new Version(2, 10, 0, 65664, 0, (sbyte)BuildTypeEnum.RELEASE).ToVersionExtended(0, 0), "fr",
                                                  writer.Data.Select(x => (sbyte)x), (short)WorldServer.ServerInformation.Id, 0, new short [0]));
        }
Exemple #4
0
        public static void HandleCharactersListMessage(FakeClient client, CharactersListMessage message)
        {
            if (!message.characters.Any())
            {
                var head = BreedManager.Instance.GetHead(x => x.Breed == (int)PlayableBreedEnum.Cra);

                /*client.Send(new CharacterCreationRequestMessage("FakeCharacter#" + client.Id, (sbyte)PlayableBreedEnum.Cra,
                 *  false, Enumerable.Repeat(-1, 5), head.Id));*/
            }
            else
            {
                client.Send(new CharacterSelectionMessage(message.characters.First().id));
            }
        }
Exemple #5
0
        private void ClientMessageInformation_OnMessageParsed(NetworkElementField obj, ProtocolJsonContent con)
        {
            ProxyManager.Instance[ProcessId].LAST_GLOBAL_INSTANCE_ID = ClientMessageInformation.Information.InstanceId;
            ProxyManager.Instance[ProcessId].SERVER_MESSAGE_RCV      = 0;
            uint instance_id = ClientMessageInformation.Information.InstanceId + ProxyManager.Instance[ProcessId].FAKE_MESSAGE_SENT;

            if (ConfigurationManager.Instance.Startup.show_message)
            {
                Console.WriteLine($"[Client({FakeClient.RemoteIP})] (n°{instance_id} | ({ClientMessageInformation.Information.InstanceId} + {ProxyManager.Instance[ProcessId].FAKE_MESSAGE_SENT})) {obj.name} ({obj.protocolID})");
                if (ConfigurationManager.Instance.Startup.show_message_content)
                {
                    Console.WriteLine($"{con}");
                }
            }

            FakeClient.Send(ClientMessageInformation.Information.ReWriteInstanceId(instance_id));
            HandlerManager.Instance.Handle((uint)obj.protocolID, this, con);
        }
Exemple #6
0
 public static void HandleCharacterSelectedSuccessMessage(FakeClient client, CharacterSelectedSuccessMessage message)
 {
     client.Send(new GameContextCreateRequestMessage());
     client.IsInGame = true;
 }
Exemple #7
0
 public static void HandleAuthenticationTicketAcceptedMessage(FakeClient client, AuthenticationTicketAcceptedMessage message)
 {
     client.Send(new CharactersListRequestMessage());
 }
Exemple #8
0
 public static void HandleHelloGameMessage(FakeClient client, HelloGameMessage message)
 {
     client.ConnectingToWorld = false;
     client.Send(new AuthenticationTicketMessage("fr", client.Ticket));
 }
Exemple #9
0
 public static void HandleServersListMessage(FakeClient client, ServersListMessage message)
 {
     client.ConnectingToWorld = true;
     client.Send(new ServerSelectionMessage((short)WorldServer.ServerInformation.Id));
 }
Exemple #10
0
 public static void HandleExchangeStartedMessage(FakeClient client, ExchangeStartedMessage message)
 {
     client.Send(new ExchangeObjectMoveKamaMessage(-20000));
 }
Exemple #11
0
 public void SendServer(dynamic value, ProtocolJsonContent content)
 {
     FakeClient.Send(ProcessId, value, content);
 }