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.34 by root, Wed Sep 13 02:05:19 2006 UTC vs.
Revision 1.35 by root, Thu Sep 14 01:12:28 2006 UTC

113}; 113};
114 114
115// these are being copied 115// these are being copied
116struct object_copy : attachable<object> 116struct object_copy : attachable<object>
117{ 117{
118 refptr<object> ACC (RW, owner); /* Pointer to the object which controls this one */
119 shstr ACC (RW, name); /* The name of the object, obviously... */ 118 shstr ACC (RW, name); /* The name of the object, obviously... */
120 shstr ACC (RW, name_pl); /* The plural name of the object */ 119 shstr ACC (RW, name_pl); /* The plural name of the object */
121 shstr ACC (RW, title); /* Of foo, etc */ 120 shstr ACC (RW, title); /* Of foo, etc */
122 shstr ACC (RW, race); /* human, goblin, dragon, etc */ 121 shstr ACC (RW, race); /* human, goblin, dragon, etc */
123 shstr ACC (RW, slaying); /* Which race to do double damage to */ 122 shstr ACC (RW, slaying); /* Which race to do double damage to */
126 shstr ACC (RW, msg); /* If this is a book/sign/magic mouth/etc */ 125 shstr ACC (RW, msg); /* If this is a book/sign/magic mouth/etc */
127 shstr ACC (RW, lore); /* Obscure information about this object, */ 126 shstr ACC (RW, lore); /* Obscure information about this object, */
128 /* To get put into books and the like. */ 127 /* To get put into books and the like. */
129 shstr ACC (RW, materialname); /* specific material name */ 128 shstr ACC (RW, materialname); /* specific material name */
130 shstr ACC (RW, custom_name); /* Custom name assigned by player */ 129 shstr ACC (RW, custom_name); /* Custom name assigned by player */
130 refptr<object> ACC (RW, owner); /* Pointer to the object which controls this one */
131 refptr<object> ACC (RW, enemy); /* Monster/player to follow even if not closest */
132 refptr<object> ACC (RW, attacked_by); /* This object start to attack us! only player & monster */
133 refptr<object> ACC (RW, chosen_skill); /* the skill chosen to use */
134 refptr<object> ACC (RW, spellitem); /* Spell ability monster is choosing to use */
135 refptr<object> ACC (RW, spell); /* Spell that was being cast */
136 refptr<object> ACC (RW, current_weapon); /* Pointer to the weapon currently used */
131}; 137};
132 138
133// these are being copied and also cleared 139// these are being copied and also cleared
134struct object_pod 140struct object_pod
135{ 141{
170 sint32 ACC (RW, weight); /* Attributes of the object */ 176 sint32 ACC (RW, weight); /* Attributes of the object */
171 sint32 ACC (RW, weight_limit); /* Weight-limit of object */ 177 sint32 ACC (RW, weight_limit); /* Weight-limit of object */
172 sint32 ACC (RW, carrying); /* How much weight this object contains */ 178 sint32 ACC (RW, carrying); /* How much weight this object contains */
173 living ACC (RO, stats); /* Str, Con, Dex, etc */ 179 living ACC (RO, stats); /* Str, Con, Dex, etc */
174 sint64 ACC (RW, perm_exp); /* Permanent exp */ 180 sint64 ACC (RW, perm_exp); /* Permanent exp */
175 struct object *ACC (RW, current_weapon); /* Pointer to the weapon currently used */
176 uint32 ACC (RW, weapontype); /* type of weapon */ 181 uint32 ACC (RW, weapontype); /* type of weapon */
177 uint32 ACC (RW, tooltype); /* type of tool or build facility */ 182 uint32 ACC (RW, tooltype); /* type of tool or build facility */
178 sint8 body_info[NUM_BODY_LOCATIONS]; /* body info as loaded from the file */ 183 sint8 body_info[NUM_BODY_LOCATIONS]; /* body info as loaded from the file */
179 sint8 body_used[NUM_BODY_LOCATIONS]; /* Calculated value based on items equipped */ 184 sint8 body_used[NUM_BODY_LOCATIONS]; /* Calculated value based on items equipped */
180 /* See the doc/Developers/objects for more info about body locations */ 185 /* See the doc/Developers/objects for more info about body locations */
181 186
182 /* Following mostly refers to fields only used for monsters */ 187 /* Following mostly refers to fields only used for monsters */
183 tag_t ACC (RW, ownercount); /* What count the owner had (in case owner has been freed) *///TODO: remove/fix 188 tag_t ACC (RW, ownercount); /* What count the owner had (in case owner has been freed) *///TODO: remove/fix
184 struct object *ACC (RW, enemy); /* Monster/player to follow even if not closest */
185 struct object *ACC (RW, attacked_by); /* This object start to attack us! only player & monster */
186 tag_t ACC (RW, attacked_by_count); /* the tag of attacker, so we can be sure */ 189 tag_t ACC (RW, attacked_by_count); /* the tag of attacker, so we can be sure */
187 struct treasureliststruct *ACC (RW, randomitems); /* Items to be generated */
188 struct object *ACC (RW, chosen_skill); /* the skill chosen to use */
189 uint32 ACC (RW, hide); /* The object is hidden, not invisible */ 190 uint32 ACC (RW, hide); /* The object is hidden, not invisible */
190 /* changes made by kholland@sunlab.cit.cornell.edu */ 191 /* changes made by kholland@sunlab.cit.cornell.edu */
191 /* allows different movement patterns for attackers */ 192 /* allows different movement patterns for attackers */
192 sint32 ACC (RW, move_status); /* What stage in attack mode */ 193 sint32 ACC (RW, move_status); /* What stage in attack mode */
193 uint16 ACC (RW, attack_movement); /* What kind of attack movement */ 194 uint16 ACC (RW, attack_movement); /* What kind of attack movement */
194 uint16 ACC (RW, run_away); /* Monster runs away if it's hp goes below this percentage. */ 195 uint16 ACC (RW, run_away); /* Monster runs away if it's hp goes below this percentage. */
195 struct object *ACC (RW, spellitem); /* Spell ability monster is choosing to use */
196 float ACC (RW, expmul); /* needed experience = (calc_exp*expmul) - means some */ 196 float ACC (RW, expmul); /* needed experience = (calc_exp*expmul) - means some */
197 /* races/classes can need less/more exp to gain levels */ 197 /* races/classes can need less/more exp to gain levels */
198 198
199 /* Spell related information, may be useful elsewhere 199 /* Spell related information, may be useful elsewhere
200 * Note that other fields are used - these files are basically 200 * Note that other fields are used - these files are basically
201 * only used in spells. 201 * only used in spells.
202 */ 202 */
203 sint16 ACC (RW, duration); /* How long the spell lasts */ 203 sint16 ACC (RW, duration); /* How long the spell lasts */
204 sint16 ACC (RW, casting_time); /* time left before spell goes off */ 204 sint16 ACC (RW, casting_time); /* time left before spell goes off */
205 uint16 ACC (RW, start_holding); 205 uint16 ACC (RW, start_holding);
206 struct object *ACC (RW, spell); /* Spell that was being cast */
207 char *ACC (RW, spellarg); 206 char *ACC (RW, spellarg);
208 uint8 ACC (RW, duration_modifier); /* how level modifies duration */ 207 uint8 ACC (RW, duration_modifier); /* how level modifies duration */
209 uint8 ACC (RW, dam_modifier); /* How going up in level effects damage */ 208 uint8 ACC (RW, dam_modifier); /* How going up in level effects damage */
210 sint8 ACC (RW, range); /* Range of the spell */ 209 sint8 ACC (RW, range); /* Range of the spell */
211 uint8 ACC (RW, range_modifier); /* How going up in level effects range */ 210 uint8 ACC (RW, range_modifier); /* How going up in level effects range */
212 211
213 /* Following are values used by any object */ 212 /* Following are values used by any object */
213 struct treasureliststruct *ACC (RW, randomitems); /* Items to be generated */
214 struct archetype *ACC (RW, arch); /* Pointer to archetype */ 214 struct archetype *ACC (RW, arch); /* Pointer to archetype */
215 struct archetype *ACC (RW, other_arch); /* Pointer used for various things - mostly used for what */ 215 struct archetype *ACC (RW, other_arch); /* Pointer used for various things - mostly used for what */
216 key_value *key_values; /* Fields not explictly known by the loader. */
216 /* this objects turns into or what this object creates */ 217 /* this objects turns into or what this object creates */
217 uint32 flags[4]; /* various flags */ 218 uint32 flags[4]; /* various flags */
218 uint16 ACC (RW, animation_id); /* An index into the animation array */ 219 uint16 ACC (RW, animation_id); /* An index into the animation array */
219 uint8 ACC (RW, anim_speed); /* ticks between animation-frames */ 220 uint8 ACC (RW, anim_speed); /* ticks between animation-frames */
220 uint8 ACC (RW, last_anim); /* last sequence used to draw face */ 221 uint8 ACC (RW, last_anim); /* last sequence used to draw face */
227 MoveType ACC (RW, move_allow); /* What movement types explicitly allowd */ 228 MoveType ACC (RW, move_allow); /* What movement types explicitly allowd */
228 MoveType ACC (RW, move_on); /* Move types affected moving on to this space */ 229 MoveType ACC (RW, move_on); /* Move types affected moving on to this space */
229 MoveType ACC (RW, move_off); /* Move types affected moving off this space */ 230 MoveType ACC (RW, move_off); /* Move types affected moving off this space */
230 MoveType ACC (RW, move_slow); /* Movement types this slows down */ 231 MoveType ACC (RW, move_slow); /* Movement types this slows down */
231 float ACC (RW, move_slow_penalty); /* How much this slows down the object */ 232 float ACC (RW, move_slow_penalty); /* How much this slows down the object */
232 key_value *key_values; /* Fields not explictly known by the loader. */
233}; 233};
234 234
235struct object : zero_initialised, object_keep, object_copy, object_pod 235struct object : zero_initialised, object_keep, object_copy, object_pod
236{ 236{
237 static object *create (); 237 static object *create ();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines