diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-11-07 16:39:33 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-11-07 16:39:33 +0000 |
commit | 50fb163e16e313538bd6bd0b5022be5cf32e4002 (patch) | |
tree | f7dea6c18e62f5c22a9e6a64849a20064b6a3af2 /src | |
parent | c2dc29da562cb98000c809f53d9baa0e6a2eeb71 (diff) | |
download | hercules-50fb163e16e313538bd6bd0b5022be5cf32e4002.tar.gz hercules-50fb163e16e313538bd6bd0b5022be5cf32e4002.tar.bz2 hercules-50fb163e16e313538bd6bd0b5022be5cf32e4002.tar.xz hercules-50fb163e16e313538bd6bd0b5022be5cf32e4002.zip |
- 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
Diffstat (limited to 'src')
-rw-r--r-- | src/map/guild.c | 10 |
1 files changed, 7 insertions, 3 deletions
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;
|