summaryrefslogtreecommitdiff
path: root/src/map/mob.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-08-24 15:25:50 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-08-24 15:25:50 +0000
commit827726c72c29c80c64a69fb6f866c9275b2d8573 (patch)
treed47427ad140c703a73574d8b97ea9f12927a1ab4 /src/map/mob.c
parentcb21fbb0fe268d098a74469895d8162f1c3c8c2b (diff)
downloadhercules-827726c72c29c80c64a69fb6f866c9275b2d8573.tar.gz
hercules-827726c72c29c80c64a69fb6f866c9275b2d8573.tar.bz2
hercules-827726c72c29c80c64a69fb6f866c9275b2d8573.tar.xz
hercules-827726c72c29c80c64a69fb6f866c9275b2d8573.zip
- Reverted the previous change, changed the pet capture code to try to capture a mob based on their view class rather than actual class.
- Changed various instances of md->db->lv for md->level, since the later is the actual mob level. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8471 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/mob.c')
-rw-r--r--src/map/mob.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/map/mob.c b/src/map/mob.c
index d22d86f5f..55dc2a61f 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -1954,7 +1954,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type)
drop_rate += (int)(0.5+drop_rate*status_get_luk(src)*battle_config.drops_by_luk2/10000.);
}
if (sd && battle_config.pk_mode &&
- (int)(md->db->lv - sd->status.base_level) >= 20)
+ (int)(md->level - sd->status.base_level) >= 20)
drop_rate = (int)(drop_rate*1.25); // pk_mode increase drops if 20 level difference [Valaris]
// if (10000 < rand()%10000+drop_rate) //May be better if MAX_RAND is too low?
@@ -2014,7 +2014,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type)
}
if(sd->get_zeny_num && rand()%100 < sd->get_zeny_rate) //Gets get_zeny_num per level +/-10% [Skotlex]
- pc_getzeny(sd,md->db->lv*sd->get_zeny_num*(90+rand()%21)/100);
+ pc_getzeny(sd,md->level*sd->get_zeny_num*(90+rand()%21)/100);
}
if(md->lootitem) {
for(i=0;i<md->lootitem_count;i++)
@@ -2275,7 +2275,6 @@ int mob_class_change (struct mob_data *md, int class_)
hp_rate = md->status.hp*100/md->status.max_hp;
md->db = mob_db(class_);
- md->class_ = class_;
if (battle_config.override_mob_names==1)
memcpy(md->name,md->db->name,NAME_LENGTH-1);
else