diff options
author | Paradox924X <Paradox924X@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2008-10-21 07:59:09 +0000 |
---|---|---|
committer | Paradox924X <Paradox924X@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2008-10-21 07:59:09 +0000 |
commit | ea3df40965656861aa8391542033e3f8488b9f76 (patch) | |
tree | 1dd393dab5be76a153535c26b023e16469545154 /src/map/guild.c | |
parent | ff8324394986ee9418d9abd39b40c0329100dbff (diff) | |
download | hercules-ea3df40965656861aa8391542033e3f8488b9f76.tar.gz hercules-ea3df40965656861aa8391542033e3f8488b9f76.tar.bz2 hercules-ea3df40965656861aa8391542033e3f8488b9f76.tar.xz hercules-ea3df40965656861aa8391542033e3f8488b9f76.zip |
Added a check to make sure a player wasn't in a guild when they accepted a guild invitation. This fixes a few possible problems that could/would arise.
(Zomg. My first source commit. =x)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13317 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/guild.c')
-rw-r--r-- | src/map/guild.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/map/guild.c b/src/map/guild.c index 8af73acba..a12d1544d 100644 --- a/src/map/guild.c +++ b/src/map/guild.c @@ -677,7 +677,12 @@ int guild_reply_invite(struct map_session_data* sd, int guild_id, int flag) //NOTE: this can be NULL because the person might have logged off in the meantime tsd = map_id2sd(sd->guild_invite_account); - if( flag == 0 ) + if ( sd->status.guild_id > 0 ) // [Paradox924X] + { // Already in another guild. + if ( tsd ) clif_guild_inviteack(tsd,0); + return 0; + } + else if( flag == 0 ) {// rejected sd->guild_invite = 0; sd->guild_invite_account = 0; |