There was a need to issue items (things, adena, etc.) in the game Lineage2. The question arose: in the base of the game server (server in java ) there is a table items in which all items (things, resources, money, etc.) that players have are recorded. The value in the object_id column, as I understand it, is a unique thing id , which should be equal to the maximum object_id+1 for a new thing. The problem is that at one moment in the game a lot of these object_id can be generated and not all of them go to the items table. And even if you look at the items table and knock out a piece of a game monster, for example, when a rollout comes out, it has one оbject_id (and is in another table - itemsonground ), after you itemsonground up another object_id , and even when you quickly pick up and I'm alone on the server, then the object_id lifted item is not equal to the object_id-1 knocked out. And maybe on +30 , +59 , etc. differ. And if you do not assign this object_id , then you can issue the thing only once, after that, when you execute the next sql query, an exception arises that object_id have primary key..... in general, this is not the case anymore. If you had a similar experience, write how you did it.
on the photo table in navicat

  • one
    Most likely somewhere there should be a reference book of all the items to which other tables refer. On the screenshot there is a column item_id , maybe you should try spinning from it? - Viktorov
  • And maybe the author of the assembly to find out? After all, the assemblies are different and their tables in the database are even different and even separated into several bases ..... some itemsonground .... - Alexey Shimansky
  • I understand that there are no commands for this assembly anymore. From item_id also vryatli, since the same things have different object_id - Sergey White
  • In general, so far nothing is better than taking the maximum object_id from the base and adding to it (in my case, +11), did not come up with it. And then it turned out to write to the base for the issued item. - Sergey White

0