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.109 by root, Sat Apr 21 16:56:32 2007 UTC vs.
Revision 1.114 by root, Thu May 3 09:26:45 2007 UTC

295 MTH void drain_specific_stat (int deplete_stats); 295 MTH void drain_specific_stat (int deplete_stats);
296 MTH void change_luck (int value); 296 MTH void change_luck (int value);
297 297
298 // info must hold 256 * 3 bytes currently 298 // info must hold 256 * 3 bytes currently
299 const char *debug_desc (char *info) const; 299 const char *debug_desc (char *info) const;
300 MTH const char *debug_desc () const; 300 MTH const char *debug_desc () const; // uses at least 3 round-robin buffers
301 const char *debug_desc2 () const; // another debug_desc, pure convinience function
302 const char *flag_desc (char *desc, int len) const; 301 const char *flag_desc (char *desc, int len) const;
303 302
304 int number_of () const 303 int number_of () const
305 { 304 {
306 return nrof ? nrof : 1; 305 return nrof ? nrof : 1;
332 || (flag [FLAG_ALIVE] && !flag [FLAG_GENERATOR] && type != DOOR)) 331 || (flag [FLAG_ALIVE] && !flag [FLAG_GENERATOR] && type != DOOR))
333 && !flag [FLAG_IS_A_TEMPLATE]; } 332 && !flag [FLAG_IS_A_TEMPLATE]; }
334 MTH bool is_arrow () const { return type == ARROW 333 MTH bool is_arrow () const { return type == ARROW
335 || (type == SPELL_EFFECT 334 || (type == SPELL_EFFECT
336 && (subtype == SP_BULLET || subtype == SP_MAGIC_MISSILE)); } 335 && (subtype == SP_BULLET || subtype == SP_MAGIC_MISSILE)); }
336 MTH bool is_range () const { return type == BOW || type == ROD || type == WAND || type == HORN; }
337 337
338 MTH bool has_active_speed () const { return FABS(speed) >= MIN_ACTIVE_SPEED; } 338 MTH bool has_active_speed () const { return FABS(speed) >= MIN_ACTIVE_SPEED; }
339 339
340 // temporary: wether the object can be saved in a map file 340 // temporary: wether the object can be saved in a map file
341 // contr => is a player 341 // contr => is a player
362 MTH object *head_ () 362 MTH object *head_ ()
363 { 363 {
364 return head ? head : this; 364 return head ? head : this;
365 } 365 }
366 366
367 MTH std::string long_desc (object *who = 0);
368 MTH std::string describe_monster (object *who = 0);
369 MTH std::string describe_item (object *who = 0);
370 MTH std::string describe (object *who = 0);
371
367 // If this object has no extra parts but should have them, 372 // If this object has no extra parts but should have them,
368 // add them, effectively expanding heads into multipart 373 // add them, effectively expanding heads into multipart
369 // objects. This method only works on objects not inserted 374 // objects. This method only works on objects not inserted
370 // anywhere. 375 // anywhere.
371 void expand_tail (); 376 MTH void expand_tail ();
377
378 MTH void create_treasure (treasurelist *tl, int flags = 0);
372 379
373 // insert object at same map position as 'where' 380 // insert object at same map position as 'where'
374 // handles both inventory and map "positions" 381 // handles both inventory and map "positions"
375 MTH object *insert_at (object *where, object *originator = 0, int flags = 0); 382 MTH object *insert_at (object *where, object *originator = 0, int flags = 0);
376 383
380 MTH void deactivate_recursive (); 387 MTH void deactivate_recursive ();
381 388
382 // set the givne flag on all objects in the inventory recursively 389 // set the givne flag on all objects in the inventory recursively
383 MTH void set_flag_inv (int flag, int value = 1); 390 MTH void set_flag_inv (int flag, int value = 1);
384 391
385 void enter_exit (object *exit);//PERL 392 void enter_exit (object *exit);//Perl
386 MTH void enter_map (maptile *newmap, int x, int y); 393 MTH void enter_map (maptile *newmap, int x, int y);
387 394
388 // returns the mapspace this object is in 395 // returns the mapspace this object is in
389 mapspace &ms () const; 396 mapspace &ms () const;
390 397

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines