diff options
author | Haru <haru@dotalux.com> | 2016-07-02 18:03:13 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-02 18:03:13 +0200 |
commit | 71c24ded34b1805899d98850b826d00edff3b693 (patch) | |
tree | 8a69571dae94cbf82faf76e5e55ca82717b84ab3 /src | |
parent | ad92652c76fbfea5a439a35c881c61d63a1d2bd8 (diff) | |
parent | eccc5b95809428347fc18099f21680a531b9cf85 (diff) | |
download | hercules-71c24ded34b1805899d98850b826d00edff3b693.tar.gz hercules-71c24ded34b1805899d98850b826d00edff3b693.tar.bz2 hercules-71c24ded34b1805899d98850b826d00edff3b693.tar.xz hercules-71c24ded34b1805899d98850b826d00edff3b693.zip |
Merge pull request #1334 from 4144/guildcreatefix
Fix wrong item deletion in guild creation code if emperium item not i…
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; } |