summaryrefslogtreecommitdiff
path: root/src/map/itemdb.h
diff options
context:
space:
mode:
authorbrianluau <brianluau@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-12-05 02:53:33 +0000
committerbrianluau <brianluau@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-12-05 02:53:33 +0000
commit60a426c0742b3e7d8c5b557c7578df6eeeea377b (patch)
tree5d01f9ccc2798309f9b13f07c0096ed97c6a85c8 /src/map/itemdb.h
parent621db2441f69736a6c8f10d26bf966d5414fac74 (diff)
downloadhercules-60a426c0742b3e7d8c5b557c7578df6eeeea377b.tar.gz
hercules-60a426c0742b3e7d8c5b557c7578df6eeeea377b.tar.bz2
hercules-60a426c0742b3e7d8c5b557c7578df6eeeea377b.tar.xz
hercules-60a426c0742b3e7d8c5b557c7578df6eeeea377b.zip
- Undid r16968: SVN Replaced with source:/trunk/src/@16966 (tid:74924).
[16969:16991/trunk/src/] will be re-committed in the next 24 hours. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16992 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/itemdb.h')
-rw-r--r--src/map/itemdb.h226
1 files changed, 113 insertions, 113 deletions
diff --git a/src/map/itemdb.h b/src/map/itemdb.h
index d18c35b3a..4d4b62818 100644
--- a/src/map/itemdb.h
+++ b/src/map/itemdb.h
@@ -11,28 +11,28 @@
// 32k array entries in array (the rest goes to the db)
#define MAX_ITEMDB 0x8000
-#define MAX_RANDITEM 11000
+#define MAX_RANDITEM 11000
// The maximum number of item delays
-#define MAX_ITEMDELAYS 10
+#define MAX_ITEMDELAYS 10
-#define MAX_SEARCH 5 //Designed for search functions, species max number of matches to display.
+#define MAX_SEARCH 5 //Designed for search functions, species max number of matches to display.
/* maximum amount of items a combo may require */
#define MAX_ITEMS_PER_COMBO 6
enum item_itemid {
- ITEMID_EMPERIUM = 714,
- ITEMID_YELLOW_GEMSTONE = 715,
- ITEMID_RED_GEMSTONE = 716,
- ITEMID_BLUE_GEMSTONE = 717,
- ITEMID_TRAP = 1065,
- ITEMID_STONE = 7049,
- ITEMID_SKULL_ = 7420,
- ITEMID_TOKEN_OF_SIEGFRIED = 7621,
- ITEMID_TRAP_ALLOY = 7940,
- ITEMID_ANCILLA = 12333,
- ITEMID_REINS_OF_MOUNT = 12622,
+ ITEMID_EMPERIUM = 714,
+ ITEMID_YELLOW_GEMSTONE = 715,
+ ITEMID_RED_GEMSTONE = 716,
+ ITEMID_BLUE_GEMSTONE = 717,
+ ITEMID_TRAP = 1065,
+ ITEMID_STONE = 7049,
+ ITEMID_SKULL_ = 7420,
+ ITEMID_TOKEN_OF_SIEGFRIED = 7621,
+ ITEMID_TRAP_ALLOY = 7940,
+ ITEMID_ANCILLA = 12333,
+ ITEMID_REINS_OF_MOUNT = 12622,
};
/**
@@ -40,33 +40,33 @@ enum item_itemid {
**/
enum {
- ITEMID_NAUTHIZ = 12725,
- ITEMID_RAIDO,
- ITEMID_BERKANA,
- ITEMID_ISA,
- ITEMID_OTHILA,
- ITEMID_URUZ,
- ITEMID_THURISAZ,
- ITEMID_WYRD,
- ITEMID_HAGALAZ,
+ ITEMID_NAUTHIZ = 12725,
+ ITEMID_RAIDO,
+ ITEMID_BERKANA,
+ ITEMID_ISA,
+ ITEMID_OTHILA,
+ ITEMID_URUZ,
+ ITEMID_THURISAZ,
+ ITEMID_WYRD,
+ ITEMID_HAGALAZ,
} rune_list;
/**
* Mechanic
**/
enum {
- ITEMID_ACCELERATOR = 2800,
- ITEMID_HOVERING_BOOSTER,
- ITEMID_SUICIDAL_DEVICE,
- ITEMID_SHAPE_SHIFTER,
- ITEMID_COOLING_DEVICE,
- ITEMID_MAGNETIC_FIELD_GENERATOR,
- ITEMID_BARRIER_BUILDER,
- ITEMID_REPAIR_KIT,
- ITEMID_CAMOUFLAGE_GENERATOR,
- ITEMID_HIGH_QUALITY_COOLER,
- ITEMID_SPECIAL_COOLER,
-} mecha_item_list;
+ ITEMID_ACCELERATOR = 2800,
+ ITEMID_HOVERING_BOOSTER,
+ ITEMID_SUICIDAL_DEVICE,
+ ITEMID_SHAPE_SHIFTER,
+ ITEMID_COOLING_DEVICE,
+ ITEMID_MAGNETIC_FIELD_GENERATOR,
+ ITEMID_BARRIER_BUILDER,
+ ITEMID_REPAIR_KIT,
+ ITEMID_CAMOUFLAGE_GENERATOR,
+ ITEMID_HIGH_QUALITY_COOLER,
+ ITEMID_SPECIAL_COOLER,
+ } mecha_item_list;
//The only item group required by the code to be known. See const.txt for the full list.
#define IG_FINDINGORE 6
@@ -85,82 +85,82 @@ enum {
#define UNKNOWN_ITEM_ID 512
struct item_data {
- int nameid;
- char name[ITEM_NAME_LENGTH],jname[ITEM_NAME_LENGTH];
-
- //Do not add stuff between value_buy and view_id (see how getiteminfo works)
- int value_buy;
- int value_sell;
- int type;
- int maxchance; //For logs, for external game info, for scripts: Max drop chance of this item (e.g. 0.01% , etc.. if it = 0, then monsters don't drop it, -1 denotes items sold in shops only) [Lupus]
- int sex;
- int equip;
- int weight;
- int atk;
- int def;
- int range;
- int slot;
- int look;
- int elv;
- int wlv;
- int view_id;
+ int nameid;
+ char name[ITEM_NAME_LENGTH],jname[ITEM_NAME_LENGTH];
+
+ //Do not add stuff between value_buy and view_id (see how getiteminfo works)
+ int value_buy;
+ int value_sell;
+ int type;
+ int maxchance; //For logs, for external game info, for scripts: Max drop chance of this item (e.g. 0.01% , etc.. if it = 0, then monsters don't drop it, -1 denotes items sold in shops only) [Lupus]
+ int sex;
+ int equip;
+ int weight;
+ int atk;
+ int def;
+ int range;
+ int slot;
+ int look;
+ int elv;
+ int wlv;
+ int view_id;
#ifdef RENEWAL
- int matk;
- int elvmax;/* maximum level for this item */
+ int matk;
+ int elvmax;/* maximum level for this item */
#endif
- int delay;
- //Lupus: I rearranged order of these fields due to compatibility with ITEMINFO script command
- // some script commands should be revised as well...
- unsigned int class_base[3]; //Specifies if the base can wear this item (split in 3 indexes per type: 1-1, 2-1, 2-2)
- unsigned class_upper : 4; //Specifies if the upper-type can equip it (bitfield, 1: normal, 2: upper, 3: baby,4:third)
- struct {
- unsigned short chance;
- int id;
- } mob[MAX_SEARCH]; //Holds the mobs that have the highest drop rate for this item. [Skotlex]
- struct script_code *script; //Default script for everything.
- struct script_code *equip_script; //Script executed once when equipping.
- struct script_code *unequip_script;//Script executed once when unequipping.
- struct {
- unsigned available : 1;
- short no_equip;
- unsigned no_refine : 1; // [celest]
- unsigned delay_consume : 1; // Signifies items that are not consumed immediately upon double-click [Skotlex]
- unsigned trade_restriction : 9; //Item restrictions mask [Skotlex]
- unsigned autoequip: 1;
- unsigned buyingstore : 1;
- } flag;
- struct {// item stacking limitation
- unsigned short amount;
- unsigned int inventory:1;
- unsigned int cart:1;
- unsigned int storage:1;
- unsigned int guildstorage:1;
- } stack;
- short gm_lv_trade_override; //GM-level to override trade_restriction
- /* bugreport:309 */
- struct item_combo **combos;
- unsigned char combos_count;
+ int delay;
+//Lupus: I rearranged order of these fields due to compatibility with ITEMINFO script command
+// some script commands should be revised as well...
+ unsigned int class_base[3]; //Specifies if the base can wear this item (split in 3 indexes per type: 1-1, 2-1, 2-2)
+ unsigned class_upper : 4; //Specifies if the upper-type can equip it (bitfield, 1: normal, 2: upper, 3: baby,4:third)
+ struct {
+ unsigned short chance;
+ int id;
+ } mob[MAX_SEARCH]; //Holds the mobs that have the highest drop rate for this item. [Skotlex]
+ struct script_code *script; //Default script for everything.
+ struct script_code *equip_script; //Script executed once when equipping.
+ struct script_code *unequip_script;//Script executed once when unequipping.
+ struct {
+ unsigned available : 1;
+ short no_equip;
+ unsigned no_refine : 1; // [celest]
+ unsigned delay_consume : 1; // Signifies items that are not consumed immediately upon double-click [Skotlex]
+ unsigned trade_restriction : 9; //Item restrictions mask [Skotlex]
+ unsigned autoequip: 1;
+ unsigned buyingstore : 1;
+ } flag;
+ struct {// item stacking limitation
+ unsigned short amount;
+ unsigned int inventory:1;
+ unsigned int cart:1;
+ unsigned int storage:1;
+ unsigned int guildstorage:1;
+ } stack;
+ short gm_lv_trade_override; //GM-level to override trade_restriction
+ /* bugreport:309 */
+ struct item_combo **combos;
+ unsigned char combos_count;
};
struct item_group {
- int nameid[MAX_RANDITEM];
- int qty; //Counts amount of items in the group.
+ int nameid[MAX_RANDITEM];
+ int qty; //Counts amount of items in the group.
};
struct item_combo {
- struct script_code *script;
- unsigned short *nameid;/* nameid array */
- unsigned char count;
- unsigned short id;/* id of this combo */
- bool isRef;/* whether this struct is a reference or the master */
+ struct script_code *script;
+ unsigned short *nameid;/* nameid array */
+ unsigned char count;
+ unsigned short id;/* id of this combo */
+ bool isRef;/* whether this struct is a reference or the master */
};
-struct item_data *itemdb_searchname(const char *name);
-int itemdb_searchname_array(struct item_data **data, int size, const char *str);
-struct item_data *itemdb_load(int nameid);
-struct item_data *itemdb_search(int nameid);
-struct item_data *itemdb_exists(int nameid);
+struct item_data* itemdb_searchname(const char *name);
+int itemdb_searchname_array(struct item_data** data, int size, const char *str);
+struct item_data* itemdb_load(int nameid);
+struct item_data* itemdb_search(int nameid);
+struct item_data* itemdb_exists(int nameid);
#define itemdb_name(n) itemdb_search(n)->name
#define itemdb_jname(n) itemdb_search(n)->jname
#define itemdb_type(n) itemdb_search(n)->type
@@ -185,9 +185,9 @@ struct item_data *itemdb_exists(int nameid);
#define itemdb_iscashfood(id) ( (id) >= 12202 && (id) <= 12207 )
#define itemdb_is_GNbomb(n) (n >= 13260 && n <= 13267)
#define itemdb_is_GNthrowable(n) (n >= 13268 && n <= 13290)
-const char *itemdb_typename(int type);
+const char* itemdb_typename(int type);
-int itemdb_group_bonus(struct map_session_data *sd, int itemid);
+int itemdb_group_bonus(struct map_session_data* sd, int itemid);
int itemdb_searchrandomid(int flags);
#define itemdb_value_buy(n) itemdb_search(n)->value_buy
@@ -195,22 +195,22 @@ int itemdb_searchrandomid(int flags);
#define itemdb_canrefine(n) (!itemdb_search(n)->flag.no_refine)
//Item trade restrictions [Skotlex]
int itemdb_isdropable_sub(struct item_data *, int, int);
-int itemdb_cantrade_sub(struct item_data *, int, int);
-int itemdb_canpartnertrade_sub(struct item_data *, int, int);
-int itemdb_cansell_sub(struct item_data *,int, int);
-int itemdb_cancartstore_sub(struct item_data *, int, int);
-int itemdb_canstore_sub(struct item_data *, int, int);
-int itemdb_canguildstore_sub(struct item_data *, int, int);
-int itemdb_canmail_sub(struct item_data *, int, int);
-int itemdb_canauction_sub(struct item_data *, int, int);
-int itemdb_isrestricted(struct item *item, int gmlv, int gmlv2, int (*func)(struct item_data *, int, int));
+int itemdb_cantrade_sub(struct item_data*, int, int);
+int itemdb_canpartnertrade_sub(struct item_data*, int, int);
+int itemdb_cansell_sub(struct item_data*,int, int);
+int itemdb_cancartstore_sub(struct item_data*, int, int);
+int itemdb_canstore_sub(struct item_data*, int, int);
+int itemdb_canguildstore_sub(struct item_data*, int, int);
+int itemdb_canmail_sub(struct item_data*, int, int);
+int itemdb_canauction_sub(struct item_data*, int, int);
+int itemdb_isrestricted(struct item* item, int gmlv, int gmlv2, int (*func)(struct item_data*, int, int));
#define itemdb_isdropable(item, gmlv) itemdb_isrestricted(item, gmlv, 0, itemdb_isdropable_sub)
#define itemdb_cantrade(item, gmlv, gmlv2) itemdb_isrestricted(item, gmlv, gmlv2, itemdb_cantrade_sub)
#define itemdb_canpartnertrade(item, gmlv, gmlv2) itemdb_isrestricted(item, gmlv, gmlv2, itemdb_canpartnertrade_sub)
#define itemdb_cansell(item, gmlv) itemdb_isrestricted(item, gmlv, 0, itemdb_cansell_sub)
#define itemdb_cancartstore(item, gmlv) itemdb_isrestricted(item, gmlv, 0, itemdb_cancartstore_sub)
-#define itemdb_canstore(item, gmlv) itemdb_isrestricted(item, gmlv, 0, itemdb_canstore_sub)
-#define itemdb_canguildstore(item, gmlv) itemdb_isrestricted(item , gmlv, 0, itemdb_canguildstore_sub)
+#define itemdb_canstore(item, gmlv) itemdb_isrestricted(item, gmlv, 0, itemdb_canstore_sub)
+#define itemdb_canguildstore(item, gmlv) itemdb_isrestricted(item , gmlv, 0, itemdb_canguildstore_sub)
#define itemdb_canmail(item, gmlv) itemdb_isrestricted(item , gmlv, 0, itemdb_canmail_sub)
#define itemdb_canauction(item, gmlv) itemdb_isrestricted(item , gmlv, 0, itemdb_canauction_sub)