From 8304213efbff057813e058a588cfac7a8168dca1 Mon Sep 17 00:00:00 2001 From: skotlex Date: Thu, 23 Feb 2006 21:33:35 +0000 Subject: - Added mob skill conditions myhpinrate and friendhpinrate for using HP ranges instead of a fixed "less than" condition. - Added mob_ai condition &16, enables skills that are normally used on 'friends' to also pick up caster as target. - Fixed npc_shopid not being reset to 0 when buying/selling. FIXME: The client sends a packet when you cancel? It is required so that npc_shopid will be cleared and prevent the player from being stuck. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5380 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/status.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/map/status.c') diff --git a/src/map/status.c b/src/map/status.c index bf2f6024e..13fec7709 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -1364,7 +1364,8 @@ int status_calc_pc(struct map_session_data* sd,int first) if(sd->status.max_hp > battle_config.max_hp) sd->status.max_hp = battle_config.max_hp; - if(sd->status.max_hp <= 0) sd->status.max_hp = 1; + else if(sd->status.max_hp <= 0) + sd->status.max_hp = 1; if(sd->status.hp>sd->status.max_hp) sd->status.hp=sd->status.max_hp; @@ -1423,9 +1424,10 @@ int status_calc_pc(struct map_session_data* sd,int first) if(sd->status.max_sp > battle_config.max_sp) sd->status.max_sp = battle_config.max_sp; + else if(sd->status.max_sp <= 0) + sd->status.max_sp = 1; if(sd->status.sp>sd->status.max_sp) sd->status.sp=sd->status.max_sp; - if(sd->status.max_sp <= 0) sd->status.max_sp = 1; if(sd->sc.data[SC_DANCING].timer==-1){ // Basic natural SP regeneration value -- cgit v1.2.3-70-g09d2