From 00ef66fb9261a50e6761cf77c11e7f468494c95f Mon Sep 17 00:00:00 2001 From: shennetsind Date: Sun, 2 Feb 2014 16:50:03 -0200 Subject: 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 --- src/map/itemdb.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/map/itemdb.h') 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; -- cgit v1.2.3-60-g2f50