duysqubix / scrolls

elder scrolls mud based on UESRPG3e
3 stars 2 forks source link

Next available vnum doesn’t account for multiple builders #38

Closed duysqubix closed 3 years ago

duysqubix commented 3 years ago

When a new object, room, etc that utilizes vnums are added, it generates the new vnum by getting the Max value of the blueprint database and incrementing by 1. However, that exists in memory only when assigned. Meaning that if more than one builder both create a new entity that isn't saved yet they could run into a data race whereby they both would be editing a entity with the same vnum.

Must find a way to that when a builder calls , next available vnum that it won't collide