2012-03-26, 10:58 AM
SaptaZapta Wrote:Generating unique ID's is a pretty basic function in Oracle, which provides a "sequence" entity that auto-increments every time it is fetched. I don't know whether MSSQL has a similar entity, but it's not that hard to implement one yourself.
Using time-stamps, or any non-unique "item ID" completely defeats the purpose of using the item ID to know what is in your inventory. The reason dupes don't break the game is that all items with the same ID are similar or even identical (e.g., all items with ID 123123123 are a VIP Bow). If you use timestamps or the like, you'll get weird situations like trying to equip a stack of potions.
My suggestion is that the Time Stamp is used in conjunction with other fields. We already know there is an Item ID that denotes what the item itself is (Just look at the Nebulite table). The actual game code probably handles how and what those items can and can't do. The player's inventory table itself is going to have the Item ID that references the game's item table. Then it would have a series of additional fields, naturally. There would be a stack field to show if it is stackable (like a max stack size or similar where unstackable items have a max stack of 1). It must have fields for stats since they can be different per item, and on and on.
What I am saying is that the game could use a Time Stamp field on equipment and other items in addition to the fields for identification purposes. It doesn't have to be truly unique, but it would be unique enough for Nexon's general purposes. Eos proposes a unique Item id like you mention. It's essentially a completely unique number for every single item. I believe this would be slow and cumbersome for the engine because thousands of items are created simultaneously on the server at once and it would have to keep a very, very large number. (I am not saying this isn't possible, I just think they may have avoided it because of database overhead. We have already seen inefficient DB coding in their system as it is.) Time Stamp (to the microsecond) + Item ID + Server ID would be quite unique.
@Phoenix - Storage wouldn't be a significant enough event to create a fundamental item change. An MTS Transfer would probably do it. A trade between characters would not do it. It would have to be an event significant enough to warrant considering the item to be newly created.
I suppose that PServer creators must have the database dictionary in order to run their servers. I wouldn't mind getting some questions answered from them.
Would like to say more but I am getting busy here at the office.

