diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/map/guild.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/map/guild.c b/src/map/guild.c index 1929808ca..ae3887aca 100644 --- a/src/map/guild.c +++ b/src/map/guild.c @@ -399,8 +399,11 @@ int guild_created(int account_id,int guild_id) { //struct guild *g; sd->status.guild_id=guild_id; clif->guild_created(sd,0); // Success - if(battle_config.guild_emperium_check) - pc->delitem(sd, pc->search_inventory(sd, ITEMID_EMPERIUM), 1, 0, DELITEM_NORMAL, LOG_TYPE_CONSUME); //emperium consumption + if (battle_config.guild_emperium_check) { + int n = pc->search_inventory(sd, ITEMID_EMPERIUM); + if (n != INDEX_NOT_FOUND) + pc->delitem(sd, n, 1, 0, DELITEM_NORMAL, LOG_TYPE_CONSUME); //emperium consumption + } return 0; } |