--- deliantra/server/include/object.h 2007/05/12 16:06:42 1.120 +++ deliantra/server/include/object.h 2007/05/14 21:32:26 1.122 @@ -33,14 +33,14 @@ typedef int tag_t; enum { + body_skill, + body_combat, body_range, body_shield, - body_combat, body_arm, body_torso, body_head, body_neck, - body_skill, body_finger, body_shoulder, body_foot, @@ -50,6 +50,13 @@ NUM_BODY_LOCATIONS }; +enum slottype_t +{ + slot_none, + slot_combat, + slot_ranged, +}; + /* See common/item.c */ typedef struct Body_Locations @@ -273,6 +280,7 @@ static object *read (object_thawer &f, maptile *map = 0); // map argument due to toal design bogosity, must go. bool write (object_freezer &f); + MTH int slottype () const; MTH static object *create (); object &operator =(const object &src); MTH void copy_to (object *dst); @@ -293,7 +301,7 @@ // move this object to the top of its env's inventory to speed up // searches for it. - MTH void inv_splay () + MTH object *inv_splay () { if (env && env->inv != this) { @@ -305,6 +313,8 @@ below->above = this; env->inv = this; } + + return this; } static bool can_merge_slow (object *op1, object *op2); @@ -526,6 +536,11 @@ struct oblinkpt *next; } oblinkpt; +object *find_skill_by_name (object *who, const char *name); +object *find_skill_by_name (object *who, const shstr &sh); +object *find_skill_by_number (object *who, int skillno); +int change_skill (object *who, object *new_skill, int flag); + /* * The archetype structure is a set of rules on how to generate and manipulate * objects which point to archetypes.