popstarfreas / Dimensions

The load-balancing and routing service for Terraria Servers
MIT License
41 stars 16 forks source link

Prefix's being wiped/replaced when switching worlds. #32

Open NeutralShock opened 6 years ago

NeutralShock commented 6 years ago

Every 5 or 6 times a player switches dimensions their inventory prefix's will be replaced with their single player varients.

For example, on my SSC character I had a godly xeno popper and accessories with defence/dmg prefix's. On my non ssc character(Which I don't use) it has only the starter items with a tiny copper shortsword. After a few dimension changes, my SSC character has a tiny xeno popper and no prefix's on anything else.

Currently using version 4.12 but this issue also happened on 4.11

popstarfreas commented 6 years ago

Is this a consistent issue? Is there a way to reproduce this consistently? Also what dimension changes? SSC->Non SSC? Is it always that the prefixes are from the singleplayer character?

NeutralShock commented 6 years ago

Yes it is a consistent issue and is reproducible. The dimension change is from SSC->SSC Yes the prefixes are always from the single player character.

NeutralShock commented 6 years ago

Just tested with a clean minishark and it replaced it with the "tiny" prefix. capture Switched worlds then... capture2

And this is my NON ssc characters inventory. Notice the tiny capture3 pickaxe being in the same slot.

popstarfreas commented 6 years ago

Could you give a concise set of steps to reproduce this issue exactly?

NeutralShock commented 6 years ago

Sure.

  1. In single player or a Non-SSC server, acquire an item with a prefix and put it in the hotbar.
  2. Join an SSC enabled server, acquire an item, and put that item in the same slot the Non-SSC characters item was.
  3. Switch between two or more SSC enabled servers until the prefix is replaced. It may take a few switches but usually doesn't take anymore than 5 tries.

Note: If the Non-SSC characters slot has no prefix or that space is empty, then when the bug occurs it will set the SSC characters prefix to nothing. An example is with accessories. If the Non-SSC character has no accessories but the SSC one does with prefixes, then when the bug occurs it will wipe the SSC characters accessory prefixes.

popstarfreas commented 6 years ago

I did a bunch of swapping and got it to happen about twice, after applying the change from prefixissue branch I couldn't get it to happen again. However, it is to be noted that it has been reported the change doesn't fix all issues related to prefixes. Someone said on their server they still had some issue with prefixes changing.

The only questionable thing is how this happens in the first place. All dimensions does is send the player's inventory to the server in the normal place when joining as well as restore the inventory of the player when world info is received in the joining process. So it seems there must be something that happens between the client and terraria server that causes this which dimensions doesn't do itself.

I put up a release that has the prefixissue change: here

NeutralShock commented 6 years ago

Unfortunately players are still reporting that their prefixes are getting wiped :( but it seems much less common. Hmm