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/guild.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/map/guild.c') diff --git a/src/map/guild.c b/src/map/guild.c index af29dc64e..ac24edeab 100644 --- a/src/map/guild.c +++ b/src/map/guild.c @@ -347,8 +347,8 @@ int guild_create(struct map_session_data *sd, const char *name) clif->guild_created(sd,1); return 0; } - if( battle_config.guild_emperium_check && pc->search_inventory(sd,714) == -1 ) - {// item required + if (battle_config.guild_emperium_check && pc->search_inventory(sd, ITEMID_EMPERIUM) == INDEX_NOT_FOUND) { + // item required clif->guild_created(sd,3); return 0; } -- cgit v1.2.3-60-g2f50