summaryrefslogtreecommitdiff
path: root/src/map/chrif.c
diff options
context:
space:
mode:
authorwizputer <wizputer@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-11-28 00:01:39 +0000
committerwizputer <wizputer@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-11-28 00:01:39 +0000
commit6a079edada5a1abdbba3be15d0a8ac5f72fda0a9 (patch)
tree0ac2cf6071f6154f48f3816750cb9c56875cd4fa /src/map/chrif.c
parentee2e4d8299abc3723b43ba915b01a7577a75c6cf (diff)
downloadhercules-6a079edada5a1abdbba3be15d0a8ac5f72fda0a9.tar.gz
hercules-6a079edada5a1abdbba3be15d0a8ac5f72fda0a9.tar.bz2
hercules-6a079edada5a1abdbba3be15d0a8ac5f72fda0a9.tar.xz
hercules-6a079edada5a1abdbba3be15d0a8ac5f72fda0a9.zip
Fixed online system, online column works and prevent double login at the login server
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@392 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/chrif.c')
-rw-r--r--src/map/chrif.c36
1 files changed, 35 insertions, 1 deletions
diff --git a/src/map/chrif.c b/src/map/chrif.c
index adb26868d..a0706f594 100644
--- a/src/map/chrif.c
+++ b/src/map/chrif.c
@@ -904,11 +904,45 @@ int chrif_char_offline(struct map_session_data *sd)
WFIFOW(char_fd,0) = 0x2b17;
WFIFOL(char_fd,2) = sd->status.char_id;
- WFIFOSET(char_fd,6);
+ WFIFOL(char_fd,6) = sd->status.account_id;
+ WFIFOSET(char_fd,10);
+
+ return 0;
+}
+
+/*=========================================
+ * Tell char-server to reset all chars offline [Wizputer]
+ *-----------------------------------------
+ */
+int chrif_char_reset_offline(void) {
+ if (char_fd < 0)
+ return -1;
+
+ WFIFOW(char_fd,0) = 0x2b18;
+ WFIFOSET(char_fd,2);
return 0;
}
+/*=========================================
+ * Tell char-server charcter is online [Wizputer]
+ *-----------------------------------------
+ */
+
+int chrif_char_online(struct map_session_data *sd)
+{
+ if (char_fd < 0)
+ return -1;
+
+ WFIFOW(char_fd,0) = 0x2b19;
+ WFIFOL(char_fd,2) = sd->status.char_id;
+ WFIFOL(char_fd,6) = sd->status.account_id;
+ WFIFOSET(char_fd,10);
+
+ return 0;
+}
+
+
/*==========================================
*
*------------------------------------------