UberEmu Clone bug fix

Results 1 to 13 of 13
  1. #1
    Account Upgraded | Title Enabled! wichard is offline
    MemberRank
    Jul 2009 Join Date
    The NetherlandsLocation
    649Posts

    UberEmu Clone bug fix

    Hello ragezone, after a time you have running your emu somethimes ive got a Clone bug.

    Then u see my user 2+ times in a room.

    Search for in Room.cs:

    Code:
            public void RemoveUserFromRoom(GameClient Session, bool NotifyClient, bool NotifyKick)
    Replace the whole void with:

    Code:
            public void RemoveUserFromRoom(GameClient Session, bool NotifyClient, bool NotifyKick)
            {
                if (Session != null)
                {
                    RoomUser roomUserByHabbo = this.GetRoomUserByHabbo(Session.GetHabbo().Id);
                    TimedLock @lock = TimedLock.Lock(this.UserList);
                    try
                    {
                        if (!this.UserList.Remove(this.GetRoomUserByHabbo(Session.GetHabbo().Id)))
                        {
                            return;
                        }
                    }
                    catch
                    {
                        return;
                    }
                    finally
                    {
                        @lock.Dispose();
                    }
                    if (NotifyClient)
                    {
                        if (NotifyKick)
                        {
                            Session.GetMessageHandler().GetResponse().Init(0x21);
                            Session.GetMessageHandler().GetResponse().AppendInt32(0xfa8);
                            Session.GetMessageHandler().SendResponse();
                        }
                        Session.GetMessageHandler().GetResponse().Init(0x12);
                        Session.GetMessageHandler().SendResponse();
                    }
                    List<RoomUser> list = new List<RoomUser>();
                    using (TimedLock.Lock(this.UserList))
                    {
                        if (!roomUserByHabbo.IsSpectator)
                        {
                            if (roomUserByHabbo != null)
                            {
                                this.UserMatrix[roomUserByHabbo.X, roomUserByHabbo.Y] = false;
                                ServerMessage message = new ServerMessage(0x1d);
                                message.AppendRawInt32(roomUserByHabbo.VirtualId);
                                this.SendMessage(message);
                            }
                            if (Session.GetHabbo() != null)
                            {
                                if (this.HasActiveTrade(Session.GetHabbo().Id))
                                {
                                    this.TryStopTrade(Session.GetHabbo().Id);
                                }
                                if ((Session.GetHabbo().Username.ToLower() == this.Owner.ToLower()) && this.HasOngoingEvent)
                                {
                                    this.Event = new RoomEvent(0, null, null, 0, new List<string>());
                                    ServerMessage message2 = new ServerMessage(370);
                                    message2.AppendStringWithBreak("-1");
                                    this.SendMessage(message2);
                                }
                                Session.GetHabbo().OnLeaveRoom();
                            }
                        }
                        if (!roomUserByHabbo.IsSpectator)
                        {
                            this.UpdateUserCount();
                            List<RoomUser> list2 = new List<RoomUser>();
                            foreach (RoomUser user2 in this.UserList)
                            {
                                if (user2.IsBot)
                                {
                                    list2.Add(user2);
                                }
                            }
                            foreach (RoomUser user3 in list2)
                            {
                                user3.BotAI.OnUserLeaveRoom(Session);
                                if ((user3.IsPet && (user3.PetData.OwnerId == Session.GetHabbo().Id)) && !this.CheckRights(Session, true))
                                {
                                    list.Add(user3);
                                }
                            }
                        }
                    }
                    foreach (RoomUser user4 in list)
                    {
                        Session.GetHabbo().GetInventoryComponent().AddPet(user4.PetData);
                        this.RemoveBot(user4.VirtualId, false);
                    }
                }
            }


  2. #2
    Account Upgraded | Title Enabled! FlyCoder is offline
    MemberRank
    Jan 2011 Join Date
    United KingdomLocation
    469Posts

    Re: UberEmu Clone bug fix

    Nice release!

    EDIT:
    First post :)

  3. #3
    HTML,CSS and a bit C# Richardjuhh is offline
    MemberRank
    Dec 2010 Join Date
    NetherlandsLocation
    351Posts

    Re: UberEmu Clone bug fix

    NICE!! OMG i love this fix so much!!

    2end post

  4. #4
    sexiess is a sin. Subway is offline
    MemberRank
    Jun 2010 Join Date
    2,491Posts

    Re: UberEmu Clone bug fix

    Great but no images?

  5. #5
    Lurking since '06 1ntel is offline
    MemberRank
    Jul 2006 Join Date
    401Posts

    Re: UberEmu Clone bug fix

    This is not a proper fix, the issue is actually the TCP which causes this problem!! When closing the client!

  6. #6
    sexiess is a sin. Subway is offline
    MemberRank
    Jun 2010 Join Date
    2,491Posts

    Re: UberEmu Clone bug fix

    ty matt, know he didn't fix anything.

  7. #7
    Thanks for the memories! Mithex is offline
    MemberRank
    May 2010 Join Date
    HeavenLocation
    2,014Posts

    Re: UberEmu Clone bug fix

    Thx for this m8!

  8. #8
    HTML,CSS and a bit C# Richardjuhh is offline
    MemberRank
    Dec 2010 Join Date
    NetherlandsLocation
    351Posts

    Re: UberEmu Clone bug fix

    Quote Originally Posted by matty13 View Post
    This is not a proper fix, the issue is actually the TCP which causes this problem!! When closing the client!
    Ok but in your emulator you have this problem!

    thats because we use it!

  9. #9
    C# | C++ Emerica is offline
    MemberRank
    Oct 2010 Join Date
    GermanyLocation
    437Posts

    Re: UberEmu Clone bug fix

    it's a good fix for normal UberEmu.
    Thanks

  10. #10
    Banned rafa95123 is offline
    BannedRank
    May 2009 Join Date
    /home/RaphaLocation
    564Posts

    Re: UberEmu Clone bug fix

    Hey wichard, why of this Erro?



    Help me please ?

  11. #11
    HTML,CSS and a bit C# Richardjuhh is offline
    MemberRank
    Dec 2010 Join Date
    NetherlandsLocation
    351Posts

    Re: UberEmu Clone bug fix

    Quote Originally Posted by rafa95123 View Post
    Hey wichard, why of this Erro?



    Help me please ?
    Thinkemu is just based on blah emu..
    blah emu used a other userlist or something

    look at an original uber for the same code
    after that look at blah
    if you find...
    copy
    replace the line where you have the error.


    And BlahEmulator has't got this error i think because some things are much better coded than the original!

  12. #12
    Account Upgraded | Title Enabled! SlimHotel is offline
    MemberRank
    Mar 2011 Join Date
    c:\xampp\htdocsLocation
    390Posts

    Re: UberEmu Clone bug fix

    This is not how you really fix it the right way it's just a patch!~

  13. #13
    Valued Member TenShie is offline
    MemberRank
    Apr 2011 Join Date
    Frankfurt a. M.Location
    115Posts

    Re: UberEmu Clone bug fix

    I'ts not to late to Post here.

    It works an in Combination with the RoomManager fix 80% Stable

    -TenShie



Advertisement