Swift Emulador Navigator Category Rooms serialize problem.

Results 1 to 6 of 6
  1. #1
    Unspoiled Perfection AKllX is offline
    MemberRank
    Aug 2007 Join Date
    @ akllxprojectLocation
    366Posts

    cool Swift Emulador Navigator Category Rooms serialize problem.

    It's for sure a wrong packet structure.

    Following, my current structure ( Outgoing.NavigatorPacket = 1019 )

    Spoiler:
    Code:
     private ServerMessage SerializeActiveRooms(int category)        {
                ServerMessage reply = new ServerMessage(Outgoing.NavigatorPacket);
                reply.AppendInt32(1);
                reply.AppendString(category.ToString());
                try
                {
                    KeyValuePair<RoomData, int>[] activeRooms = ButterflyEnvironment.GetGame().GetRoomManager().GetActiveRooms();
                    this.SerializeNavigatorPopularRooms(ref reply, activeRooms, category);
                    Array.Clear(activeRooms, 0, activeRooms.Length);
                    activeRooms = null;
                }
                catch
                {
                    reply.AppendInt32(0);
                }
                reply.AppendInt32(0);
                return reply;
            }
    
    
           private void SerializeNavigatorPopularRooms(ref ServerMessage reply, KeyValuePair<RoomData, int>[] rooms, int Category)
            {
                reply.AppendInt32(rooms.Length);
                int num = 0;
                foreach (KeyValuePair<RoomData, int> pair in rooms)
                {
                    RoomData key = pair.Key;
                    if (key.Category.Equals(Category))
                    {
                        key.Serialize(reply, false);
                        num++;
                    }
                }
            }
    
    
    internal void Serialize(ServerMessage Message, bool ShowEvents)
            {
                Message.AppendInt32(this.Id);
                if ((this.Event == null) || !ShowEvents)
                {
                    Message.AppendString(this.Name);
                    Message.AppendBoolean(true);
                    Message.AppendInt32(this.OwnerId);
                    Message.AppendString(this.Owner);
                    Message.AppendInt32(this.State);
                    Message.AppendInt32(this.UsersNow);
                    Message.AppendInt32(this.UsersMax);
                    Message.AppendString(this.Description);
                    Message.AppendInt32((this.Category == 0x34) ? 2 : 0);
                    Message.AppendInt32(0);
                    Message.AppendInt32(this.Score);
                    Message.AppendInt32(0);
                    Message.AppendInt32(this.Category);
                    if (this.GroupId == 0)
                    {
                        Message.AppendInt32(0);
                        Message.AppendInt32(0);
                    }
                    else
                    {
                        MyGuild guild = ButterflyEnvironment.GetGame().GetGuilds().GetGuild(this.GroupId);
                        Message.AppendInt32(guild.Id);
                        Message.AppendString(guild.Name);
                        Message.AppendString(guild.Image);
                    }
                    Message.AppendString("");
                    Message.AppendInt32(this.TagCount);
                    foreach (string str in this.Tags)
                    {
                        Message.AppendString(str);
                    }
                }
                else
                {
                    Message.AppendBoolean(true);
                    Message.AppendString(this.Event.Name);
                    Message.AppendString(this.Owner);
                    Message.AppendInt32(this.State);
                    Message.AppendInt32(this.UsersNow);
                    Message.AppendInt32(this.UsersMax);
                    Message.AppendString(this.Event.Description);
                    Message.AppendBoolean(true);
                    Message.AppendBoolean(true);
                    Message.AppendInt32(this.Score);
                    Message.AppendInt32(this.Event.Category);
                    Message.AppendString(this.Event.StartTime);
                    Message.AppendInt32(this.Event.Tags.Count);
                    foreach (string str in this.Event.Tags.ToArray())
                    {
                        Message.AppendString(str);
                    }
                }
                Message.AppendInt32(0);
                Message.AppendInt32(0);
                Message.AppendInt32(0);
                Message.AppendBoolean(true);
                Message.AppendBoolean(true);
                Message.AppendInt32(0);
                Message.AppendInt32(0);
            }

    Here is the packetlogged one from Habbo.com.br ( Outgoing.NavigatorPacket = 3439]
    Spoiler:

    [LOG][SERVER] > 3171: [0][0][0][11][12]c[0][3]249[0][0][0][0]
    [LOG][SERVER] > 3695: [0][0][0].o[0][10]Navigation[0][9]Bollywood[0]
    category.view[0][0][0][0][0][0]
    [LOG][CLIENT] > 3439: [0][0][0]s
    o[0][0][0][1][0][3]249[0][0][0][1][5] ^[0][4]jack[1][2]‚ÇÖ[0][12]...jackob...[0][0][0][0][0][0][0][4][0][0][0]2[0][0][0][0][0][0][0][0][0][0][0][0][0]{[0][0][0][0][0][0][0]ù[0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][1][1][0][0][0][0][0][0][0][0][0]
    [LOG][SERVER] > 1617: [0][0][0][6][6]Q[0][0][0]
    [LOG][SERVER] > 3171: [0][0][0][11][12]c[0][3]206[0][0][0][0]
    [LOG][SERVER] > 3695: [0][0][0]1o[0][10]Navigation[0][12]Compositores[0]
    category.view[0][0][0][0][0][0]
    [LOG][CLIENT] > 3773: [0][0][0][6]½[0][0][0]
    [LOG][CLIENT] > 3439: [0][0][1]é
    o[0][0][0][1][0][3]206[0][0][0][1][0])I„[0]Bar Grunge - Butécão[1][0]æœ[0][7]8match8[0][0][0][0][0][0][0][12][0][0][0][1][3]Inspirado nas grandes cachaçarias e botecos cariocas, para o habbo. Aqui é um espaço de conversas e discursos abrangendo qualquer assunto, do rock ao pagode, classico ao contemporâneo. (RECOMENDADO para maiores de 18 anos) Descrição própria Bar Grunge.[0][0][0][0][0][0][0][0][0][0][8][[0][0][0][0][0][0][0]Î[0][1]MA[0]
    Bar Grunge Õ[0]>b13114s54136s54135s54130s6014424505be3a98190814b7f78e1676ca1a1[0][0][0][0][0][2][0][4]rock[0][11]maior de 18[0][0][0][12][0][0][0][5][0][0][0][1][0][0][0][4][0][0][0][0][1][0][0][0][0][0][0][0][0][0]
    [LOG][SERVER] > 3171: [0][0][0][11][12]c[0][3]249[0][0][0][0]
    [LOG][SERVER] > 3695: [0][0][0].o[0][10]Navigation[0][9]Bollywood[0]
    category.view[0][0][0][0][0][0]
    [LOG][CLIENT] > 3439: [0][0][0]s
    o[0][0][0][1][0][3]249[0][0][0][1][5] ^[0][4]jack[1][2]‚ÇÖ[0][12]...jackob...[0][0][0][0][0][0][0][4][0][0][0]2[0][0][0][0][0][0][0][0][0][0][0][0][0]{[0][0][0][0][0][0][0]ù[0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][1][1][0][0][0][0][0][0][0][0][0]
    [LOG][SERVER] > 3171: [0][0][0][11][12]c[0][3]206[0][0][0][0]
    [LOG][SERVER] > 3695: [0][0][0]1o[0][10]Navigation[0][12]Compositores[0]
    category.view[0][0][0][0][0][0]
    [LOG][CLIENT] > 3439: [0][0][1]é
    o[0][0][0][1][0][3]206[0][0][0][1][0])I„[0]Bar Grunge - Butécão[1][0]æœ[0][7]8match8[0][0][0][0][0][0][0][12][0][0][0][1][3]Inspirado nas grandes cachaçarias e botecos cariocas, para o habbo. Aqui é um espaço de conversas e discursos abrangendo qualquer assunto, do rock ao pagode, classico ao contemporâneo. (RECOMENDADO para maiores de 18 anos) Descrição própria Bar Grunge.[0][0][0][0][0][0][0][0][0][0][8][[0][0][0][0][0][0][0]Î[0][1]MA[0]
    Bar Grunge Õ[0]>b13114s54136s54135s54130s6014424505be3a98190814b7f78e1676ca1a1[0][0][0][0][0][2][0][4]rock[0][11]maior de 18[0][0][0][12][0][0][0][5][0][0][0][1][0][0][0][4][0][0][0][0][1][0][0][0][0][0][0][0][0][0]
    [LOG][SERVER] > 3171: [0][0][0][11][12]c[0][3]249[0][0][0][0]
    [LOG][SERVER] > 3695: [0][0][0].o[0][10]Navigation[0][9]Bollywood[0]
    category.view[0][0][0][0][0][0]
    [LOG][CLIENT] > 3439: [0][0][0]s
    o[0][0][0][1][0][3]249[0][0][0][1][5] ^[0][4]jack[1][2]‚ÇÖ[0][12]...jackob...[0][0][0][0][0][0][0][4][0][0][0]2[0][0][0][0][0][0][0][0][0][0][0][0][0]{[0][0][0][0][0][0][0]ù[0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][1][1][0][0][0][0][0][0][0][0][0]
    [LOG][SERVER] > 3171: [0][0][0][11][12]c[0][3]206[0][0][0][0]
    [LOG][SERVER] > 3695: [0][0][0]1o[0][10]Navigation[0][12]Compositores[0]
    category.view[0][0][0][0][0][0]
    [LOG][CLIENT] > 3439: [0][0][1]é
    o[0][0][0][1][0][3]206[0][0][0][1][0])I„[0]Bar Grunge - Butécão[1][0]æœ[0][7]8match8[0][0][0][0][0][0][0][12][0][0][0][1][3]Inspirado nas grandes cachaçarias e botecos cariocas, para o habbo. Aqui é um espaço de conversas e discursos abrangendo qualquer assunto, do rock ao pagode, classico ao contemporâneo. (RECOMENDADO para maiores de 18 anos) Descrição própria Bar Grunge.[0][0][0][0][0][0][0][0][0][0][8][[0][0][0][0][0][0][0]Î[0][1]MA[0]
    Bar Grunge Õ[0]>b13114s54136s54135s54130s6014424505be3a98190814b7f78e1676ca1a1[0][0][0][0][0][2][0][4]rock[0][11]maior de 18[0][0][0][12][0][0][0][5][0][0][0][1][0][0][0][4][0][0][0][0][1][0][0][0][0][0][0][0][0][0]
    [LOG][SERVER] > 3171: [0][0][0][11][12]c[0][3]241[0][0][0][0]
    [LOG][SERVER] > 3695: [0][0][0]1o[0][10]Navigation[0][12]Risco Insano[0]
    category.view[0][0][0][0][0][0]
    [LOG][CLIENT] > 3439: [0][0][3]“
    o[0][0][0][1][0][3]241[0][0][0][3][5]xI”[0]&[Â¥] - Força Aérea Brasileira - [Â¥][1][1]ŸÏ}[0]Marechal-Silva[0][0][0][0][0][0][0][0][0][0][0]Força Aérea Brasileira - Asas tão fortes quanto indestrutíveis! Fundada em fevereiro de 2010, aliste-se! fabhab.wordpress.com[0][0][0][0][0][0][0][0][0][0][6]n[0][0][0][0][0][0][0]ñ[0][0][0][0][0][0][0][0][0][0][0][0][0][2][0][7]policia[0][8]trabalho[0][0][0][0][0][0][0][0][0][0][0][0][0][1][0][0][0][0][0][0][0][0][5]*XP[0]B¥‘ DELEGACIA DE POLICIA HABBO ‘¥ policiapraiatrabalhoraros[1][0]´fÈ[0][11]::.Quito.::[0][0][0][0][0][0][0][6][0][0][0]2[0]iÈ hora de combater o crime no habbo VENHA TRABALHAR NA POLICIA CIVIL.adc nos favoritos e volte sempre•[0][0][0][0][0][0][0][0][0][0][8]»[0][0][0][0][0][0][0]ñ[0][2]-ç[0]ª POLICIA CIVIL ª[0]>b08134s80115s93113t27011s42097f990e7a6549f03b27985e040af22f3b3[0][0][0][0][0][2][0][8]trabalho[0][7]policia[0][0][0][0][0][0][0][0][0][0][0][0][0][1][0][0][0][0][0][0][0][0][5]¾[4]S[0][12]Suicidas ª[1][1]vB~[0]MCDanyellaAnjo[0][0][0][0][0][0][0][1][0][0][0][0]SQueria Conheçer Um Suicida ,E dar Meus Parabens Pela Coragem Qe eu não tenho. [0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0]ñ[0][3][5][0][2]ª[0]8b23134s01133s03134t31130e3b5ec8bb46b348dbb9a6e4cf8a543f9[0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][1][1][0][0][0][0][0][0][0][0][0]
    [LOG][SERVER] > 3171: [0][0][0][11][12]c[0][3]249[0][0][0][0]
    [LOG][SERVER] > 3695: [0][0][0].o[0][10]Navigation[0][9]Bollywood[0]
    category.view[0][0][0][0][0][0]
    [LOG][CLIENT] > 3439: [0][0][0]s
    o[0][0][0][1][0][3]249[0][0][0][1][5] ^[0][4]jack[1][2]‚ÇÖ[0][12]...jackob...[0][0][0][0][0][0][0][4][0][0][0]2[0][0][0][0][0][0][0][0][0][0][0][0][0]{[0][0][0][0][0][0][0]ù[0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][1][1][0][0][0][0][0][0][0][0][0]


    The packet handler is working, but I get disconnected every time I try to Serialize my navicator categories. Also, I couldn't find the packet structure on my AS3 scripts. If someone can provide me the structure for that packet or find what's missing on mine It would be great.


  2. #2
    Check http://arcturus.pw The General is offline
    DeveloperRank
    Aug 2011 Join Date
    7,607Posts

    Re: Swift Emulador Navigator Category Rooms serialize problem.

    Quote Originally Posted by AKllX View Post
    It's for sure a wrong packet structure.

    The packet handler is working, but I get disconnected every time I try to Serialize my navicator categories. Also, I couldn't find the packet structure on my AS3 scripts. If someone can provide me the structure for that packet or find what's missing on mine It would be great.
    Are you sure they're not empty in the database? You get d/c when there is nothing in the database for them.

  3. #3
    Unspoiled Perfection AKllX is offline
    MemberRank
    Aug 2007 Join Date
    @ akllxprojectLocation
    366Posts

    Re: Swift Emulador Navigator Category Rooms serialize problem.

    Quote Originally Posted by tdid View Post
    Are you sure they're not empty in the database? You get d/c when there is nothing in the database for them.
    I'm sure that it's not empty because I can actually see all categories. I get dced whem I click them. Also, I did check it

  4. #4
    Developer Quackster is offline
    DeveloperRank
    Dec 2010 Join Date
    AustraliaLocation
    3,474Posts

    Re: Swift Emulador Navigator Category Rooms serialize problem.

    Quote Originally Posted by tdid View Post
    Are you sure they're not empty in the database? You get d/c when there is nothing in the database for them.
    You shouldn't because that's why there is.

    Code:
     reply.AppendInt32(rooms.Length);

  5. #5
    Check http://arcturus.pw The General is offline
    DeveloperRank
    Aug 2011 Join Date
    7,607Posts

    Re: Swift Emulador Navigator Category Rooms serialize problem.

    Quote Originally Posted by Quackster View Post
    You shouldn't because that's why there is.

    Code:
     reply.AppendInt32(rooms.Length);
    I noticed I get a d/c error when the table is empty so.

  6. #6
    Unspoiled Perfection AKllX is offline
    MemberRank
    Aug 2007 Join Date
    @ akllxprojectLocation
    366Posts

    Re: Swift Emulador Navigator Category Rooms serialize problem.

    Also, I just realized that when there is no loaded room I can swap categories as I want to. Does that means that my SerializePopularRooms is broken ?


    P.S.: Got it working. This might help someone:


    Spoiler:


    SAMPLE 1
    [INT] > [1]: [0][0][0][1]
    [STRING] > [206]: [0][3]206
    [INT] > [1]: [0][0][0][1]
    [INT] > [2713886]: [0])⥩椞
    [STRING] > [Bar Grunge - Butécão]: [0]Bar Grunge - Butécão
    [BOOL] > [1]
    [INT] > [1828691]: [0]ᯧ
    [STRING] > [8match8]: [0][7]8match8
    [INT] > [0]: [0][0][0][0]
    [INT] > [12]: [0][0][0][12]
    [INT] > [25]: [0][0][0]
    [STRING] > [Inspirado nas grandes cachaçarias e botecos cariocas, para o habbo. Aqui é um espaço de conversas e discursos abrangendo qualquer assunto, do rock ao pagode, classico ao contemporâneo. (RECOMENDADO para maiores de 18 anos) Descrição própria Bar Grunge.]: [1]ăInspirado nas grandes cachaçarias e botecos cariocas, para o habbo. Aqui é um espaço de conversas e discursos abrangendo qualquer assunto, do rock ao pagode, classico ao contemporâneo. (RECOMENDADO para maiores de 18 anos) Descrição própria Bar Grunge.
    [INT] > [0]: [0][0][0][0]
    [INT] > [0]: [0][0][0][0]
    [INT] > [2048]: [0][0][8]ࠀ
    [INT] > [0]: [0][0][0][0]
    [INT] > [206]: [0][0][0]Î //category id - int
    [INT] > [85313]: [0][1]ō䵁 //group ID
    [STRING] > [Bar Grunge]: [0][10]Bar Grunge //group name
    [STRING] > [b13114s54136s54135s54130s6014424505be3a98190814b7f78e1676ca1a1]: [0]>b13114s54136s54135s54130s6014424505be3a98190814b7f78e1676ca1a1
    [STRING] > []: [0][0] // here the server send a empty string. I fell that should be 2 false bools
    [INT] > [2]: [0][0][0][2] //tags number
    [STRING] > [rock]: [0][4]rock //tag 1
    [STRING] > [maior de 18]: [0][11]maior de 18 //tag 2
    [INT] > [12]: [0][0][0][12]
    [INT] > [5]: [0][0][0][5]
    [INT] > [1]: [0][0][0][1]
    [INT] > [4]: [0][0][0][4]
    [INT] > [24]: [0][0][0]
    [BOOL] > [0]: false
    [BOOL] > [1]: true
    [BOOL] > [0]:false
    [INT] > [0]: [0][0][0][0]
    [INT] > [10]: [0][0][0][10]


    SAMPLE 2


    [INT] > [1]: [0][0][0][1]
    [STRING] > [241]: [0][3]241
    [INT] > [3]: [0][0][0][3]
    //room1
    [INT] > [91777309]: [5]ո硩椝
    [STRING] > [{¥} - Força Aérea Brasileira - {¥}]: [0]&{¥} - Força Aérea Brasileira - {¥}
    [BOOL] > [1]
    [INT] > [41471869]: [2]ɸ磏콽 //owner ID
    [STRING] > [Marechal-Silva]: [0]Marechal-Silva //owner Name
    [INT] > [0]: [0][0][0][0]
    [INT] > [18]: [0][0][0]
    [INT] > [30]: [0][0][0]
    [STRING] > [Força Aérea Brasileira - Asas tão fortes quanto indestrutíveis! Fundada em fevereiro de 2010, aliste-se! fabhab.wordpress.com]: [0]Força Aérea Brasileira - Asas tão fortes quanto indestrutíveis! Fundada em fevereiro de 2010, aliste-se! fabhab.wordpress.com
    [INT] > [0]: [0][0][0][0]
    [INT] > [0]: [0][0][0][0]
    [INT] > [1646]: [0][0][6]ٮ
    [INT] > [0]: [0][0][0][0]
    [INT] > [241]: [0][0][0]ñ
    [INT] > [0]: [0][0][0][0]
    [INT] > [0]: [0][0][0][0]
    [INT] > [2]: [0][0][0][2]
    [STRING] > [policia]: [0][7]policia
    [STRING] > [trabalho]: [0][8]trabalho
    [INT] > [0]: [0][0][0][0]
    [INT] > [0]: [0][0][0][0]
    [INT] > [0]: [0][0][0][0]
    [INT] > [65536]: [0][1]Ā[0]
    [INT] > [0]: [0][0][0][0]
    [INT] > [0]: [0][0][0][0]
    [STRING] > []: [0][0]
    //room 2
    [INT] > [86661200]: [5]Ԫ⩘塐
    [STRING] > [¥‘ DELEGACIA DE POLICIA HABBO ‘¥ policiapraiatrabalhoraros]: [0]B¥‘ DELEGACIA DE POLICIA HABBO ‘¥ policiapraiatrabalhoraros
    [BOOL] > [1]: true
    [INT] > [11822792]: [0]´둦曈
    [STRING] > [::.Quito.::]: [0][11]::.Quito.::
    [INT] > [0]: [0][0][0][0]
    [INT] > [6]: [0][0][0][6]
    [INT] > [50]: [0][0][0]2
    [STRING] > [È hora de combater o crime no habbo VENHA TRABALHAR NA POLICIA CIVIL.adc nos favoritos e volte sempre•]: [0]iÈ hora de combater o crime no habbo VENHA TRABALHAR NA POLICIA CIVIL.adc nos favoritos e volte sempre•
    [INT] > [0]: [0][0][0][0]
    [INT] > [0]: [0][0][0][0]
    [INT] > [2235]: [0][0][8]ࢻ
    [INT] > [0]: [0][0][0][0]
    [INT] > [241]: [0][0][0]ñ
    [INT] > [142823]: [0][2]ȭⷧ
    [STRING] > [ª POLICIA CIVIL ª]: [0]ª POLICIA CIVIL ª
    [STRING] > [b08134s80115s93113t27011s42097f990e7a6549f03b27985e040af22f3b3]: [0]>b08134s80115s93113t27011s42097f990e7a6549f03b27985e040af22f3b3
    [STRING] > []: [0][0]
    [INT] > [2]: [0][0][0][2]
    [STRING] > [trabalho]: [0][8]trabalho
    [STRING] > [policia]: [0][7]policia
    [INT] > [0]: [0][0][0][0]
    [INT] > [0]: [0][0][0][0]
    [INT] > [0]: [0][0][0][0]
    [INT] > [65536]: [0][1]Ā[0]
    [INT] > [0]: [0][0][0][0]
    [STRING] > []: [0][0]
    //ROOM 3
    [INT] > [96339027]: [5]־븄ѓ
    [STRING] > [Suicidas ª]: [0][12]Suicidas ª
    [INT] > [24527486]: [1]Ŷ療䉾
    [STRING] > [MCDanyellaAnjo]: [0]MCDanyellaAnjo
    [INT] > [0]: [0][0][0][0]
    [INT] > [1]: [0][0][0][1]
    [INT] > [25]: [0][0][0]
    [STRING] > [Queria Conheçer Um Suicida ,E dar Meus Parabens Pela Coragem Qe eu não tenho. ]: [0]SQueria Conheçer Um Suicida ,E dar Meus Parabens Pela Coragem Qe eu não tenho.
    [INT] > [0]: [0][0][0][0]
    [INT] > [0]: [0][0][0][0]
    [INT] > [19]: [0][0][0]
    [INT] > [0]: [0][0][0][0]
    [INT] > [241]: [0][0][0]ñ
    [INT] > [201221]: [0][3]̒ህ
    [STRING] > [ª]: [0][2]ª
    [STRING] > [b23134s01133s03134t31130e3b5ec8bb46b348dbb9a6e4cf8a543f9]: [0]8b23134s01133s03134t31130e3b5ec8bb46b348dbb9a6e4cf8a543f9
    [STRING] > []: [0][0]
    [INT] > [0]: [0][0][0][0]
    [INT] > [0]: [0][0][0][0]
    [INT] > [0]: [0][0][0][0]
    [INT] > [0]: [0][0][0][0]
    [BOOL] > [0] : false
    [BOOL] > [1] : true
    [INT] > [0]: [0][0][0][0]
    [INT] > [0]: [0][0][0][0]
    Last edited by AKllX; 11-05-13 at 03:43 AM.



Advertisement