summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorshennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-02-19 21:28:51 +0000
committershennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-02-19 21:28:51 +0000
commitc416951c5930c4bc2dc33b3f85746a497d0c17b5 (patch)
tree9e8526009a47865d8c7d6e3cd61db6325b5b6bac /src
parent99dec33cc77ff58ce3695eacd5abdc12b12d313b (diff)
downloadhercules-c416951c5930c4bc2dc33b3f85746a497d0c17b5.tar.gz
hercules-c416951c5930c4bc2dc33b3f85746a497d0c17b5.tar.bz2
hercules-c416951c5930c4bc2dc33b3f85746a497d0c17b5.tar.xz
hercules-c416951c5930c4bc2dc33b3f85746a497d0c17b5.zip
minor improvement on status_calc_<stat> for SL_HIGH soul link, being it does not stack with other status changes.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15622 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r--src/map/status.c25
1 files changed, 12 insertions, 13 deletions
diff --git a/src/map/status.c b/src/map/status.c
index 564307285..4e0e8de52 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -3658,6 +3658,8 @@ static unsigned short status_calc_str(struct block_list *bl, struct status_chang
if(!sc || !sc->count)
return cap_value(str,0,USHRT_MAX);
+ if(sc->data[SC_SPIRIT] && sc->data[SC_SPIRIT]->val2 == SL_HIGH && str < 50)
+ return 50;
if(sc->data[SC_INCALLSTATUS])
str += sc->data[SC_INCALLSTATUS]->val1;
if(sc->data[SC_INCSTR])
@@ -3688,8 +3690,6 @@ static unsigned short status_calc_str(struct block_list *bl, struct status_chang
str -= ((sc->data[SC_MARIONETTE]->val3)>>16)&0xFF;
if(sc->data[SC_MARIONETTE2])
str += ((sc->data[SC_MARIONETTE2]->val3)>>16)&0xFF;
- if(sc->data[SC_SPIRIT] && sc->data[SC_SPIRIT]->val2 == SL_HIGH && str < 50)
- str = 50;
if(sc->data[SC_GIANTGROWTH])
str += 30;
if(sc->data[SC_HARMONIZE])
@@ -3709,6 +3709,8 @@ static unsigned short status_calc_agi(struct block_list *bl, struct status_chang
if(!sc || !sc->count)
return cap_value(agi,0,USHRT_MAX);
+ if(sc->data[SC_SPIRIT] && sc->data[SC_SPIRIT]->val2 == SL_HIGH && agi < 50)
+ return 50;
if(sc->data[SC_CONCENTRATE] && !sc->data[SC_QUAGMIRE])
agi += (agi-sc->data[SC_CONCENTRATE]->val3)*sc->data[SC_CONCENTRATE]->val2/100;
if(sc->data[SC_INCALLSTATUS])
@@ -3737,8 +3739,6 @@ static unsigned short status_calc_agi(struct block_list *bl, struct status_chang
agi -= ((sc->data[SC_MARIONETTE]->val3)>>8)&0xFF;
if(sc->data[SC_MARIONETTE2])
agi += ((sc->data[SC_MARIONETTE2]->val3)>>8)&0xFF;
- if(sc->data[SC_SPIRIT] && sc->data[SC_SPIRIT]->val2 == SL_HIGH && agi < 50)
- agi = 50;
if(sc->data[SC_ADORAMUS])
agi -= sc->data[SC_ADORAMUS]->val2;
if(sc->data[SC_HARMONIZE])
@@ -3759,6 +3759,8 @@ static unsigned short status_calc_vit(struct block_list *bl, struct status_chang
if(!sc || !sc->count)
return cap_value(vit,0,USHRT_MAX);
+ if(sc->data[SC_SPIRIT] && sc->data[SC_SPIRIT]->val2 == SL_HIGH && vit < 50)
+ return 50;
if(sc->data[SC_INCALLSTATUS])
vit += sc->data[SC_INCALLSTATUS]->val1;
if(sc->data[SC_INCVIT])
@@ -3779,8 +3781,6 @@ static unsigned short status_calc_vit(struct block_list *bl, struct status_chang
vit -= sc->data[SC_MARIONETTE]->val3&0xFF;
if(sc->data[SC_MARIONETTE2])
vit += sc->data[SC_MARIONETTE2]->val3&0xFF;
- if(sc->data[SC_SPIRIT] && sc->data[SC_SPIRIT]->val2 == SL_HIGH && vit < 50)
- vit = 50;
if(sc->data[SC_LAUDAAGNUS])
vit += 4 + sc->data[SC_LAUDAAGNUS]->val1;
if(sc->data[SC_HARMONIZE])
@@ -3801,6 +3801,8 @@ static unsigned short status_calc_int(struct block_list *bl, struct status_chang
if(!sc || !sc->count)
return cap_value(int_,0,USHRT_MAX);
+ if(sc->data[SC_SPIRIT] && sc->data[SC_SPIRIT]->val2 == SL_HIGH && int_ < 50)
+ return 50;
if(sc->data[SC_INCALLSTATUS])
int_ += sc->data[SC_INCALLSTATUS]->val1;
if(sc->data[SC_INCINT])
@@ -3829,8 +3831,6 @@ static unsigned short status_calc_int(struct block_list *bl, struct status_chang
int_ -= ((sc->data[SC_MARIONETTE]->val4)>>16)&0xFF;
if(sc->data[SC_MARIONETTE2])
int_ += ((sc->data[SC_MARIONETTE2]->val4)>>16)&0xFF;
- if(sc->data[SC_SPIRIT] && sc->data[SC_SPIRIT]->val2 == SL_HIGH && int_ < 50)
- int_ = 50;
if(sc->data[SC_MANDRAGORA])
int_ -= 5 + 5 * sc->data[SC_MANDRAGORA]->val1;
if(sc->data[SC__STRIPACCESSORY])
@@ -3852,9 +3852,10 @@ static unsigned short status_calc_dex(struct block_list *bl, struct status_chang
if(!sc || !sc->count)
return cap_value(dex,0,USHRT_MAX);
+ if(sc->data[SC_SPIRIT] && sc->data[SC_SPIRIT]->val2 == SL_HIGH && dex < 50)
+ return 50;
if(sc->data[SC_CONCENTRATE] && !sc->data[SC_QUAGMIRE])
dex += (dex-sc->data[SC_CONCENTRATE]->val4)*sc->data[SC_CONCENTRATE]->val2/100;
-
if(sc->data[SC_INCALLSTATUS])
dex += sc->data[SC_INCALLSTATUS]->val1;
if(sc->data[SC_INCDEX])
@@ -3883,8 +3884,6 @@ static unsigned short status_calc_dex(struct block_list *bl, struct status_chang
dex -= ((sc->data[SC_MARIONETTE]->val4)>>8)&0xFF;
if(sc->data[SC_MARIONETTE2])
dex += ((sc->data[SC_MARIONETTE2]->val4)>>8)&0xFF;
- if(sc->data[SC_SPIRIT] && sc->data[SC_SPIRIT]->val2 == SL_HIGH && dex < 50)
- dex = 50;
if(sc->data[SC__STRIPACCESSORY])
dex -= dex * sc->data[SC__STRIPACCESSORY]->val2 / 100;
if(sc->data[SC_HARMONIZE])
@@ -3906,6 +3905,8 @@ static unsigned short status_calc_luk(struct block_list *bl, struct status_chang
if(sc->data[SC_CURSE])
return 0;
+ if(sc->data[SC_SPIRIT] && sc->data[SC_SPIRIT]->val2 == SL_HIGH && luk < 50)
+ return 50;
if(sc->data[SC_INCALLSTATUS])
luk += sc->data[SC_INCALLSTATUS]->val1;
if(sc->data[SC_INCLUK])
@@ -3922,8 +3923,6 @@ static unsigned short status_calc_luk(struct block_list *bl, struct status_chang
luk -= sc->data[SC_MARIONETTE]->val4&0xFF;
if(sc->data[SC_MARIONETTE2])
luk += sc->data[SC_MARIONETTE2]->val4&0xFF;
- if(sc->data[SC_SPIRIT] && sc->data[SC_SPIRIT]->val2 == SL_HIGH && luk < 50)
- luk = 50;
if(sc->data[SC_LAUDARAMUS])
luk += 4 + sc->data[SC_LAUDARAMUS]->val1;
if(sc->data[SC__STRIPACCESSORY])