ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/include/object.h
(Generate patch)

Comparing deliantra/server/include/object.h (file contents):
Revision 1.59 by root, Tue Dec 19 05:41:21 2006 UTC vs.
Revision 1.60 by root, Wed Dec 20 09:14:22 2006 UTC

120 * This is typically the container that the object is in. 120 * This is typically the container that the object is in.
121 */ 121 */
122 object *ACC (RW, more); /* Pointer to the rest of a large body of objects */ 122 object *ACC (RW, more); /* Pointer to the rest of a large body of objects */
123 object *head; /* Points to the main object of a large body */ // NO ACC, perl semantics are different 123 object *head; /* Points to the main object of a large body */ // NO ACC, perl semantics are different
124 maptile *ACC (RW, map); /* Pointer to the map in which this object is present */ 124 maptile *ACC (RW, map); /* Pointer to the map in which this object is present */
125 client_container *seen_by; // seen by which player/container currently?
125}; 126};
126 127
127// these are being copied 128// these are being copied
128struct object_copy : attachable<object> 129struct object_copy : attachable<object>
129{ 130{
302 /* This return true if object has still randomitems which 303 /* This return true if object has still randomitems which
303 * could be expanded. 304 * could be expanded.
304 */ 305 */
305 bool has_random_items () const { return randomitems && !flags [FLAG_IS_A_TEMPLATE]; } 306 bool has_random_items () const { return randomitems && !flags [FLAG_IS_A_TEMPLATE]; }
306 307
308 // returns the player that has this object in his inventory, or 0
309 object *in_player () const
310 {
311 for (object *op = env; op; op = op->env)
312 if (op->type == PLAYER)
313 return op;
314
315 return 0;
316 }
317
307 // fully recursive iterator 318 // fully recursive iterator
308 struct iterator_base 319 struct iterator_base
309 { 320 {
310 object *item; 321 object *item;
311 322

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines