
03-11-2007, 02:32 AM
|
|
Incubator
|
 |
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
|
|
|
Bah, don't use clientr flags for storing item data in anything but an extremely simple system, those should only reflect item data for large systems.
In my system I load all item data into TStaticVar's on the serverside. They're designed to only work in a mudcontainer object, if you want the variables for opening the inventory you use:
MudContainerObject.reflectInvObjects(str location, boo delete?);
Location is relative to the container so for me, the default is "this.player.clientr.mud.item" because in the container object this.player is a reference to the TServerPlayer object. This would write all items to that location ending up with clientr.mud.item<ItemID#>=<important data array>.
The reflected data only contains important things used when displaying the inventory, like the item's fullname which is calculated from the prefix, suffix, singular, and plural names.
The way I have mine set up I could rather easily open the objects in other containers (player's inventories or other world objects) by doing something like: findcontainer("player","RandomAccount").reflectInv Objects("MudPlayer_Inverness.player.clientr.mud.it emsof_RandomAccount", false);
And yes it may be long-winded but its a base level function and can be shortened for specific things with several higher-level functions.
And yes, I am bragging about my leet system :P
But my thanks go to Stefan for the idea. |
|
|
|