diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-08-18 13:49:24 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-08-18 13:49:24 +0000 |
commit | a2b971ef0af9491bdbd93e07e600a69df97a46a1 (patch) | |
tree | dcc1210cb9863ebf921cf93bfe33bc08e0cf842a /src/map/status.c | |
parent | eb5b93986c7ade4100da3d1bcaf07c9f2b7824e4 (diff) | |
download | hercules-a2b971ef0af9491bdbd93e07e600a69df97a46a1.tar.gz hercules-a2b971ef0af9491bdbd93e07e600a69df97a46a1.tar.bz2 hercules-a2b971ef0af9491bdbd93e07e600a69df97a46a1.tar.xz hercules-a2b971ef0af9491bdbd93e07e600a69df97a46a1.zip |
- Changed unit_free so that it receives which cleartype should be used when the character is still on a map. Used this on status_damage so that mobs that do not respawn when killed will properly display the death animation.
- Should have fixed the signed/unsigned comparison warnings in the main regen function.
- Fixed Energy Coat consuming 10x less SP per hit than it should.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8339 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/status.c')
-rw-r--r-- | src/map/status.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/map/status.c b/src/map/status.c index 69716f387..99449554b 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -712,7 +712,7 @@ int status_damage(struct block_list *src,struct block_list *target,int hp, int s memset(®en->tick, 0, sizeof(regen->tick)); } if(flag&4) //Delete from memory. (also invokes map removal code) - unit_free(target); + unit_free(target,1); else if(flag&2) //remove from map unit_remove_map(target,1); @@ -6843,13 +6843,13 @@ static int status_natural_heal(DBKey key,void * data,va_list app) rate/=2; regen->tick.hp += rate; - if(regen->tick.hp >= battle_config.natural_healhp_interval) + if(regen->tick.hp >= (unsigned int)battle_config.natural_healhp_interval) { val = 0; do { val += regen->hp; regen->tick.hp -= battle_config.natural_healhp_interval; - } while(regen->tick.hp >= battle_config.natural_healhp_interval); + } while(regen->tick.hp >= (unsigned int)battle_config.natural_healhp_interval); if (status_heal(bl, val, 0, 1) < val) flag&=~RGN_SHP; //full. } @@ -6858,7 +6858,7 @@ static int status_natural_heal(DBKey key,void * data,va_list app) { regen->tick.shp += natural_heal_diff_tick * regen->rate.shp; - while(regen->tick.shp >= battle_config.natural_heal_skill_interval) + while(regen->tick.shp >= (unsigned int)battle_config.natural_heal_skill_interval) { regen->tick.shp -= battle_config.natural_heal_skill_interval; if(status_heal(bl, regen->shp, 0, 3) < regen->shp) @@ -6869,13 +6869,13 @@ static int status_natural_heal(DBKey key,void * data,va_list app) { regen->tick.sp += natural_heal_diff_tick*(regen->rate.sp+bonus); - if(regen->tick.sp >= battle_config.natural_healsp_interval) + if(regen->tick.sp >= (unsigned int)battle_config.natural_healsp_interval) { val = 0; do { val += regen->sp; regen->tick.sp -= battle_config.natural_healsp_interval; - } while(regen->tick.sp >= battle_config.natural_healsp_interval); + } while(regen->tick.sp >= (unsigned int)battle_config.natural_healsp_interval); if (status_heal(bl, 0, val, 1) < val) flag&=~RGN_SSP; //full. } @@ -6883,7 +6883,7 @@ static int status_natural_heal(DBKey key,void * data,va_list app) if(flag&RGN_SSP) { regen->tick.ssp += natural_heal_diff_tick * regen->rate.ssp; - while(regen->tick.ssp >= battle_config.natural_heal_skill_interval) + while(regen->tick.ssp >= (unsigned int)battle_config.natural_heal_skill_interval) { regen->tick.ssp -= battle_config.natural_heal_skill_interval; if(status_heal(bl, 0, regen->ssp, 3) < regen->ssp) |