|
@@ -648,7 +648,7 @@ int pet_catch_process2(struct map_session_data* sd, int target_id)
|
|
|
|
|
|
if(!md || md->bl.type != BL_MOB || md->bl.prev == NULL) { // Invalid inputs/state, abort capture.
|
|
|
clif_pet_roulette(sd,0);
|
|
|
- sd->catch_target_class = -1;
|
|
|
+ sd->catch_target_class = PET_CATCH_FAIL;
|
|
|
sd->itemid = sd->itemindex = -1;
|
|
|
return 1;
|
|
|
}
|
|
@@ -657,14 +657,14 @@ int pet_catch_process2(struct map_session_data* sd, int target_id)
|
|
|
|
|
|
i = search_petDB_index(md->mob_id,PET_CLASS);
|
|
|
|
|
|
- //catch_target_class == 0 is used for universal lures (except bosses for now). [Skotlex]
|
|
|
- if (sd->catch_target_class == 0 && !status_has_mode(&md->status,MD_STATUS_IMMUNE))
|
|
|
+ //catch_target_class == PET_CATCH_UNIVERSAL is used for universal lures (except bosses for now). [Skotlex]
|
|
|
+ if (sd->catch_target_class == PET_CATCH_UNIVERSAL && !status_has_mode(&md->status,MD_STATUS_IMMUNE))
|
|
|
sd->catch_target_class = md->mob_id;
|
|
|
|
|
|
if(i < 0 || sd->catch_target_class != md->mob_id) {
|
|
|
clif_emotion(&md->bl, ET_ANGER); //mob will do /ag if wrong lure is used on them.
|
|
|
clif_pet_roulette(sd,0);
|
|
|
- sd->catch_target_class = -1;
|
|
|
+ sd->catch_target_class = PET_CATCH_FAIL;
|
|
|
|
|
|
return 1;
|
|
|
}
|
|
@@ -685,7 +685,7 @@ int pet_catch_process2(struct map_session_data* sd, int target_id)
|
|
|
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);
|
|
|
} else {
|
|
|
clif_pet_roulette(sd,0);
|
|
|
- sd->catch_target_class = -1;
|
|
|
+ sd->catch_target_class = PET_CATCH_FAIL;
|
|
|
}
|
|
|
|
|
|
return 0;
|
|
@@ -719,7 +719,7 @@ bool pet_get_egg(uint32 account_id, short pet_class, int pet_id ) {
|
|
|
// period of time it wasn't possible to know which kind of egg was being requested after
|
|
|
// the first request. [Panikon]
|
|
|
i = search_petDB_index(pet_class,PET_CLASS);
|
|
|
- sd->catch_target_class = -1;
|
|
|
+ sd->catch_target_class = PET_CATCH_FAIL;
|
|
|
|
|
|
if(i < 0) {
|
|
|
intif_delete_petdata(pet_id);
|