From 19aa33a5f61f0996d76d19db7dbe9d81f5daa090 Mon Sep 17 00:00:00 2001 From: smokexyz Date: Sat, 30 Jun 2018 04:20:03 +0100 Subject: Implementation of the official Achievement System. Source: http://ro.gnjoy.com/news/update/View.asp?seq=163&curpage=1 Script Commands - ``` achievement_progress(,,,{,}); ``` Includes an achievement_db.conf generator that reads from the item_db, mob_db (server side) and achievement_list.lub files to determine valid achievement entries based on item/monster availability. Achievements containing unsupported entries are commented out. This feature, although renewal-only in official servers, is capable of being used in pre-renewal mode on Hercules. Does not include the title system yet. A big thanks to - @MishimaHaruna for constantly reviewing. @4144 for all the support. @Asheraf for a lot of official information. Co-authored-by: "Dastgir" --- src/map/pet.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/map/pet.c') diff --git a/src/map/pet.c b/src/map/pet.c index e544905c0..678972f14 100644 --- a/src/map/pet.c +++ b/src/map/pet.c @@ -23,6 +23,7 @@ #include "config/core.h" // DBPATH #include "pet.h" +#include "map/achievement.h" #include "map/atcommand.h" // msg_txt() #include "map/battle.h" #include "map/chrif.h" @@ -576,8 +577,8 @@ static int pet_catch_process2(struct map_session_data *sd, int target_id) pet_catch_rate = (pet->db[i].capture + (sd->status.base_level - md->level)*30 + sd->battle_status.luk*20)*(200 - get_percentage(md->status.hp, 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; + if(battle->bc->pet_catch_rate != 100) + pet_catch_rate = (pet_catch_rate*battle->bc->pet_catch_rate)/100; if(rnd()%10000 < pet_catch_rate) { @@ -586,6 +587,8 @@ static int pet_catch_process2(struct map_session_data *sd, int target_id) clif->pet_roulette(sd,1); intif->create_pet(sd->status.account_id,sd->status.char_id,pet->db[i].class_,mob->db(pet->db[i].class_)->lv, pet->db[i].EggID,0,pet->db[i].intimate,100,0,1,pet->db[i].jname); + + achievement->validate_taming(sd, pet->db[i].class_); } else { -- cgit v1.2.3-70-g09d2