From 769b1d05aa5cfa8cddfe7d21b35d5c5e4da3bbd6 Mon Sep 17 00:00:00 2001 From: Haru Date: Wed, 20 Aug 2014 04:55:22 +0200 Subject: Follow-up to b294026e6614a652c23bb0cea8a0d4dc69d8b125 - Added documentation for the pc->search_item function and formalized its return values. If the searched item is not found, now it returns the newly introduced constant INDEX_NOT_FOUND. - Updated pc->search_item checks to make use of INDEX_NOT_FOUND. - Fixed an issue with anvils not detected by the weapon forginc code, if they were in the first position of the inventory. - Added ITEMID constants for the four anvil types. Signed-off-by: Haru --- src/map/homunculus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/map/homunculus.c') diff --git a/src/map/homunculus.c b/src/map/homunculus.c index 8c47226db..0f76fcf5f 100644 --- a/src/map/homunculus.c +++ b/src/map/homunculus.c @@ -578,7 +578,7 @@ bool homunculus_feed(struct map_session_data *sd, struct homun_data *hd) { foodID = hd->homunculusDB->foodID; i = pc->search_inventory(sd,foodID); - if(i < 0) { + if (i == INDEX_NOT_FOUND) { clif->hom_food(sd,foodID,0); return false; } -- cgit v1.2.3-60-g2f50