From 50fb163e16e313538bd6bd0b5022be5cf32e4002 Mon Sep 17 00:00:00 2001 From: skotlex Date: Tue, 7 Nov 2006 16:39:33 +0000 Subject: - Fixed a fake nullpo when parsing the reply to a guild alliance request. - Fixed the position of a nullpo in guild.c git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9164 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/guild.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/map/guild.c b/src/map/guild.c index 21d88f67b..428951a22 100644 --- a/src/map/guild.c +++ b/src/map/guild.c @@ -1319,7 +1319,11 @@ int guild_reply_reqalliance(struct map_session_data *sd,int account_id,int flag) struct map_session_data *tsd; nullpo_retr(0, sd); - nullpo_retr(0, tsd= map_id2sd( account_id )); + tsd= map_id2sd( account_id ); + if (!tsd) { //Character left? Cancel alliance. + clif_guild_allianceack(sd,3); + return 0; + } if(sd->guild_alliance!=tsd->status.guild_id) // Š©—U‚ƃMƒ‹ƒhID‚ªˆá‚¤ return 0; @@ -1370,13 +1374,13 @@ int guild_reply_reqalliance(struct map_session_data *sd,int account_id,int flag) // ƒMƒ‹ƒhŠÖŒW‰ðÁ int guild_delalliance(struct map_session_data *sd,int guild_id,int flag) { + nullpo_retr(0, sd); + if(agit_flag) { // Disable alliance breaking during woe [Valaris] clif_displaymessage(sd->fd,"Alliances cannot be broken during Guild Wars!"); return 0; } // end addition [Valaris] - nullpo_retr(0, sd); - intif_guild_alliance( sd->status.guild_id,guild_id, sd->status.account_id,0,flag|8 ); return 0; -- cgit v1.2.3-70-g09d2