From 6b1b1974a10bb5ad8f69d9f84d7babcc370f9264 Mon Sep 17 00:00:00 2001 From: celest Date: Thu, 17 Feb 2005 08:31:32 +0000 Subject: * Changes to Dissonance -- don't increment the timer again if the target has died * Changed some nullpo checks back to normal null checks * Changed some nullpo checks to print some debug information * Added some sd checks before calling pc_blockskill * Added fix for SQL char's friend list updating * Fixed a crash if the player invited to join a guild is not online * Find the guild invitation sender first before clearing it git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@1124 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/guild.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'src/map/guild.c') diff --git a/src/map/guild.c b/src/map/guild.c index 72bf302f0..ed3eda3ba 100644 --- a/src/map/guild.c +++ b/src/map/guild.c @@ -581,17 +581,18 @@ int guild_member_added(int guild_id,int account_id,int char_id,int flag) if( (g=guild_search(guild_id))==NULL ) return 0; - if((sd==NULL || sd->guild_invite==0) && flag==0){ + if(sd==NULL || sd->guild_invite==0){ // キャラ側に登録できなかったため脱退要求を出す - if(battle_config.error_log) - printf("guild: member added error %d is not online\n",account_id); - intif_guild_leave(guild_id,account_id,char_id,0,"**登録失敗**"); + if (flag == 0) { + if(battle_config.error_log) + printf("guild: member added error %d is not online\n",account_id); + intif_guild_leave(guild_id,account_id,char_id,0,"**登録失敗**"); + } return 0; } - sd->guild_invite=0; - sd->guild_invite_account=0; - - sd2=map_id2sd(sd->guild_invite_account); + sd2 = map_id2sd(sd->guild_invite_account); + sd->guild_invite = 0; + sd->guild_invite_account = 0; if(flag==1){ // 失敗 if( sd2!=NULL ) -- cgit v1.2.3-70-g09d2