diff options
author | Kevin <Kevin@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2008-04-06 23:01:56 +0000 |
---|---|---|
committer | Kevin <Kevin@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2008-04-06 23:01:56 +0000 |
commit | 34802b5a596874b1e4bf088444cc14d19f7aa24d (patch) | |
tree | 4290ee423bc874700e3d141760020f9f7bb0bfb3 | |
parent | 8a000490b0e56b063564468c5b401ad946d0058f (diff) | |
download | hercules-34802b5a596874b1e4bf088444cc14d19f7aa24d.tar.gz hercules-34802b5a596874b1e4bf088444cc14d19f7aa24d.tar.bz2 hercules-34802b5a596874b1e4bf088444cc14d19f7aa24d.tar.xz hercules-34802b5a596874b1e4bf088444cc14d19f7aa24d.zip |
Equip speed buffs no longer stack with speed consumables other then speed potion.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12509 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r-- | Changelog-Trunk.txt | 2 | ||||
-rw-r--r-- | src/map/status.c | 9 |
2 files changed, 9 insertions, 2 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index 604398272..dddeef883 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -4,6 +4,8 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. 2008/04/06 + * Equip speed buffs no longer stack with speed consumables. (r12509) [Kevin] + - (Speed potion not included). * Sprint, Fusion, and Increase AGI now stack independently. - The others still don't take affect if you have any of these three. (r12508) [Kevin] * Mind Sensing no longer gives an xp bonus on bosses. (r12507) [Kevin] diff --git a/src/map/status.c b/src/map/status.c index 77189bedb..aaabeebaa 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -3701,7 +3701,10 @@ static signed short status_calc_mdef2(struct block_list *bl, struct status_chang static unsigned short status_calc_speed(struct block_list *bl, struct status_change *sc, int speed) { + + //Default speed coming in means there's no speed_rate adjustments. int new_speed = speed; + bool default_speed = (speed == 100); if(!sc || !sc->count) return cap_value(speed,10,USHRT_MAX); @@ -3715,7 +3718,7 @@ static unsigned short status_calc_speed(struct block_list *bl, struct status_cha new_speed += 300; if(!sc->data[SC_GATLINGFEVER]) - { //These two stack with everything (but only one of them) + { //These two stack with everything (but only one of either) if(sc->data[SC_SPEEDUP1]) new_speed -= new_speed * 50/100; else if(sc->data[SC_AVOID]) @@ -3732,10 +3735,12 @@ static unsigned short status_calc_speed(struct block_list *bl, struct status_cha new_speed -= new_speed * 25/100; + //These only apply if you don't have increase agi and/or fusion and/or sprint if(speed == new_speed) { - if(sc->data[SC_SPEEDUP0]) + //Don't allow buff from non speed potion consumables to stack with equips! + if(sc->data[SC_SPEEDUP0] && default_speed) new_speed -= new_speed * 25/100; else if(sc->data[SC_CARTBOOST]) new_speed -= new_speed * 20/100; |