Idea to stop dupes on closed bnet (d2/d3)
I've been on the WoW D3 forum theorycoding a way to prevent dupes. I've developed what I think is an airtight method. It involves a bit of creative thinking though. I'd thought I'd post it here to see what you guys think.
It would require a database rewrite.
You'd have to rethink what an item is and what a char is. Currently, we kinda view chars as these objects that own a collection of items. These items then get traded around between chars or fall on the ground. That structure allows duping to take place as items can be written to multiple char objects. Then you are forced to do things like a ruststorm, which uses so much system resources that its not employed much.
Instead, you have to turn things around and think of the items themselves as objects that own either a player or "the ground" or an NPC. They would be unique thanks to the footprint, and can only own one thing at a time. It would be impossible to assign one item to two players.
So instead of
charType Fenzalk {
Engima armor #43118
chipped skull #440039560
}
Your database will look like
itemType EnigmaArmor {
ID #43118
Owner Fenzalk
Location Fenzalk inventory
Status Exists (can be either exists or destroyed)
}
Now you simply can't dupe it. You cannot because we define the item-char relationship by a single variable assigned to the item object. There is only room for 1 owner. Can't have 2. Or 200. Its physically impossible.
Here is what happens when items own a player. Player A enters the game with a Zod. He drops it on the ground and desyncs with some attempt at a duping bug. Now HIS ITEMS revert to the previous ownership status. Of course, there is nothing to update the database with because nothing has changed. Technically, the Zod on the ground still recognizes Player A as who it owns and still thinks its in Player A's inventory. Now Player B picks up the Zod and exits the game. Now we update the Zod's info and make it own Player B. If Player A is in some other game when Player B exits a game with the Zod, Player A is informed he has a dupe and the item is immediately removed from Player As inventory when ownership status changes. If the item is lost in the process of cubing or when the game it exists in is closed, its status changes to destroyed, and cannot own anyone any longer.
Its when an ITEM exits the game, either via a char's inventory, a cubing, or a game closing, or a reset NPC shop, that ITS data is written to permanent storage.
I've been on the WoW D3 forum theorycoding a way to prevent dupes. I've developed what I think is an airtight method. It involves a bit of creative thinking though. I'd thought I'd post it here to see what you guys think.
It would require a database rewrite.
You'd have to rethink what an item is and what a char is. Currently, we kinda view chars as these objects that own a collection of items. These items then get traded around between chars or fall on the ground. That structure allows duping to take place as items can be written to multiple char objects. Then you are forced to do things like a ruststorm, which uses so much system resources that its not employed much.
Instead, you have to turn things around and think of the items themselves as objects that own either a player or "the ground" or an NPC. They would be unique thanks to the footprint, and can only own one thing at a time. It would be impossible to assign one item to two players.
So instead of
charType Fenzalk {
Engima armor #43118
chipped skull #440039560
}
Your database will look like
itemType EnigmaArmor {
ID #43118
Owner Fenzalk
Location Fenzalk inventory
Status Exists (can be either exists or destroyed)
}
Now you simply can't dupe it. You cannot because we define the item-char relationship by a single variable assigned to the item object. There is only room for 1 owner. Can't have 2. Or 200. Its physically impossible.
Here is what happens when items own a player. Player A enters the game with a Zod. He drops it on the ground and desyncs with some attempt at a duping bug. Now HIS ITEMS revert to the previous ownership status. Of course, there is nothing to update the database with because nothing has changed. Technically, the Zod on the ground still recognizes Player A as who it owns and still thinks its in Player A's inventory. Now Player B picks up the Zod and exits the game. Now we update the Zod's info and make it own Player B. If Player A is in some other game when Player B exits a game with the Zod, Player A is informed he has a dupe and the item is immediately removed from Player As inventory when ownership status changes. If the item is lost in the process of cubing or when the game it exists in is closed, its status changes to destroyed, and cannot own anyone any longer.
Its when an ITEM exits the game, either via a char's inventory, a cubing, or a game closing, or a reset NPC shop, that ITS data is written to permanent storage.