Atrinik Client  4.0
item.h
Go to the documentation of this file.
1 /*************************************************************************
2  * Atrinik, a Multiplayer Online Role Playing Game *
3  * *
4  * Copyright (C) 2009-2014 Alex Tokar and Atrinik Development Team *
5  * *
6  * Fork from Crossfire (Multiplayer game for X-windows). *
7  * *
8  * This program is free software; you can redistribute it and/or modify *
9  * it under the terms of the GNU General Public License as published by *
10  * the Free Software Foundation; either version 2 of the License, or *
11  * (at your option) any later version. *
12  * *
13  * This program is distributed in the hope that it will be useful, *
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
16  * GNU General Public License for more details. *
17  * *
18  * You should have received a copy of the GNU General Public License *
19  * along with this program; if not, write to the Free Software *
20  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
21  * *
22  * The author can be reached at admin@atrinik.org *
23  ************************************************************************/
24 
30 #ifndef ITEM_H
31 #define ITEM_H
32 
34 #define NROF_ITEMS 50
35 
37 #define NAME_LEN 128
38 
43 typedef struct obj {
45  struct obj *next;
46 
47  /* Everything below will be cleared by memset() in
48  * object_remove(). */
49 
51  struct obj *prev;
52 
54  struct obj *env;
55 
57  struct obj *inv;
58 
61 
63  uint32_t tag;
64 
66  uint32_t nrof;
67 
69  double weight;
70 
72  int16_t face;
73 
75  uint16_t animation_id;
76 
78  uint16_t anim_speed;
79 
81  uint16_t anim_state;
82 
84  uint16_t last_anim;
85 
87  uint32_t flags;
88 
90  uint8_t itype;
91  uint8_t stype;
92 
94  uint8_t item_qua;
95 
97  uint8_t item_con;
98 
100  uint32_t item_skill_tag;
101 
103  uint8_t item_level;
104 
106  uint8_t direction;
107 
109  char glow[7];
110 
112  uint8_t glow_speed;
113 
115  uint8_t glow_state;
116 
118  uint8_t apply_action;
119 } object;
120 
121 #define TYPE_PLAYER 1
122 #define TYPE_BULLET 2
123 #define TYPE_ROD 3
124 #define TYPE_TREASURE 4
125 #define TYPE_POTION 5
126 #define TYPE_FOOD 6
127 #define TYPE_REGION_MAP 7
128 #define TYPE_BOOK 8
129 #define TYPE_CLOCK 9
130 #define TYPE_FBULLET 10
131 #define TYPE_FBALL 11
132 #define TYPE_LIGHTNING 12
133 #define TYPE_ARROW 13
134 #define TYPE_BOW 14
135 #define TYPE_WEAPON 15
136 #define TYPE_ARMOUR 16
137 #define TYPE_PEDESTAL 17
138 #define TYPE_ALTAR 18
139 #define TYPE_CONFUSION 19
140 #define TYPE_LOCKED_DOOR 20
141 #define TYPE_SPECIAL_KEY 21
142 #define TYPE_MAP 22
143 #define TYPE_DOOR 23
144 #define TYPE_KEY 24
145 #define TYPE_MMISSILE 25
146 #define TYPE_TIMED_GATE 26
147 #define TYPE_TRIGGER 27
148 #define TYPE_GRIMREAPER 28
149 #define TYPE_SPELL 29
150 #define TYPE_TRIGGER_BUTTON 30
151 #define TYPE_TRIGGER_ALTAR 31
152 #define TYPE_TRIGGER_PEDESTAL 32
153 #define TYPE_SHIELD 33
154 #define TYPE_HELMET 34
155 #define TYPE_PANTS 35
156 #define TYPE_MONEY 36
157 #define TYPE_CLASS 37
158 #define TYPE_GRAVESTONE 38
159 #define TYPE_AMULET 39
160 #define TYPE_PLAYERMOVER 40
161 #define TYPE_TELEPORTER 41
162 #define TYPE_CREATOR 42
163 #define TYPE_SKILL 43
164 #define TYPE_EXPERIENCE 44
165 #define TYPE_EARTHWALL 45
166 #define TYPE_GOLEM 46
167 #define TYPE_BOMB 47
168 #define TYPE_THROWN_OBJ 48
169 #define TYPE_BLINDNESS 49
170 #define TYPE_GOD 50
171 #define TYPE_DETECTOR 51
172 #define TYPE_SKILL_ITEM 52
173 #define TYPE_DEAD_OBJECT 53
174 #define TYPE_DRINK 54
175 #define TYPE_MARKER 55
176 #define TYPE_HOLY_ALTAR 56
177 #define TYPE_PLAYER_CHANGER 57
178 #define TYPE_BATTLEGROUND 58
179 #define TYPE_PEACEMAKER 59
180 #define TYPE_GEM 60
181 #define TYPE_FIRECHEST 61
182 #define TYPE_FIREWALL 62
183 #define TYPE_ANVIL 63
184 #define TYPE_CHECK_INV 64
185 #define TYPE_MOOD_FLOOR 65
186 #define TYPE_EXIT 66
187 #define TYPE_ENCOUNTER 67
188 #define TYPE_SHOP_FLOOR 68
189 #define TYPE_SHOP_MAT 69
190 #define TYPE_RING 70
191 #define TYPE_FLOOR 71
192 #define TYPE_FLESH 72
193 #define TYPE_INORGANIC 73
194 #define TYPE_LIGHT_APPLY 74
195 #define TYPE_LIGHTER 75
196 #define TYPE_TRAP_PART 76
197 #define TYPE_WALL 77
198 #define TYPE_LIGHT_SOURCE 78
199 #define TYPE_MISC_OBJECT 79
200 #define TYPE_MONSTER 80
201 #define TYPE_SPAWN_GENERATOR 81
202 #define TYPE_SPELLBOOK 85
203 #define TYPE_CLOAK 87
204 #define TYPE_CONE 88
205 #define TYPE_AURA 89
206 #define TYPE_SPINNER 90
207 #define TYPE_GATE 91
208 #define TYPE_BUTTON 92
209 #define TYPE_CF_HANDLE 93
210 #define TYPE_HOLE 94
211 #define TYPE_TRAPDOOR 95
212 #define TYPE_WORD_OF_RECALL 96
213 #define TYPE_PARAIMAGE 97
214 #define TYPE_SIGN 98
215 #define TYPE_BOOTS 99
216 #define TYPE_GLOVES 100
217 #define TYPE_CONVERTER 103
218 #define TYPE_BRACERS 104
219 #define TYPE_POISONING 105
220 #define TYPE_SAVEBED 106
221 #define TYPE_POISONCLOUD 107
222 #define TYPE_FIREHOLES 108
223 #define TYPE_WAND 109
224 #define TYPE_ABILITY 110
225 #define TYPE_SCROLL 111
226 #define TYPE_DIRECTOR 112
227 #define TYPE_GIRDLE 113
228 #define TYPE_FORCE 114
229 #define TYPE_POTION_EFFECT 115
230 #define TYPE_CLOSE_CON 121
231 #define TYPE_CONTAINER 122
232 #define TYPE_ARMOUR_IMPROVER 123
233 #define TYPE_WEAPON_IMPROVER 124
234 #define TYPE_SKILLSCROLL 130
235 #define TYPE_DEEP_SWAMP 138
236 #define TYPE_IDENTIFY_ALTAR 139
237 #define TYPE_CANCELLATION 141
238 #define TYPE_MENU 150
239 #define TYPE_BALL_LIGHTNING 151
240 #define TYPE_SWARM_SPELL 153
241 #define TYPE_RUNE 154
242 #define TYPE_POWER_CRYSTAL 156
243 #define TYPE_CORPSE 157
244 #define TYPE_DISEASE 158
245 #define TYPE_SYMPTOM 159
246 
247 #define F_ETHEREAL 0x0080
248 #define F_INVISIBLE 0x0100
249 
251 #define delete_object(tag) object_remove(object_find(tag))
252 
253 #endif
struct obj object
uint32_t item_skill_tag
Definition: item.h:100
Definition: item.h:43
char glow[7]
Definition: item.h:109
#define NAME_LEN
Definition: item.h:37
char s_name[NAME_LEN]
Definition: item.h:60
uint16_t animation_id
Definition: item.h:75
uint8_t glow_state
Definition: item.h:115
uint8_t item_level
Definition: item.h:103
uint32_t nrof
Definition: item.h:66
uint8_t item_qua
Definition: item.h:94
int16_t face
Definition: item.h:72
struct obj * prev
Definition: item.h:51
uint32_t tag
Definition: item.h:63
double weight
Definition: item.h:69
uint8_t direction
Definition: item.h:106
uint8_t glow_speed
Definition: item.h:112
uint8_t apply_action
Definition: item.h:118
struct obj * env
Definition: item.h:54
uint16_t last_anim
Definition: item.h:84
uint8_t item_con
Definition: item.h:97
struct obj * next
Definition: item.h:45
uint16_t anim_state
Definition: item.h:81
uint16_t anim_speed
Definition: item.h:78
uint8_t itype
Definition: item.h:90
struct obj * inv
Definition: item.h:57
uint32_t flags
Definition: item.h:87