- Lures won't be lost now when you use them on a non-mob.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5252 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
skotlex 2006-02-10 19:29:10 +00:00
parent 5b7bbaa4eb
commit 328de1ec52
2 changed files with 9 additions and 7 deletions

View File

@ -5,6 +5,7 @@ IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. EV
GOES INTO TRUNK AND WILL BE MERGED INTO STABLE BY VALARIS AND WIZPUTER. -- VALARIS GOES INTO TRUNK AND WILL BE MERGED INTO STABLE BY VALARIS AND WIZPUTER. -- VALARIS
2006/02/10 2006/02/10
* Pet Lures won't be consumed now when used on a non-mob. [Skotlex]
* Fixed map_searchrandcell function. [Skotlex] * Fixed map_searchrandcell function. [Skotlex]
* Modified the NPC_BREAK* skills to break equipment at a 10%*lv rate. [Skotlex] * Modified the NPC_BREAK* skills to break equipment at a 10%*lv rate. [Skotlex]
* Modified the drop item routines to perform stacking checks only for * Modified the drop item routines to perform stacking checks only for

View File

@ -1087,6 +1087,14 @@ int pet_catch_process2(struct map_session_data *sd,int target_id)
nullpo_retr(1, sd); nullpo_retr(1, sd);
md=(struct mob_data*)map_id2bl(target_id);
if(!md || md->bl.type != BL_MOB || md->bl.prev == NULL){
//Abort capture.
sd->catch_target_class = -1;
sd->itemid = sd->itemindex = -1;
return 1;
}
if (sd->itemid > 0) if (sd->itemid > 0)
{ //Consume the pet lure [Skotlex] { //Consume the pet lure [Skotlex]
if ((i = sd->itemindex) == -1 || if ((i = sd->itemindex) == -1 ||
@ -1104,13 +1112,6 @@ int pet_catch_process2(struct map_session_data *sd,int target_id)
pc_delitem(sd,i,1,0); pc_delitem(sd,i,1,0);
} }
md=(struct mob_data*)map_id2bl(target_id);
if(!md || md->bl.type != BL_MOB || md->bl.prev == NULL){
clif_pet_rulet(sd,0);
sd->catch_target_class = -1;
return 1;
}
i = search_petDB_index(md->class_,PET_CLASS); i = search_petDB_index(md->class_,PET_CLASS);
//catch_target_class == 0 is used for universal lures. [Skotlex] //catch_target_class == 0 is used for universal lures. [Skotlex]
//for now universal lures do not include bosses. //for now universal lures do not include bosses.