diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-11-28 16:26:08 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-11-28 16:26:08 +0000 |
commit | 19082e5aa65c7c1ba3bc679393132b8e94f2693b (patch) | |
tree | 418a4dbe2a62440d757330a2682e1108d8764be7 /src/map/clif.c | |
parent | 6a9d17e48f65570c8504e862cfeb8fe3822a59c8 (diff) | |
download | hercules-19082e5aa65c7c1ba3bc679393132b8e94f2693b.tar.gz hercules-19082e5aa65c7c1ba3bc679393132b8e94f2693b.tar.bz2 hercules-19082e5aa65c7c1ba3bc679393132b8e94f2693b.tar.xz hercules-19082e5aa65c7c1ba3bc679393132b8e94f2693b.zip |
- Fixed a possible crash due to the recent core.c upgrade.
- Changing setting the Guild Master from pc_authok to clif_parse_LoadEndAck so that it will not fail to set the gmaster flag when the first person of a guild to log on is the guild master.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9347 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/clif.c')
-rw-r--r-- | src/map/clif.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index 5c2157aa2..380a57095 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -8376,6 +8376,7 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) if(sd->state.connect_new) {
int lv;
+ struct guild *g;
sd->state.connect_new = 0;
clif_skillinfoblock(sd);
clif_updatestatus(sd,SP_NEXTBASEEXP);
@@ -8405,6 +8406,15 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) if(sd->hd)
merc_hom_init_timers(sd->hd);
+ if (sd->status.guild_id > 0 && !sd->state.gmaster_flag &&
+ (g=guild_search(sd->status.guild_id)) &&
+ strcmp(sd->status.name,g->master) == 0)
+ { //Block Guild Skills to prevent logout/login reuse exploiting. [Skotlex]
+ guild_block_skill(sd, 300000);
+ //Also set the Guild Master flag.
+ sd->state.gmaster_flag = g;
+ }
+
//Delayed night effect on log-on fix for the glow-issue. Thanks to Larry.
if (night_flag && map[sd->bl.m].flag.nightenabled)
add_timer(gettick()+1000,clif_nighttimer,sd->bl.id,0);
|