diff options
author | Ben Longbons <b.r.longbons@gmail.com> | 2012-12-20 21:14:24 -0800 |
---|---|---|
committer | Ben Longbons <b.r.longbons@gmail.com> | 2012-12-24 10:02:20 -0800 |
commit | ace159199161f555d6e13d05ccc374166ff375b6 (patch) | |
tree | d4cafca9f2733f99cc81d9f63b9f1f9172152023 /src/map/chrif.cpp | |
parent | 2b092c150e1226decc48160316070fc44d5fbba0 (diff) | |
download | tmwa-ace159199161f555d6e13d05ccc374166ff375b6.tar.gz tmwa-ace159199161f555d6e13d05ccc374166ff375b6.tar.bz2 tmwa-ace159199161f555d6e13d05ccc374166ff375b6.tar.xz tmwa-ace159199161f555d6e13d05ccc374166ff375b6.zip |
Purge some unused functions
Diffstat (limited to 'src/map/chrif.cpp')
-rw-r--r-- | src/map/chrif.cpp | 61 |
1 files changed, 1 insertions, 60 deletions
diff --git a/src/map/chrif.cpp b/src/map/chrif.cpp index ba295c3..c387c91 100644 --- a/src/map/chrif.cpp +++ b/src/map/chrif.cpp @@ -788,7 +788,7 @@ int chrif_divorce(int char_id, int partner_id) } } - nullpo_retr(0, sd = map_nick2sd(map_charid2nick(partner_id))); + nullpo_ret(sd = map_nick2sd(map_charid2nick(partner_id))); if (sd->status.partner_id == char_id) sd->status.partner_id = 0; @@ -961,65 +961,6 @@ int chrif_reloadGMdb(void) return 0; } -/*========================================== - * Send rates and motd to char server [Wizputer] - *------------------------------------------ - */ -int chrif_ragsrvinfo(int base_rate, int job_rate, int drop_rate) -{ - char buf[256]; - FILE *fp; - int i; - - WFIFOW(char_fd, 0) = 0x2b16; - WFIFOW(char_fd, 2) = base_rate; - WFIFOW(char_fd, 4) = job_rate; - WFIFOW(char_fd, 6) = drop_rate; - - if ((fp = fopen_(motd_txt, "r")) != NULL) - { - if (fgets(buf, 250, fp) != NULL) - { - for (i = 0; buf[i]; i++) - { - if (buf[i] == '\r' || buf[i] == '\n') - { - buf[i] = 0; - break; - } - } - WFIFOW(char_fd, 8) = sizeof(buf) + 10; - memcpy(WFIFOP(char_fd, 10), buf, sizeof(buf)); - } - fclose_(fp); - } - else - { - WFIFOW(char_fd, 8) = sizeof(buf) + 10; - memcpy(WFIFOP(char_fd, 10), buf, sizeof(buf)); - } - WFIFOSET(char_fd, WFIFOW(char_fd, 8)); - - return 0; -} - -/*========================================= - * Tell char-server charcter disconnected [Wizputer] - *----------------------------------------- - */ - -int chrif_char_offline(struct map_session_data *sd) -{ - if (char_fd < 0) - return -1; - - WFIFOW(char_fd, 0) = 0x2b17; - WFIFOL(char_fd, 2) = sd->status.char_id; - WFIFOSET(char_fd, 6); - - return 0; -} - /*======================================== * Map item IDs *---------------------------------------- |