summaryrefslogtreecommitdiff
path: root/src/map/status.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/status.c')
-rw-r--r--src/map/status.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/map/status.c b/src/map/status.c
index adeb09be1..4552d9d9f 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -760,7 +760,7 @@ int status_revive(struct block_list *bl, unsigned char per_hp, unsigned char per
return 0; //Invalid target.
hp = status->max_hp * per_hp/100;
- sp = status->max_sp * per_hp/100;
+ sp = status->max_sp * per_sp/100;
if(hp > status->max_hp - status->hp)
hp = status->max_hp - status->hp;
@@ -1015,6 +1015,14 @@ int status_calc_mob(struct mob_data* md, int first)
struct block_list *mbl = NULL;
int flag=0;
+ if(first)
+ { //Set basic level on respawn.
+ if (md->spawn)
+ md->level = md->spawn->level;
+ else
+ md->level = md->db->lv; // [Valaris]
+ }
+
//Check if we need custom base-status
if (battle_config.mobs_level_up && md->level != md->db->lv)
flag|=1;