summaryrefslogtreecommitdiff
path: root/src/map/status.c
diff options
context:
space:
mode:
authorshennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-07-27 00:11:32 +0000
committershennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-07-27 00:11:32 +0000
commit96cc4f2e7496202c8c278399124f9f85ce3a5ae5 (patch)
tree7455cde7f3b96c014e441b58662630910f49ed36 /src/map/status.c
parent679b172c58b43307a8e25ba85bae0d83f8598926 (diff)
downloadhercules-96cc4f2e7496202c8c278399124f9f85ce3a5ae5.tar.gz
hercules-96cc4f2e7496202c8c278399124f9f85ce3a5ae5.tar.bz2
hercules-96cc4f2e7496202c8c278399124f9f85ce3a5ae5.tar.xz
hercules-96cc4f2e7496202c8c278399124f9f85ce3a5ae5.zip
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
Diffstat (limited to 'src/map/status.c')
-rw-r--r--src/map/status.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/map/status.c b/src/map/status.c
index 94ffc403e..5b401d87f 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -2507,7 +2507,16 @@ int status_calc_pc_(struct map_session_data* sd, bool first)
return 1;
}
}
-
+
+ /* we've got combos to process */
+ if( sd->combos.count ) {
+ for( i = 0; i < sd->combos.count; i++ ) {
+ run_script(sd->combos.bonus[i],0,sd->bl.id,0);
+ if (!calculating) //Abort, run_script retriggered this.
+ return 1;
+ }
+ }
+
//Store equipment script bonuses
memcpy(sd->param_equip,sd->param_bonus,sizeof(sd->param_equip));
memset(sd->param_bonus, 0, sizeof(sd->param_bonus));