summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
author(no author) <(no author)@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-11-24 07:36:33 +0000
committer(no author) <(no author)@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-11-24 07:36:33 +0000
commitafc1224cdfb766d8371180d9b1c98a87ea39af64 (patch)
treea7fc3ccf4f2dff50147ef4fc21e6777470154184 /src/map/skill.c
parentaebf55791c3d68004f09580ac3ae70b45fa5f353 (diff)
downloadhercules-afc1224cdfb766d8371180d9b1c98a87ea39af64.tar.gz
hercules-afc1224cdfb766d8371180d9b1c98a87ea39af64.tar.bz2
hercules-afc1224cdfb766d8371180d9b1c98a87ea39af64.tar.xz
hercules-afc1224cdfb766d8371180d9b1c98a87ea39af64.zip
Added pc_calcspeed, updated Cloaking
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/athena@340 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index 0b734d41a..9840d76dc 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -4407,7 +4407,7 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
}
}
break;
- case GD_REGENERATION:
+ case GD_REGENERATION:
{
struct guild *g = NULL;
if (sd && sd->status.guild_id > 0 && (g = guild_search(sd->status.guild_id)) &&
@@ -4430,7 +4430,7 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
for(i = 0; i < g->max_member; i++) {
if ((dstsd = g->member[i].sd) != NULL && sd->bl.m == dstsd->bl.m) {
hp = dstsd->status.max_hp*0.9;
- sp = dstsd->status.sp + hp < dstsd->status.max_sp ? hp : dstsd->status.max_sp - dstsd->status.sp;
+ sp = dstsd->status.sp + hp <= dstsd->status.max_sp ? hp : dstsd->status.max_sp - dstsd->status.sp;
clif_skill_nodamage(src,bl,AL_HEAL,hp,1);
battle_heal(NULL,bl,hp,sp,0);
}
@@ -9798,19 +9798,15 @@ int skill_check_cloaking(struct block_list *bl)
skill_status_change_end(bl, SC_CLOAKING, -1);
*battle_get_option(bl)&=~4; /* 念のための?理 */
}
- else if (bl->type == BL_PC) {
+ else if (bl->type == BL_PC && sd->sc_data[SC_CLOAKING].val3 != 130) {
sd->sc_data[SC_CLOAKING].val3 = 130;
- //sd->speed = sd->speed * sd->sc_data[SC_CLOAKING].val3 /100;
- //clif_updatestatus(sd,SP_SPEED);
- pc_calcstatus (sd,0); // better way than calling this everytime?
+ pc_calcspeed (sd);
}
}
else {
- if (bl->type == BL_PC) {
+ if (bl->type == BL_PC && sd->sc_data[SC_CLOAKING].val3 != 103) {
sd->sc_data[SC_CLOAKING].val3 = 103;
- //sd->speed = sd->speed * sd->sc_data[SC_CLOAKING].val3 /100;
- //clif_updatestatus(sd,SP_SPEED);
- pc_calcstatus (sd,0);
+ pc_calcspeed (sd);
}
}
return end;