
03-01-2012, 06:42 AM
|
|
Malorian
|
 |
Join Date: May 2004
Posts: 5,289
|
|
|
I don't store any item data directly on clients on Maloria. What I do is that everytime I need to read the data of an item, I do a query from a weapon NPC called "CACHE" that retrieves the data from the SQL table, saves it on both clientside and serverside, and then returns said data with the query. If item data has already been queried by a player during the session and tries to query it again, I simply return the stored data.
Everytime the SQL database is updated with my item database tool, which only happens when I edit items, it sends a query to CACHE to update the data for all players that are online who have said item.
When it comes to owned items, I store them in a TStaticVar.
Stackable items (non-unique): player.items.ITEMIDENTIFIER
Non-stackable items (unique): player.items.UNIQUEITEMID
Subvars to each item includes identifier, id, quantity and some other misc. things - usually data that is unique to this particular item, such as skin, special properties added by crafting etc.
Cubes, if you want to study it indepth, just poke me when I'm online and I'll set you up. |
__________________
Follow my work on social media post-Graal: Updated august 2025.
|
Last edited by xXziroXx; 03-01-2012 at 06:59 AM..
|
|
|