summaryrefslogtreecommitdiff
path: root/src/map
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
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')
-rw-r--r--src/map/mob.c4
-rw-r--r--src/map/status.c10
2 files changed, 9 insertions, 5 deletions
diff --git a/src/map/mob.c b/src/map/mob.c
index f1a4f9f82..c18f83b66 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -665,9 +665,6 @@ int mob_spawn (struct mob_data *md)
md->target_id = 0;
md->move_fail_count = 0;
- if (!md->level) // [Valaris]
- md->level=md->db->lv;
-
// md->master_id = 0;
md->master_dist = 0;
@@ -2124,7 +2121,6 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type)
if(mvp_sd->state.event_kill_mob)
npc_script_event(mvp_sd, NPCE_KILLNPC); // PCKillNPC [Lance]
}
- if(md->level) md->level=0;
if(md->deletetimer!=-1) {
delete_timer(md->deletetimer,mob_timer_delete);
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;