[RELEASE] Swift Emulator - Fixes / Edits

Page 2 of 28 FirstFirst 1234567891012 ... LastLast
Results 16 to 30 of 420
  1. #16
    Apprentice F0ca is offline
    MemberRank
    Jul 2011 Join Date
    6Posts

    Re: [RELEASE] Swift Emulator - Fixes / Edits

    Quick Fix:

    In HabboMessenger.cs
    Look for
    Code:
    internal void DestroyFriendship(uint friendID)
    and replace it with
    Code:
    internal void DestroyFriendship(uint friendID)
            {
                using (IQueryAdapter adapter = ButterflyEnvironment.GetDatabaseManager().getQueryreactor())
                {
                    adapter.runFastQuery(string.Concat(new object[] { "DELETE FROM messenger_friendships WHERE (sender = ", this.UserId, " AND receiver = ", friendID, ") OR (receiver = ", this.UserId, " AND sender = ", friendID, ")" }));
                }
                this.OnDestroyFriendship(friendID);
                this.GetClient().GetHabbo().GetRelationshipComposer().RelationshipStatusUpdate(friendID, 0);
    
                GameClient clientByUserID = ButterflyEnvironment.GetGame().GetClientManager().GetClientByUserID(friendID);
                if ((clientByUserID != null) && (clientByUserID.GetHabbo().GetMessenger() != null))
                {
                    clientByUserID.GetHabbo().GetMessenger().OnDestroyFriendship(this.UserId);
                }
                else
                {
                    using (IQueryAdapter adapter = ButterflyEnvironment.GetDatabaseManager().getQueryreactor())
                    {
                        adapter.setQuery("DELETE FROM user_relationships WHERE requester_id = @sender AND target_id = @target LIMIT 1");
                        adapter.addParameter("sender", friendID);
                        adapter.addParameter("target", UserId);
                        adapter.runQuery();
                    }//non sono siuro che vada bene... le cache??
                }
            }
    Now look for
    Code:
    internal void OnDestroyFriendship(uint Friend)
    and after
    Code:
    this.friends.Remove(Friend);
    add:
    Code:
    this.GetClient().GetHabbo().GetRelationshipComposer().RelationshipStatusUpdate(Friend, 0);
    EDIT:
    This is the right packet id for RoomError:
    Code:
    Outgoing.RoomError = 1671;//b

  2. #17
    Novice araceus is offline
    MemberRank
    Mar 2012 Join Date
    3Posts

    Re: [RELEASE] Swift Emulator - Fixes / Edits

    Thank you, I'll test it now :)

  3. #18
    Member McFluffy1 is offline
    MemberRank
    Jan 2013 Join Date
    EssexLocation
    58Posts

    Re: [RELEASE] Swift Emulator - Fixes / Edits

    Thank you that works great. I can now use the clear relationships button. But I still can't add people.. Unless you have a fix for that too?
    Thanks anyway for that.
    Quote Originally Posted by F0ca View Post
    Quick Fix:

    In HabboMessenger.cs
    Look for
    Code:
    internal void DestroyFriendship(uint friendID)
    and replace it with
    Code:
    internal void DestroyFriendship(uint friendID)
            {
                using (IQueryAdapter adapter = ButterflyEnvironment.GetDatabaseManager().getQueryreactor())
                {
                    adapter.runFastQuery(string.Concat(new object[] { "DELETE FROM messenger_friendships WHERE (sender = ", this.UserId, " AND receiver = ", friendID, ") OR (receiver = ", this.UserId, " AND sender = ", friendID, ")" }));
                }
                this.OnDestroyFriendship(friendID);
                this.GetClient().GetHabbo().GetRelationshipComposer().RelationshipStatusUpdate(friendID, 0);
    
                GameClient clientByUserID = ButterflyEnvironment.GetGame().GetClientManager().GetClientByUserID(friendID);
                if ((clientByUserID != null) && (clientByUserID.GetHabbo().GetMessenger() != null))
                {
                    clientByUserID.GetHabbo().GetMessenger().OnDestroyFriendship(this.UserId);
                }
                else
                {
                    using (IQueryAdapter adapter = ButterflyEnvironment.GetDatabaseManager().getQueryreactor())
                    {
                        adapter.setQuery("DELETE FROM user_relationships WHERE requester_id = @sender AND target_id = @target LIMIT 1");
                        adapter.addParameter("sender", friendID);
                        adapter.addParameter("target", UserId);
                        adapter.runQuery();
                    }//non sono siuro che vada bene... le cache??
                }
            }
    Now look for
    Code:
    internal void OnDestroyFriendship(uint Friend)
    and after
    Code:
    this.friends.Remove(Friend);
    add:
    Code:
    this.GetClient().GetHabbo().GetRelationshipComposer().RelationshipStatusUpdate(Friend, 0);
    EDIT:
    This is the right packet id for RoomError:
    Code:
    Outgoing.RoomError = 1671;//b

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

    Re: [RELEASE] Swift Emulator - Fixes / Edits

    Quote Originally Posted by Hyp View Post
    Error in packet [1590] BODY: [0][0][0][0][0][0]:
    TokenID: 0System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
    at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
    at Butterfly.HabboHotel.Users.Relationship.RelationshipComposer.RelationshipStatusUpdate(UInt32 targetID, UInt32 newRelationshipStatus) in C:\Users\root\Desktop\emu\Butterfly\HabboHotel\Users\Relationship\RelationshipComposer.cs:line 54
    at Butterfly.HabboHotel.Users.Relationship.RelationshipComposer.SerializeRelationshipUpdate(UInt32 targetId, UInt32 newRelationshipState) in C:\Users\root\Desktop\emu\Butterfly\HabboHotel\Users\Relationship\RelationshipComposer.cs:line 203
    at Butterfly.Messages.GameClientMessageHandler.SetRelationshipsStatus() in C:\Users\root\Desktop\emu\Butterfly\Messages\GameClientMessageHandler.cs:line 396
    at Butterfly.Messages.StaticMessageHandlers.SharedPacketLib.SetRelationshipsStatus(GameClientMessageHandler handler) in C:\Users\root\Desktop\emu\Butterfly\Messages\StaticMessageHandlers\SharedPacketLib.cs:line 36
    at Butterfly.Messages.StaticMessageHandlers.StaticClientMessageHandler.HandlePacket(GameClientMessageHandler handler, ClientMessage message) in C:\Users\root\Desktop\emu\Butterfly\Messages\StaticMessageHandlers\StaticClientMessageHandler.cs:line 29
    at Butterfly.Messages.GameClientMessageHandler.HandleRequest(ClientMessage request) in C:\Users\root\Desktop\emu\Butterfly\Messages\GameClientMessageHandler.cs:line 3372
    at Butterfly.HabboHotel.GameClients.GameClient.parser_onNewPacket(ClientMessage Message) in C:\Users\root\Desktop\emu\Butterfly\HabboHotel\GameClients\GameClient.cs:line 136
    This happens when You try change a relationship status from Null ( 0 ) to Null again ( 0 ). I did try to fix that by adding this condition
    Code:
     if ((composedRelations[targetID] == newRelationshipStatus) || (!composedRelations.ContainsKey(targetID) && (newRelationshipStatus == 0)))
    but It seems to be not working. Any sugestions are appreciated.

    Quote Originally Posted by HabflareH View Post
    Hello, I'm still having problems getting the relationships to save , people to add them. I'm using your edit and so on... Any idea?
    Need more information from logs, as from default It was supposed to work on all databases like worked on mine. Did You try using that on a empty database ? Did It ever worked an then stopped working ?

  5. #20
    Valued Member Wox12 is offline
    MemberRank
    Jul 2012 Join Date
    101Posts

    Re: [RELEASE] Swift Emulator - Fixes / Edits

    can someone relase this emu with all the fixes?

  6. #21
    Valued Member Noman is offline
    MemberRank
    Sep 2011 Join Date
    United KingdomLocation
    137Posts

    Re: [RELEASE] Swift Emulator - Fixes / Edits

    Why doesn't the Room Alerts work?

  7. #22
    Apprentice rubbamike is offline
    MemberRank
    Feb 2013 Join Date
    13Posts

    Re: [RELEASE] Swift Emulator - Fixes / Edits

    Quote Originally Posted by Noman View Post
    Why doesn't the Room Alerts work?
    I'm having the same issue.

  8. #23
    Enthusiast MikeOxlong is offline
    MemberRank
    Jan 2012 Join Date
    Barnsley, UKLocation
    35Posts

    Re: [RELEASE] Swift Emulator - Fixes / Edits

    Room Alerts aren't working properly, any ideas?

  9. #24
    Apprentice BuzzBS is offline
    MemberRank
    Jul 2012 Join Date
    ParisLocation
    12Posts

    Re: [RELEASE] Swift Emulator - Fixes / Edits

    http://gweinyddwrstorio.net/dcp/swfs...-549034787.zip
    SWF Pack link is down..

    Someone can upload?

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

    [RELEASE] Swift Emulator - Fixes / Edits

    This is a core fix, sorry for the delay on doing it. Was busy with the college.

    By doing this, your relationship composer will be 100% retail-like.

    At GameClientMessageHandler.cs

    Look for internal void SetRelationshipsStatus() and replace the whole method with:

    Code:
            internal void SetRelationshipsStatus()        {
                uint requester = this.Request.PopWiredUInt();
                uint newStatus = this.Request.PopWiredUInt();
                if (this.Session.GetHabbo().GetRelationshipComposer().GetRelationshipList.ContainsKey(requester))
                {
                    if (this.Session.GetHabbo().GetRelationshipComposer().GetRelationshipList[requester] != newStatus)
                    {
                        this.Response = this.Session.GetHabbo().GetRelationshipComposer().SerializeRelationshipUpdate(requester, newStatus);
                        this.SendResponse();
                    }
                }
                else if ((!this.Session.GetHabbo().GetRelationshipComposer().GetRelationshipList.ContainsKey(requester)) && (newStatus != 0))
                {
                    this.Response = this.Session.GetHabbo().GetRelationshipComposer().SerializeRelationshipUpdate(requester, newStatus);
                    this.SendResponse();
                }
                else
                    return;
            }
    At RelationshipComposer.cs look for : internal void RelationshipStatusUpdate(uint targetID, uint newRelationshipStatus) and replace the whole function with:

    Code:
    internal void RelationshipStatusUpdate(uint targetID, uint newRelationshipStatus)        {
                    if (newRelationshipStatus != 0)
                    {
                        if (this.HasRelationshipWith(targetID))
                        {
                            using (IQueryAdapter adapter = ButterflyEnvironment.GetDatabaseManager().getQueryreactor())
                            {
                                adapter.setQuery("UPDATE user_relationships SET relationshipstatus=@newstatus WHERE requester_id = @sender AND target_id = @target LIMIT 1");
                                adapter.addParameter("sender", this.UserID);
                                adapter.addParameter("target", targetID);
                                adapter.addParameter("newstatus", newRelationshipStatus);
                                adapter.runQuery();
                            }
    
    
                            relationshipStatusIndex[composedRelations[targetID] - 1]--;
                            composedRelations[targetID] = newRelationshipStatus;
                            relationshipStatusIndex[newRelationshipStatus - 1]++;
                        }
                        else
                        {
                            using (IQueryAdapter adapter = ButterflyEnvironment.GetDatabaseManager().getQueryreactor())
                            {
                                adapter.setQuery("INSERT INTO user_relationships (requester_id,target_id,relationshipstatus) VALUES (@sender,@target,@newstatus)");
                                adapter.addParameter("sender", this.UserID);
                                adapter.addParameter("target", targetID);
                                adapter.addParameter("newstatus", newRelationshipStatus);
                                adapter.runQuery();
                            }
                            relationshipStatusIndex[newRelationshipStatus - 1]++;
                            this.composedRelations.Add(targetID, newRelationshipStatus);
                        }
    
    
                    }
                    else
                    {
                        using (IQueryAdapter adapter = ButterflyEnvironment.GetDatabaseManager().getQueryreactor())
                        {
                            adapter.setQuery("DELETE FROM user_relationships WHERE requester_id = @sender AND target_id = @target LIMIT 1");
                            adapter.addParameter("sender", this.UserID);
                            adapter.addParameter("target", targetID);
                            adapter.runQuery();
                        }
                        relationshipStatusIndex[composedRelations[targetID] - 1]--;
                        this.composedRelations.Remove(targetID);
                    }
            }
    http://gweinyddwrstorio.net/dcp/swfs...-549034787.zip
    SWF Pack link is down..

    Someone can upload?


    Here are my own htdocs folder from he hotel I used to run:
    http://www.4shared.com/rar/73QmxwjW/htdocs_5.html? . Should have everything you need inside the the main swfs folder ( htdocs/swfs ). Make sure you change the furnidata.txt and external_flash_texts.txt because they are in Portuguese.
    Last edited by AKllX; 04-06-13 at 05:00 PM.

  11. #26
    Member Wbeu is offline
    MemberRank
    Apr 2013 Join Date
    56Posts

    Re: [RELEASE] Swift Emulator - Fixes / Edits

    weird the groups worked like good on the old SwiftEMU ehm...

    Still thinking why you need to restart your emu for the groups.

    Someone a idea?

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

    Re: [RELEASE] Swift Emulator - Fixes / Edits

    Quote Originally Posted by Wbeu View Post
    weird the groups worked like good on the old SwiftEMU ehm...

    Still thinking why you need to restart your emu for the groups.

    Someone a idea?
    Yes. It's that Quackster's patch for memory leak. Remove It and groups will work fine. However, it's leaky so I might complete that patch for a full task cycle

  13. #28
    Member Wbeu is offline
    MemberRank
    Apr 2013 Join Date
    56Posts

    Re: [RELEASE] Swift Emulator - Fixes / Edits

    Quote Originally Posted by AKllX View Post
    Yes. It's that Quackster's patch for memory leak. Remove It and groups will work fine. However, it's leaky so I might complete that patch for a full task cycle
    Ehm.. I will look at the groups and look if i can fix it without removing the memory leak patch..

  14. #29
    Apprentice HabosHotel is offline
    MemberRank
    Jul 2012 Join Date
    13Posts

    Re: [RELEASE] Swift Emulator - Fixes / Edits

    @AKllX Can you post a final edition with bots and horse fix thx <3

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

    Re: [RELEASE] Swift Emulator - Fixes / Edits

    Quote Originally Posted by HabosHotel View Post
    @AKllX Can you post a final edition with bots and horse fix thx <3
    I will post what I do when I do it, but I really don't get a lot of free time. Also, I'm focusing now on trying to figure out how to reverve, crack or patch the RC4 system from habbo's swf so I can keep up with it's latest release. Also, after the RELEASE63-201304291103-855522680 It seems that the way that Diffie-Hellman algorithm is structured has changed. Which means, more work !



Page 2 of 28 FirstFirst 1234567891012 ... LastLast

Advertisement