Pryaxis / TShock

☕️⚡️TShock provides Terraria servers with server-side characters, anti-cheat, and community management tools.
GNU General Public License v3.0
2.43k stars 382 forks source link

item duping with "Item Frame" wall mounted item #1039

Closed tysonstrange closed 8 years ago

tysonstrange commented 9 years ago

If you place an item frame on a wall somewhere, then just spam right click it dupes the item you have framed.

similar to the weapon rack issue

Patrikkk-zz commented 9 years ago

I tested this with TShock 4.3.7. Game says as if I got duplicate items, the number is increasing, (http://puu.sh/jbnvt/324187e4ec.jpg) but I only have that one item. So no duplicate. I also got an other person test this. They didn't get any duplicates either. (only the message as in my screenshot)

tysonstrange commented 9 years ago

If you have access to the area it works differently.

If there is an item frame in a protected region and a player without permission to the region tries to remove the item or add and remove an item it will duplicate.

I tested it in the new tshock as well and it seemsi to be ok with a few items too

Marcus101RR commented 9 years ago

So If it is not in a protected/unprotected region it works fine? I got to test that out.

hastinbe commented 9 years ago

I've come up with a couple different solutions. This one I wrote into TerrariaServer's cheat protection. It's important to note that TShock disables this in TerrariaServer so I've modified TShock too. Maybe someone can explain why it's disabled.

Here it is in action: Terraria ItemFrame cheat detection

TShockAPI commit for this: hastinbe/TShock@8958a3595935978649023ab74f4039218caf8d7a TerrariaAPI-Server commit for this: hastinbe/TerrariaAPI-Server@c007985d0b689beb033d6e506d55c204421b1fea

Any comments? @WhiteXZ @tylerjwatson @nicatronTg @Ijwu

Ijwu commented 9 years ago

@hastinbe I would rather have the fix be in TShock which seems to be causing this issue solely based on the fact that it has to due with protected region and item frame interaction. My guess is simply that it's letting the client have the item while resetting the item frame due to the fact that the client does not have permission to actually edit the item frame.

Using this assumption, possible solutions that I am in favor of include:

I would rather not have to enable TerrariaServer.exe's built in cheat-protection because it's been disabled for the lifetime of TShock and I have no idea how it would interact with our current protections. Not to mention that it may be an overlap in cheat protection and the tolerance in the EXE may be lower or not configurable as it is in TShock.

QuiCM commented 9 years ago

The item frame duping issue is likely much the same as the weapon rack duping issue which was fixed by black magic and messing with frames

QuiCM commented 8 years ago

Moved to https://github.com/NyxStudios/TShock/issues/1160