diff options
Diffstat (limited to 'src/char/int_guild.c')
-rw-r--r-- | src/char/int_guild.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/char/int_guild.c b/src/char/int_guild.c index e7315ed50..e03278fad 100644 --- a/src/char/int_guild.c +++ b/src/char/int_guild.c @@ -969,21 +969,24 @@ static struct guild *inter_guild_create(const char *name, const struct guild_mem } // Add member to guild -static bool inter_guild_add_member(int guild_id, const struct guild_member *member) +static bool inter_guild_add_member(int guild_id, const struct guild_member *member, int map_fd) { struct guild * g; int i; nullpo_ret(member); g = inter_guild->fromsql(guild_id); - if (g == NULL) + if (g == NULL) { + mapif->guild_memberadded(map_fd, guild_id, member->account_id, member->char_id, 1); // 1: Failed to add return false; + } // Find an empty slot for (i = 0; i < g->max_member; i++) { if (g->member[i].account_id == 0) { g->member[i] = *member; g->member[i].modified = (GS_MEMBER_NEW | GS_MEMBER_MODIFIED); + mapif->guild_memberadded(map_fd, guild_id, member->account_id, member->char_id, 0); // 0: success if (!inter_guild->calcinfo(g)) //Send members if it was not invoked. mapif->guild_info(-1, g); @@ -993,6 +996,8 @@ static bool inter_guild_add_member(int guild_id, const struct guild_member *memb return true; } } + + mapif->guild_memberadded(map_fd, guild_id, member->account_id, member->char_id, 1); // 1: Failed to add return false; } |