summaryrefslogtreecommitdiff
path: root/src/map/itemdb.h
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-07-11 16:32:37 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-07-11 16:32:37 +0000
commit6749d6567aa972b5cc46e1ed85986be21e2ec799 (patch)
tree4d28fd94577ad9183c9341f71fd961931faba416 /src/map/itemdb.h
parent1e844abc3fa269a504ba6610ac83224d9660ce22 (diff)
downloadhercules-6749d6567aa972b5cc46e1ed85986be21e2ec799.tar.gz
hercules-6749d6567aa972b5cc46e1ed85986be21e2ec799.tar.bz2
hercules-6749d6567aa972b5cc46e1ed85986be21e2ec799.tar.xz
hercules-6749d6567aa972b5cc46e1ed85986be21e2ec799.zip
- Coded @reset.
- Reenabled @changesex - Added function pet_create_egg which handles creating pet eggs correctly (when passed item id is indeed a valid petegg). Applied this on @createitem and getitem. - Cleaned up code of @item - Added define UNKNOWN_ITEM_ID (512 = apple) - Added IT_* enumation item_Types to identify said data from items. - Cleaned up the itemdb_isequip functions. itemdb_isequip will now return if the item is equipable by players, itemdb_isstackable returns if the item can be stacked, and itemdb_isidentified returns if the item should drop identified. - Added defines CARD0_PET/CARD0_FORGE/CARD0_CREATED to identify if a given item has "invalid" cards, added define function itemdb_isspecial to simplify this check. - Removed itemdb.c considering item ids above 20000 as invalid. - Cleaned up script commands getitem and card-counting related ones. - Cleaned up a bit more pc_isequip git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7613 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/itemdb.h')
-rw-r--r--src/map/itemdb.h30
1 files changed, 29 insertions, 1 deletions
diff --git a/src/map/itemdb.h b/src/map/itemdb.h
index a9b74b0ca..d8255ef5a 100644
--- a/src/map/itemdb.h
+++ b/src/map/itemdb.h
@@ -7,6 +7,32 @@
#include "map.h"
#define MAX_RANDITEM 10000
+enum {
+ IT_HEALING = 0,
+ IT_UNKNOWN, //1
+ IT_USABLE, //2
+ IT_ETC, //3
+ IT_WEAPON, //4
+ IT_ARMOR, //5
+ IT_CARD, //6
+ IT_PETEGG, //7
+ IT_PETARMOR,//8
+ IT_UNKNOWN2,//9
+ IT_AMMO, //10
+ IT_DELAYCONSUME,//11
+ IT_MAX
+} item_types;
+
+#define CARD0_FORGE 0x00FF
+#define CARD0_CREATE 0x00FE
+#define CARD0_PET ((short)0xFF00)
+
+//Marks if the card0 given is "special" (non-item id used to mark pets/created items. [Skotlex]
+#define itemdb_isspecial(i) (i == CARD0_FORGE || i == CARD0_CREATE || i == CARD0_PET)
+
+//Use apple for unknown items.
+#define UNKNOWN_ITEM_ID 512
+
struct item_data {
int nameid;
char name[ITEM_NAME_LENGTH],jname[ITEM_NAME_LENGTH];
@@ -106,7 +132,9 @@ int itemdb_isrestricted(struct item* item, int gmlv, int gmlv2, int (*func)(stru
int itemdb_isequip(int);
int itemdb_isequip2(struct item_data *);
-int itemdb_isequip3(int);
+int itemdb_isidentified(int);
+int itemdb_isstackable(int);
+int itemdb_isstackable2(struct item_data *);
// itemdb_equipマクロとitemdb_equippointとの違いは
// 前者が鯖側dbで定義された値そのものを返すのに対し