2012-03-26, 12:00 PM
SaptaZapta Wrote:@Eos doesn't "propose" an item ID, he's looking at the leaked Brazil(?) MS server source code. He knows what MapleStory uses for item ID, unless it's been changed drastically since that version.
PServer creators can do whatever they please, they are not bound to Nexon's implementation.
As for database efficiency: a single integer unique-key is a lot easier on the engine than a key composed of at least 3 fields, as you propose. Even if it ends up being a long-long (64 bit) int. It doesn't take up any more space that way, either.
Ah I see that now. I hadn't read that thread before the point where Eos talked about using a Transaction to solve the duping.
The maximum value for long-long is really high as an unsigned value. I would think it could be enough to hold the ID. My concern would be whether or not the system recycles ID numbers or if it just continually counts upward. The game is large enough to eventually hit the integer limit, particularly since we know that every mob drops a whole lot more upon being killed than what you see on the screen. I would think that a dropped item on the screen would have a unique ID until you picked it up. Then if it was a stackable item, that ID would be destroyed by virtue of it becoming part of your inventory stack. But until then, it would have to be a unique item.
My 3 field comparison was outside of the key structure. You could do that without ever needing to index it. Given that the table does have Item IDs, they must not have it as a unique key if they can be duplicated. Perhaps this is why Eos says 'They already have item IDs. They're not using them. ' Perhaps indexing was too costly and they avoided it for speed or they simply have other coding faults that could interfere.

