summaryrefslogtreecommitdiff
path: root/src/map/status.c
diff options
context:
space:
mode:
authorKenpachi Developer <Kenpachi.Developer@gmx.de>2020-03-09 20:28:24 +0100
committerKenpachi Developer <Kenpachi.Developer@gmx.de>2020-03-14 19:48:36 +0100
commit61d10a7e2c8c12ed431d1e6bf66a7d8d176cd13f (patch)
treed52234db088b618c6287de2df91ec1be482c13e6 /src/map/status.c
parentb198861ca00993af846a2156ce41de2375510775 (diff)
downloadhercules-61d10a7e2c8c12ed431d1e6bf66a7d8d176cd13f.tar.gz
hercules-61d10a7e2c8c12ed431d1e6bf66a7d8d176cd13f.tar.bz2
hercules-61d10a7e2c8c12ed431d1e6bf66a7d8d176cd13f.tar.xz
hercules-61d10a7e2c8c12ed431d1e6bf66a7d8d176cd13f.zip
Add SC_SKF_ASPD status change
Diffstat (limited to 'src/map/status.c')
-rw-r--r--src/map/status.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/map/status.c b/src/map/status.c
index f6615b94d..167851e38 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -888,6 +888,7 @@ static void initChangeTables(void)
status->dbs->ChangeFlagTable[SC_VITALIZE_POTION] |= SCB_BATK | SCB_MATK;
status->dbs->ChangeFlagTable[SC_SKF_MATK] |= SCB_MATK;
status->dbs->ChangeFlagTable[SC_SKF_ATK] |= SCB_BATK;
+ status->dbs->ChangeFlagTable[SC_SKF_ASPD] |= SCB_ASPD;
// Cash Items
status->dbs->ChangeFlagTable[SC_FOOD_STR_CASH] |= SCB_STR;
@@ -5929,6 +5930,8 @@ static short status_calc_aspd(struct block_list *bl, struct status_change *sc, s
bonus += sc->data[SC_BATTLESCROLL]->val1;
if (sc->data[SC_STEAMPACK])
bonus += sc->data[SC_STEAMPACK]->val2;
+ if (sc->data[SC_SKF_ASPD] != NULL)
+ bonus += sc->data[SC_SKF_ASPD]->val1;
}
return (bonus + pots);
@@ -6096,6 +6099,8 @@ static short status_calc_aspd_rate(struct block_list *bl, struct status_change *
aspd_rate += sc->data[SC_BATTLESCROLL]->val1 * 10;
if (sc->data[SC_STEAMPACK])
aspd_rate += sc->data[SC_STEAMPACK]->val2 * 10;
+ if (sc->data[SC_SKF_ASPD] != NULL)
+ aspd_rate -= sc->data[SC_SKF_ASPD]->val1 * 10;
return (short)cap_value(aspd_rate,0,SHRT_MAX);
}