diff options
author | shennetsind <ind@henn.et> | 2014-02-02 16:50:03 -0200 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2014-02-02 16:50:03 -0200 |
commit | 00ef66fb9261a50e6761cf77c11e7f468494c95f (patch) | |
tree | c1bc879e76ecaaf619366d6392c13a72bb5640b9 /src/map/itemdb.h | |
parent | d33469689ea8e671fa0d525d54bce6932dfe9107 (diff) | |
download | hercules-00ef66fb9261a50e6761cf77c11e7f468494c95f.tar.gz hercules-00ef66fb9261a50e6761cf77c11e7f468494c95f.tar.bz2 hercules-00ef66fb9261a50e6761cf77c11e7f468494c95f.tar.xz hercules-00ef66fb9261a50e6761cf77c11e7f468494c95f.zip |
Fixed item combo bypassing disabled item restrictions
Special Thanks to Mhalicot!
Also improves the overall memory usage of the item combo feature
Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map/itemdb.h')
-rw-r--r-- | src/map/itemdb.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/map/itemdb.h b/src/map/itemdb.h index 74ced13e0..c399a0442 100644 --- a/src/map/itemdb.h +++ b/src/map/itemdb.h @@ -400,10 +400,9 @@ struct item_data { struct item_combo { struct script_code *script; - unsigned short *nameid;/* nameid array */ + unsigned short nameid[MAX_ITEMS_PER_COMBO];/* 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_group { @@ -509,6 +508,9 @@ struct itemdb_interface { /* */ struct item_package *packages; unsigned short package_count; + /* list of item combos loaded */ + struct item_combo **combos; + unsigned short combo_count; /* */ DBMap *names; /* */ @@ -576,6 +578,7 @@ struct itemdb_interface { void (*destroy_item_data) (struct item_data *self, int free_self); int (*final_sub) (DBKey key, DBData *data, va_list ap); void (*clear) (bool total); + struct item_combo * (*id2combo) (unsigned short id); }; struct itemdb_interface *itemdb; |