summaryrefslogtreecommitdiff
path: root/src/map/status.c
diff options
context:
space:
mode:
authorzephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-06-02 15:54:50 +0000
committerzephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-06-02 15:54:50 +0000
commit8f98ecea38aa77e4d0fb53bae0dc6052289b24a8 (patch)
treeb2706d9f9ce8ae44f87583eb58156153de0bcbbd /src/map/status.c
parent6b1e40e08d0d42abad80cc8bad1b848091bf0b30 (diff)
downloadhercules-8f98ecea38aa77e4d0fb53bae0dc6052289b24a8.tar.gz
hercules-8f98ecea38aa77e4d0fb53bae0dc6052289b24a8.tar.bz2
hercules-8f98ecea38aa77e4d0fb53bae0dc6052289b24a8.tar.xz
hercules-8f98ecea38aa77e4d0fb53bae0dc6052289b24a8.zip
- Added support for OnTouchNPC event, required for Monster Race. Script commands need to be tested. Already tested sc_start.
- Added status SC_WALKSPEED required in monster Race. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12752 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/status.c')
-rw-r--r--src/map/status.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/map/status.c b/src/map/status.c
index 0be72cc2e..d3d9f3544 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -502,6 +502,7 @@ void initChangeTables(void)
StatusChangeFlagTable[SC_ARMOR_ELEMENT] |= SCB_PC;
StatusChangeFlagTable[SC_ARMOR_RESIST] |= SCB_PC;
StatusChangeFlagTable[SC_SPCOST_RATE] |= SCB_PC;
+ StatusChangeFlagTable[SC_WALKSPEED] |= SCB_SPEED;
if (!battle_config.display_hallucination) //Disable Hallucination.
StatusIconChangeTable[SC_HALLUCINATION] = SI_BLANK;
@@ -3706,7 +3707,6 @@ 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 == DEFAULT_WALK_SPEED);
@@ -3714,6 +3714,9 @@ static unsigned short status_calc_speed(struct block_list *bl, struct status_cha
if(!sc || !sc->count)
return cap_value(speed,10,USHRT_MAX);
+ if(sc->data[SC_WALKSPEED])
+ new_speed = sc->data[SC_WALKSPEED]->val1;
+
// Fixed reductions
if(sc->data[SC_CURSE])
new_speed += 450;
@@ -3739,8 +3742,6 @@ static unsigned short status_calc_speed(struct block_list *bl, struct status_cha
if(sc->data[SC_FUSION])
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)
{