Fix for multiple logging in at one time

04/06/2010 23:48 pintser#16
in the console it still disconnects ya...
isnt there a way to make the client say:

u are already logged in( Dont try using this bug, u will get banned) ore something like it..?
04/07/2010 00:33 -impulse-#17
Quote:
Originally Posted by .Arco View Post
Lol just had to show me up eh?
Had to do it right lol.
04/07/2010 00:38 HardNotTo#18
Quote:
Originally Posted by -impulse- View Post
and replace that with
Code:
if (!Game.World.H_Chars.Contains(GC.MyChar.EntityID))
                                    {
                                        
                                        Game.World.H_Chars.Add(GC.MyChar.EntityID, GC.MyChar);
                                        GC.AddSend(Packets.SystemMessage(GC.MessageID, "ANSWER_OK"));
                                        GC.AddSend(Packets.CharacterInfo(GC.MyChar));
                                        GC.AddSend(Packets.Status(GC.MyChar.EntityID, Game.Status.VIPLevel, GC.MyChar.VipLevel));
                                        GC.AddSend(Packets.Time());
                                        GC.AddSend(Packets.Donators(GC.MyChar));
                                        GC.AddSend(Packets.Packet1012(GC.MyChar.EntityID));
                                        GC.AddSend(Packets.Status(GC.MyChar.EntityID, Game.Status.Effect, 0));
                                    }
                                    else
                                    {

                                        try{

                                        Game.Character chr = [COLOR="Red"](Game.Character)[/COLOR]Game.World.H_Chars[GC.MyChar.EntityID];

                                        chr.MyClient.Disconnect();}catch{}

                                        if 
                                        (Game.World.H_Chars.Contains(GC.MyChar.EntityID))

                                        
                                        Game.World.H_Chars.Remove(GC.MyChar.EntityID);

                                        Game.World.H_Chars.Add(GC.MyChar.EntityID, GC.MyChar);                    
                                        GC.AddSend(Packets.SystemMessage(GC.MessageID, "ANSWER_OK"));                     
                                        GC.AddSend(Packets.CharacterInfo(GC.MyChar));

                                        GC.AddSend(Packets.Status(GC.MyChar.EntityID, Game.Status.VIPLevel, 
                                        GC.MyChar.VipLevel));

                                        GC.AddSend(Packets.Time());

                                        GC.AddSend(Packets.Donators(GC.MyChar));

                                        GC.AddSend(Packets.Packet1012(GC.MyChar.EntityID));

                                        GC.AddSend(Packets.Status(GC.MyChar.EntityID, Game.Status.Effect, 0));
}
Done.
there ya go
04/07/2010 01:38 PeTe Ninja#19
Quote:
Originally Posted by -impulse- View Post
Had to do it right lol.
ALEXBIGFOOT?
04/07/2010 01:41 Arcо#20
Quote:
Originally Posted by PeTe Ninja View Post
ALEXBIGFOOT?
Yeah thats him.
04/07/2010 02:12 -NewDawn-#21
lol, that works too.
Credit to both of you.
04/07/2010 02:25 salem rey#22
OMG. I already see that code, and someone already release it. If you want to know i will give you the link for it. I think the last page of this thread.
[Only registered and activated users can see links. Click Here To Register...]
04/07/2010 02:37 Arcо#23
Quote:
Originally Posted by salem rey View Post
OMG. I already see that code, and someone already release it. If you want to know i will give you the link for it. I think the last page of this thread.
[Only registered and activated users can see links. Click Here To Register...]
That one doesn't work -.-
04/07/2010 05:09 Nullable#24
Quote:
Originally Posted by .Arco View Post
That one doesn't work -.-
Actually it works fine after tweaking 1 line. (:
04/07/2010 05:21 Arcо#25
Quote:
Originally Posted by Nullable View Post
Actually it works fine after tweaking 1 line. (:
Lol I noticed that, I decided to try it again and mess with it after I saw his post.
04/07/2010 07:50 -NewDawn-#26
There's a problem:
If you use Impulse's code it makes all the NPCs not load in the area that the character is loaded. If you move and move back to the original spot it loads but it's still a problem.
04/07/2010 08:08 Arcо#27
Quote:
Originally Posted by -NewDawn- View Post
There's a problem:
If you use Impulse's code it makes all the NPCs not load in the area that the character is loaded. If you move and move back to the original spot it loads but it's still a problem.
Did you have that problem with mine?
04/07/2010 08:11 -NewDawn-#28
Quote:
Originally Posted by .Arco View Post
Did you have that problem with mine?
Yeah. Both of them have that problem.
04/07/2010 09:01 -impulse-#29
Quote:
Originally Posted by HardNotTo View Post
there ya go
Thank you. Anyway in my source I use an dictionary<uint, Game.Character> so I don't need to do casts.
04/07/2010 09:03 -impulse-#30
Quote:
Originally Posted by -NewDawn- View Post
Yeah. Both of them have that problem.
Meh' you gotta add World.Spawns(GC.MyChar, false) somewhere and it will work just fine.