summaryrefslogtreecommitdiff
path: root/src/map/status.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-06-02 16:27:21 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-06-02 16:27:21 +0000
commit8595b89738a9446c330d7e5d31e93080e2a87246 (patch)
tree133fd6f62af6de207f8ec883ec3480d215ec0e5a /src/map/status.c
parentd82ffd209180df707c4669f05928a837093d557d (diff)
downloadhercules-8595b89738a9446c330d7e5d31e93080e2a87246.tar.gz
hercules-8595b89738a9446c330d7e5d31e93080e2a87246.tar.bz2
hercules-8595b89738a9446c330d7e5d31e93080e2a87246.tar.xz
hercules-8595b89738a9446c330d7e5d31e93080e2a87246.zip
- Moved setting a mob's level from mob_spawn to status_calc_mob, resetting their level on death has also been removed (as it is handled now on spawn)
- Fixed a bug in status_revive - Updated Holy Cross, Investigate and Finger Offensive to be usable by all weapons. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6938 54d463be-8e91-2dee-dedb-b68131a5f0ec
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;