diff options
author | toms <toms@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-10-31 16:24:17 +0000 |
---|---|---|
committer | toms <toms@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-10-31 16:24:17 +0000 |
commit | 4eca49fa31b59b3f532b871105462fc8fd212cdb (patch) | |
tree | e2b5a302720bb3557afd409037a59df38a255ab7 /src/map | |
parent | 544e0c0ecdf3f4d0c875e19588fbdf848ffdac99 (diff) | |
download | hercules-4eca49fa31b59b3f532b871105462fc8fd212cdb.tar.gz hercules-4eca49fa31b59b3f532b871105462fc8fd212cdb.tar.bz2 hercules-4eca49fa31b59b3f532b871105462fc8fd212cdb.tar.xz hercules-4eca49fa31b59b3f532b871105462fc8fd212cdb.zip |
Update homunc's speed when master's speed changes, should avoid homunc's speed = 0 on login (when homunc's stats are calculated before master's stats)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9110 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/status.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/map/status.c b/src/map/status.c index cbabda234..8c26ad3d7 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -2263,7 +2263,12 @@ int status_calc_pc(struct map_session_data* sd,int first) if(memcmp(b_skill,sd->status.skill,sizeof(sd->status.skill)))
clif_skillinfoblock(sd);
if(b_status.speed != status->speed)
+ {
clif_updatestatus(sd,SP_SPEED);
+ // If speed changes & slaves should inherits master's speed & master have homunc, update it
+ if (sd->hd && battle_config.slaves_inherit_speed)
+ status_calc_bl(&sd->hd->bl, SCB_SPEED);
+ }
if(b_weight != sd->weight)
clif_updatestatus(sd,SP_WEIGHT);
if(b_max_weight != sd->max_weight) {
@@ -2813,6 +2818,13 @@ void status_calc_bl_sub_hom(struct homun_data *hd, unsigned long flag) //[orn] if(status->sp > status->max_sp)
status->sp = status->max_sp;
}
+ if(flag&SCB_SPEED)
+ {
+ if (battle_config.slaves_inherit_speed && hd->master)
+ status->speed = status_get_speed(&hd->master->bl);
+ else
+ status->speed = DEFAULT_WALK_SPEED;
+ }
if(flag&SCB_INT) {
flag|=SCB_MDEF;
status->mdef += (status->int_/5 - b_status->int_/5);
|