Trinitycore: Player Instant Logout

Created on 20 Jun 2017  Β·  42Comments  Β·  Source: TrinityCore/TrinityCore

Description:

When you are loged in and open a new wow and log in the same account, you are instant logout, with this error, you can avoid X spell or avoid die anytime

@ariel- comment (https://github.com/TrinityCore/TrinityCore/issues/19850#issuecomment-307228240)

Yeah logging in the same account auto disconnects any player from that account, what should happen is the player must remain in world with disconnect timer running, only if logging to the same char should the timer be reset and the new session associated with the old player.

Current behaviour:

When you log in online player account with another wow, you are instant logout

Expected behaviour:

When you log in online player account with another wow, the "offline player" should wait 1 min after logout (you can log in another different character with the same account and the "offline player" still login until 1 minute passes)
Tested with retail accounts

Steps to reproduce the problem:

  1. Log in a character
  2. Open a new wow
  3. log in the same account

Branch(es): 3.3.5 and master

TC rev. hash/commit: https://github.com/TrinityCore/TrinityCore/commit/aeaa8ecfabc2885aa24a86ce22034718cb4f62d8

TDB version: TDB335.63

Operating system: Debian

Branch-3.3.5a Comp-Core Feedback-FixOutdatedMissingWIP Sub-Exploit

Most helpful comment

I've updated the patch to include that change.

See:
https://gist.github.com/Langerz82/4052a9e829703b5dbaa7ce260e7984b7

All 42 comments

It is the same

Tested with retail accounts

was this the same in 3.3.5a patch in retail ?

@codeman8214
oks, thx, update issue for both branches

@jackpoz
I'm sorry, I remember yes... but I don't have time machine ;)

https://youtu.be/Fh7kQkQkLik?t=2m45s
As you can see, the char doesn't even leave the world.

Related to #18458

If you reboot or you alt-f4 and get back to the login screen in a hurry, you may or may not get the offline message. I am doubtful that this is a minute rule of any sort. I believe more so that this is an instance issue (or more likely to occur there) if I had to guess.

Fwiw, when multiboxing (since vanilla) this is a normal thing, accidentally log my whole team in again and they have always do with few exceptions logged in normally. 10 accounts logged in, relog everyone and they all "has been disconnected" and then pop right in.

I am not sure where leaving the world has to do with this. You cannot leave combat just because you alt-f4 and outside of combat you stick around for quite a while. In instances, you may not be where you were when the game exited.

When you log in account and you open a new wow and log in the same account (No matter if you pressed ALT+F4 or lost connection or still online) the online character of that account auto disconnects from the world.

Should keep online all "online characters" of the account 1 minute and if not log in this minute, the "online characters" should be removed from the world

This is the causant: https://github.com/TrinityCore/TrinityCore/blob/3.3.5/src/server/game/Server/WorldSession.cpp#L151

WorldSession destructor instant logout the player

It causes issues on battleground system too.
If you get disconect when inside of some BG, you lose all your "damage/heal, kill, death, etc".

working on this issue

Tested briefly. Apply patch and test. Apologies if the patch has whitespace issues I had to remove another patch from the same file.

See:
https://gist.github.com/Langerz82/c1c96b3a55dc242a813887be94368134

@Langerz82 what happens with https://github.com/TrinityCore/TrinityCore/blob/3.3.5/src/server/game/Server/WorldSession.cpp#L590

Edit: I test the patch, seems works ok, but I see a problem, if you have a player A logged in the world and try to log in the world Player B (same account), player A Instant Logout, player A should stay in the world 1 minute.

Looks like the problem you are seeing is the same issue as before (problem unchanged, no improvement). Or have I misunderstood what you meant in the original issue post / in your last comment?

No, with the fix, the issue is 70% (I think πŸ˜„ ) fixed, but needs fix the problem that I have described above

Example for explain:
Before patch:
Player A log in the world
Open a new wow
Log in the same account without enter with any player
Player A instant logout

After patch:
Player A log in the world
Open a new wow
Log in the same account without enter with any player
Player A still in world
Try to log in with the same player and seems works ok
Try to log with another player in the same account and Player A Instant Logout (wrong)

Interesting improvement. Needs to be made into a PR very soonβ„’ .

Ah the kickplayer is still getting called, ill fix it later today.

issue is more complex than I thought, working on it but it may take a couple days.

Yep :smile:
Maybe add a check to verify if is the same character kill oldsession, else wait 1 minute, I don't know

think I got it finally, should be able to release the patch in a couple hours for testing.

Little bit of a problem. Hopefully release a patch by the end of the day. (Damn pointers!) :-D

Here is the patch:
https://gist.github.com/Langerz82/4052a9e829703b5dbaa7ce260e7984b7

Needs extensive testing.

I fast tested it and don't works properly.

When you log in with character1 and open a new wow and log in the same account and log with another char, the sesion is not killed and character1 instant logout

And if you log with the same char, seems works more lees ok xD (but with strange movement πŸ˜„ )

Are you sure it wasn't the 20 second timeout? I tested with logging another character same account and could see my original character briefly before it timed out.
I'll have to properly test tomorrow.

Ok, when you log in account without login any char and open a new wow and log in the same account = crash πŸ˜„

(I will try it to retest log with another char and edit this comment)
Edit: Yes, if you log with another char, the character1 instant logout, should stay "online" 1 minute
(but if you repeat you can have two wow open with the same account and diferent char...omg πŸ˜„ )

When you log in the same account the first session should be killed and the char should stay "online" 1 minute

oh dear, ok ill take another look at the code tomorrow.

try this patch:
https://gist.github.com/Langerz82/4052a9e829703b5dbaa7ce260e7984b7

Upon exiting the Server it threw an error. Not sure if its my changes or not, let me know.

I got instant logout from retail when opening the same account 2 times.
https://i.imgur.com/so7w3Ol.png

We need the packet that sends that proper notification, currently the patch just Kicks the other account off, and leaves the player in the world until the timer expires.
It may be blizzlike to insta-kick out but I think this avoids pvp exploiting.

I got instant logout while dueling, even 2 characters of same account ingame.
https://i.imgur.com/fYTsPdZ.jpg

@Aokromes reopen plz, make a proper test, don't close this because I tested in retail when I report it.(you get disconected from first client, but your char stay online 1 minute and in TC if you try this, char instant logout, I think not is dificult try it ok...)

@Langerz82 I will try it asap

I can confirm exactly the same, staying online for 1 minute

@Langerz82
I will test it better, but I think crash when you log another char of the same account and wait 10 seconds, dissapears old player and then crash.

@Jildor, Can you list the formal steps to crash the server with my changes. It will make it much easier for me to fix, thanks bro.

Oks, now I can't reproduce the crash πŸ˜„
But I see a problem, when you login with the same account, the online player stay 10 seconds online instead 1 minute, I don't know why

the time can be adjusted im more concerned that there is no dangling pointers I have missed.

I will test it better, but with 1 minute is more easy test it :smile:

ok give me some time. Atm im working on modding unreal tournament and it takes forever to compile lol.

I've updated the patch to include that change.

See:
https://gist.github.com/Langerz82/4052a9e829703b5dbaa7ce260e7984b7

Thx, I will test it in some situations and report feedback ASAP

@Jildor any crashes yet?

I continue testing, by the moment all ok, good work πŸ‘

if you want, you can make a PR to see what say the Devs and put if you need some expecific feedback in the PR description.

@Jildor can you try closing the server while there is a logged out connection but player still in the world? I think the server may not cleanly shutdown then, I got a crash around then but I'm not sure..

Oh yeah ill PR it soon gotta clean up a few things on my end.

I can't reproduce it, maybe you say https://github.com/TrinityCore/TrinityCore/issues/20032 ?

Was this page helpful?
0 / 5 - 0 ratings