diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-08-24 15:25:50 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-08-24 15:25:50 +0000 |
commit | 827726c72c29c80c64a69fb6f866c9275b2d8573 (patch) | |
tree | d47427ad140c703a73574d8b97ea9f12927a1ab4 /src/map/pet.c | |
parent | cb21fbb0fe268d098a74469895d8162f1c3c8c2b (diff) | |
download | hercules-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/pet.c')
-rw-r--r-- | src/map/pet.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/map/pet.c b/src/map/pet.c index 48427c4fc..b54f5cf6f 100644 --- a/src/map/pet.c +++ b/src/map/pet.c @@ -577,23 +577,19 @@ int pet_catch_process2(struct map_session_data *sd,int target_id) pc_delitem(sd,i,1,0);
}
- i = search_petDB_index(md->class_,PET_CLASS);
+ i = search_petDB_index(md->vd->class_,PET_CLASS);
//catch_target_class == 0 is used for universal lures. [Skotlex]
//for now universal lures do not include bosses.
if (sd->catch_target_class == 0 && !(md->status.mode&MD_BOSS))
- sd->catch_target_class = md->class_;
- if(i < 0 || sd->catch_target_class != md->class_) {
+ sd->catch_target_class = md->vd->class_;
+ if(i < 0 || sd->catch_target_class != md->vd->class_) {
clif_emotion(&md->bl, 7); //mob will do /ag if wrong lure is used on them.
clif_pet_rulet(sd,0);
sd->catch_target_class = -1;
return 1;
}
- //target_id‚É‚æ‚é“G¨—‘”»’è
-// if(battle_config.etc_log)
-// printf("mob_id = %d, mob_class = %d\n",md->bl.id,md->class_);
- //¬Œ÷‚Ìê‡
- pet_catch_rate = (pet_db[i].capture + (sd->status.base_level - md->db->lv)*30 + sd->battle_status.luk*20)*(200 - md->status.hp*100/md->status.max_hp)/100;
+ pet_catch_rate = (pet_db[i].capture + (sd->status.base_level - md->level)*30 + sd->battle_status.luk*20)*(200 - md->status.hp*100/md->status.max_hp)/100;
if(pet_catch_rate < 1) pet_catch_rate = 1;
if(battle_config.pet_catch_rate != 100)
pet_catch_rate = (pet_catch_rate*battle_config.pet_catch_rate)/100;
|