From 96cc4f2e7496202c8c278399124f9f85ce3a5ae5 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Fri, 27 Jul 2012 00:11:32 +0000 Subject: Fixed bugreport:309 combos may now stack properly. moved all combo processing out of item bonuses and made it's own processing scheme, which is by far more efficient cpu-wise although it requires a little more memory, instead of checking for combo items whenever a status effect is turned on/off it only checks when equipping/un-equipping a item (and on login). Special Thanks to GreenBox, Kenpachi, Skotlex and Trojal git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16508 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/itemdb.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src/map/itemdb.h') diff --git a/src/map/itemdb.h b/src/map/itemdb.h index 75c82088b..d39966285 100644 --- a/src/map/itemdb.h +++ b/src/map/itemdb.h @@ -129,8 +129,7 @@ struct item_data { unsigned autoequip: 1; unsigned buyingstore : 1; } flag; - struct - {// item stacking limitation + struct {// item stacking limitation unsigned short amount; unsigned int inventory:1; unsigned int cart:1; @@ -138,6 +137,9 @@ struct item_data { 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 { @@ -146,8 +148,11 @@ struct item_group { }; struct item_combo { - char script[2048]; /* combo script */ - short nameid;/* id of the first */ + 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); -- cgit v1.2.3-70-g09d2