--- deliantra/server/include/object.h 2006/12/25 11:25:49 1.68 +++ deliantra/server/include/object.h 2006/12/26 05:44:15 1.69 @@ -246,31 +246,31 @@ static vector objects; // not used yet, use first->next->... static object *first; // will be replaced by "objects" - static object *create (); - void copy_to (object *dst); - object *clone (); // create + copy_to + MTH static object *create (); + MTH void copy_to (object *dst); + MTH object *clone (); // create + copy_to void do_destroy (); void gather_callbacks (AV *&callbacks, event_type event) const; - void destroy (bool destroy_inventory = false); + MTH void destroy (bool destroy_inventory = false); // recursively destroy all objects in inventory, optionally dropping them to the ground instead - void destroy_inv (bool drop_to_ground = false); - void remove (); - object *insert (object *item); // insert into inventory + MTH void destroy_inv (bool drop_to_ground = false); + MTH void remove (); + MTH object *insert (object *item); // insert into inventory static bool can_merge_slow (object *op1, object *op2); // this is often used in time-critical code, so optimise - static bool can_merge (object *op1, object *op2) + MTH static bool can_merge (object *op1, object *op2) { return op1->value == op2->value && op1->name == op2->name && can_merge_slow (op1, op2); } - void set_owner (object *owner); + MTH void set_owner (object *owner); - void instantiate () + MTH void instantiate () { if (!uuid.seq) // HACK uuid = gen_uuid (); @@ -279,38 +279,38 @@ } // recalculate all stats - void update_stats (); - void roll_stats (); - void swap_stats (int a, int b); - void add_statbonus (); - void remove_statbonus (); - void drain_stat (); - void drain_specific_stat (int deplete_stats); - void change_luck (int value); + MTH void update_stats (); + MTH void roll_stats (); + MTH void swap_stats (int a, int b); + MTH void add_statbonus (); + MTH void remove_statbonus (); + MTH void drain_stat (); + MTH void drain_specific_stat (int deplete_stats); + MTH void change_luck (int value); // info must hold 256 * 3 bytes currently - const char *debug_desc (char *info) const; - const char *debug_desc () const; + MTH const char *debug_desc (char *info) const; + MTH const char *debug_desc () const; - bool is_weapon () const { return type == ARROW || type == BOW || type == WEAPON; } - bool is_armor () const { return type == ARMOUR || type == SHIELD || type == HELMET - || type == CLOAK || type == BOOTS || type == GLOVES - || type == BRACERS || type == GIRDLE; } - bool is_alive () const { return (type == PLAYER - || flag [FLAG_MONSTER] - || (flag [FLAG_ALIVE] && !flag [FLAG_GENERATOR] && type != DOOR)) - && !flag [FLAG_IS_A_TEMPLATE]; } - bool is_arrow () const { return type == ARROW - || (type == SPELL_EFFECT - && (subtype == SP_BULLET || subtype == SP_MAGIC_MISSILE)); } + MTH bool is_weapon () const { return type == ARROW || type == BOW || type == WEAPON; } + MTH bool is_armor () const { return type == ARMOUR || type == SHIELD || type == HELMET + || type == CLOAK || type == BOOTS || type == GLOVES + || type == BRACERS || type == GIRDLE; } + MTH bool is_alive () const { return (type == PLAYER + || flag [FLAG_MONSTER] + || (flag [FLAG_ALIVE] && !flag [FLAG_GENERATOR] && type != DOOR)) + && !flag [FLAG_IS_A_TEMPLATE]; } + MTH bool is_arrow () const { return type == ARROW + || (type == SPELL_EFFECT + && (subtype == SP_BULLET || subtype == SP_MAGIC_MISSILE)); } /* This return true if object has still randomitems which * could be expanded. */ - bool has_random_items () const { return randomitems && !flag [FLAG_IS_A_TEMPLATE]; } + MTH bool has_random_items () const { return randomitems && !flag [FLAG_IS_A_TEMPLATE]; } // returns the player that has this object in his inventory, or 0 - object *in_player () const + MTH object *in_player () const { for (object *op = env; op; op = op->env) if (op->type == PLAYER)