summaryrefslogtreecommitdiff
path: root/src/map/chrif.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-06-15 18:56:54 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-06-15 18:56:54 +0000
commit2f2066f741111325b2510c6526b41b22dea93370 (patch)
tree3d6685374e23b0c5eaa23104b147af5300e4cf21 /src/map/chrif.c
parent98669fa21190be11fadfd165678812d660338873 (diff)
downloadhercules-2f2066f741111325b2510c6526b41b22dea93370.tar.gz
hercules-2f2066f741111325b2510c6526b41b22dea93370.tar.bz2
hercules-2f2066f741111325b2510c6526b41b22dea93370.tar.xz
hercules-2f2066f741111325b2510c6526b41b22dea93370.zip
- Altered a bit how status_set_viewdata behaves in regards to Wedding/Xmas options.
- Added back OPTION_XMAS, but the actual value is missing! - Corrected chrif_save so that the player is not set offline on map-change. - Added change-look support in pc_setoption when specifying OPTION_XMAS - Fixed clif_parse_RemoveOption removing all options instead of just Falcon/Cart/Peco git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7183 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/chrif.c')
-rw-r--r--src/map/chrif.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/map/chrif.c b/src/map/chrif.c
index ff88945a0..47704002f 100644
--- a/src/map/chrif.c
+++ b/src/map/chrif.c
@@ -175,7 +175,9 @@ int chrif_isconnect(void)
}
/*==========================================
- *
+ * Saves char.
+ * Flag = 1: Character is quitting.
+ * Flag = 2: Character is changing map-servers
*------------------------------------------
*/
int chrif_save(struct map_session_data *sd, int flag)
@@ -203,7 +205,7 @@ int chrif_save(struct map_session_data *sd, int flag)
#ifndef TXT_ONLY
if(charsave_method){ //New 'Local' save
charsave_savechar(sd->char_id, &sd->status);
- if (flag) chrif_char_offline(sd); //Tell char server that character went offline.
+ if (flag == 1) chrif_char_offline(sd); //Tell char server that character went offline.
}else{
#endif
WFIFOHEAD(char_fd, sizeof(sd->status) + 13);
@@ -211,7 +213,7 @@ int chrif_save(struct map_session_data *sd, int flag)
WFIFOW(char_fd,2) = sizeof(sd->status) + 13;
WFIFOL(char_fd,4) = sd->bl.id;
WFIFOL(char_fd,8) = sd->char_id;
- WFIFOB(char_fd,12) = flag?1:0; //Flag to tell char-server this character is quitting.
+ WFIFOB(char_fd,12) = (flag==1)?1:0; //Flag to tell char-server this character is quitting.
memcpy(WFIFOP(char_fd,13), &sd->status, sizeof(sd->status));
WFIFOSET(char_fd, WFIFOW(char_fd,2));
#ifndef TXT_ONLY