summaryrefslogtreecommitdiff
path: root/src/map/status.c
diff options
context:
space:
mode:
authoraleos <aleos@54d463be-8e91-2dee-dedb-b68131a5f0ec>2013-04-08 22:30:12 +0000
committershennetsind <ind@henn.et>2013-04-11 16:38:28 -0300
commit13d907bb2548c75d19a6a3c85bcd2014e184f936 (patch)
treeab625e23a267d96ca2a86a0942402dee11e2664a /src/map/status.c
parent20bf5d10514810b19f48437fe5b0efc4e8e20092 (diff)
downloadhercules-13d907bb2548c75d19a6a3c85bcd2014e184f936.tar.gz
hercules-13d907bb2548c75d19a6a3c85bcd2014e184f936.tar.bz2
hercules-13d907bb2548c75d19a6a3c85bcd2014e184f936.tar.xz
hercules-13d907bb2548c75d19a6a3c85bcd2014e184f936.zip
* Adjusted @speed so it is no longer reset when a player's status is recalculated. Log out or use @speed -1 to reset to default. (bugreport:7306)
> Follow up to r17220: * Added an extra check if a player does not have a homunculus for 'hommutate' and 'morphembryo' git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@17236 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/status.c')
-rw-r--r--src/map/status.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/map/status.c b/src/map/status.c
index 72643e3c8..482a9890d 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -2335,7 +2335,8 @@ int status_calc_pc_(struct map_session_data* sd, bool first)
memset(&status->max_hp, 0, sizeof(struct status_data)-(sizeof(status->hp)+sizeof(status->sp)));
//FIXME: Most of these stuff should be calculated once, but how do I fix the memset above to do that? [Skotlex]
- status->speed = DEFAULT_WALK_SPEED;
+ if (!pc->state.permanent_speed)
+ status->speed = DEFAULT_WALK_SPEED;
//Give them all modes except these (useful for clones)
status->mode = MD_MASK&~(MD_BOSS|MD_PLANT|MD_DETECTOR|MD_ANGRY|MD_TARGETWEAK);
@@ -4988,6 +4989,9 @@ static unsigned short status_calc_speed(struct block_list *bl, struct status_cha
if( sc == NULL )
return cap_value(speed,10,USHRT_MAX);
+ if (sd && sd->state.permanent_speed)
+ return (short)cap_value(speed,10,USHRT_MAX);
+
if( sd && sd->ud.skilltimer != INVALID_TIMER && (pc_checkskill(sd,SA_FREECAST) > 0 || sd->ud.skill_id == LG_EXEEDBREAK) )
{
if( sd->ud.skill_id == LG_EXEEDBREAK )