diff options
author | zephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2008-03-12 17:30:31 +0000 |
---|---|---|
committer | zephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2008-03-12 17:30:31 +0000 |
commit | cf66ac82f7269a192f31f9465b1187e73635ceb5 (patch) | |
tree | 378eafc5d70a4a70c318741bac8c5de75ee6d047 | |
parent | 478427b21698e12a1effda8aad29cb2ed5038c05 (diff) | |
download | hercules-cf66ac82f7269a192f31f9465b1187e73635ceb5.tar.gz hercules-cf66ac82f7269a192f31f9465b1187e73635ceb5.tar.bz2 hercules-cf66ac82f7269a192f31f9465b1187e73635ceb5.tar.xz hercules-cf66ac82f7269a192f31f9465b1187e73635ceb5.zip |
* Added a message to let know the client if the mail inbox is full.
* On LoadEndAck added a flag to know if the client is allready changing map or just doing teleport/fly wing.
- This will reduce a little bit some info send to the client that only need to be updated on map change.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12349 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r-- | src/map/clif.c | 19 | ||||
-rw-r--r-- | src/map/map.h | 1 | ||||
-rw-r--r-- | src/map/pc.c | 2 |
3 files changed, 15 insertions, 7 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index 5a0d9562c..437da3241 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -7958,7 +7958,7 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) //Login Event npc_script_event(sd, NPCE_LOGIN); - } else { + } else if( sd->state.changemap ) { //For some reason the client "loses" these on map-change. clif_updatestatus(sd,SP_STR); clif_updatestatus(sd,SP_AGI); @@ -7967,8 +7967,6 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) clif_updatestatus(sd,SP_DEX); clif_updatestatus(sd,SP_LUK); - sd->state.using_fake_npc = 0; - //New 'night' effect by dynamix [Skotlex] if (night_flag && map[sd->bl.m].flag.nightenabled) { //Display night. @@ -7980,14 +7978,16 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) sd->state.night = 0; clif_status_load(&sd->bl, SI_NIGHT, 0); } + } + + sd->state.using_fake_npc = 0; - if(sd->npc_id) - npc_event_dequeue(sd); + if(sd->npc_id) + npc_event_dequeue(sd); #ifndef TXT_ONLY mail_clear(sd); #endif - } if(map[sd->bl.m].flag.loadevent) // Lance npc_script_event(sd, NPCE_LOADMAP); @@ -11433,6 +11433,13 @@ void clif_Mail_refreshinbox(struct map_session_data *sd) j++; } WFIFOSET(fd,len); + + if( md->full ) + { + char output[100]; + sprintf(output, "Inbox is full (Max %d). Delete some mails.", MAIL_MAX_INBOX); + clif_disp_onlyself(sd, output, strlen(output)); + } } /*------------------------------------------ diff --git a/src/map/map.h b/src/map/map.h index 06d3922c7..2a9666742 100644 --- a/src/map/map.h +++ b/src/map/map.h @@ -549,6 +549,7 @@ struct map_session_data { unsigned short autoloot; unsigned short autolootid; // [Zephyrus] unsigned noks : 3; // [Zeph Kill Steal Protection] + bool changemap; struct guild *gmaster_flag; } state; struct { diff --git a/src/map/pc.c b/src/map/pc.c index fc0eb55f2..1065bb788 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -3434,7 +3434,7 @@ int pc_setpos(struct map_session_data* sd, unsigned short mapindex, int x, int y m=map_mapindex2mapid(mapindex); - if (sd->mapindex != mapindex) + if( (sd->state.changemap = (sd->mapindex != mapindex)) ) { //Misc map-changing settings if (sd->sc.count) { //Cancel some map related stuff. |