Using a mysql table for shops would be pointless really.
for player stock store them as an object itself, for main stock use something like an xml loader?
|
Anyone have any suggestions on how you could do it? The only way I know is by creating 30 od columns for item and amount but that could be a waste of space because some shops only have a few items
Using a mysql table for shops would be pointless really.
for player stock store them as an object itself, for main stock use something like an xml loader?
Like being said, storing shops in SQL won't benefit you much, but since you're almost doing everything in SQL, it is a reason to store them into.
What I actually prefer is using some simple format, till your server will be public, and I'll most likely convert it to a binary format.
The reason why I want to do this in mysql is so that I can update/add single shops whilst the server is online without loading the entire spawns or restarting.
I have a solution at the moment what works but It isn't the best. I store the default shop info in mysql such as name, general, currency and then I have another field stock which uses the same syntax as our current cfg files. The server loads this field and splits it by spaces.
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |