diff options
author | ai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2010-12-02 00:02:55 +0000 |
---|---|---|
committer | ai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2010-12-02 00:02:55 +0000 |
commit | b5b1166553d4c4ad185e93edd0fcedd3bd962b46 (patch) | |
tree | d4d2ee7c5e5e7af94a5d748be559b65997327ea0 /src/map/clif.c | |
parent | db9a386246f67f25a4374e7a7b8bdccb1174d0d3 (diff) | |
download | hercules-b5b1166553d4c4ad185e93edd0fcedd3bd962b46.tar.gz hercules-b5b1166553d4c4ad185e93edd0fcedd3bd962b46.tar.bz2 hercules-b5b1166553d4c4ad185e93edd0fcedd3bd962b46.tar.xz hercules-b5b1166553d4c4ad185e93edd0fcedd3bd962b46.zip |
* Added packet 0x1b1 (ZC_SHOWDIGIT).
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14539 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/clif.c')
-rw-r--r-- | src/map/clif.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index d9989b865..59e1c4e57 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -13960,6 +13960,23 @@ void clif_displayexp(struct map_session_data *sd, unsigned int exp, char type, b return; } +/// Displays digital clock digits on top of the screen (ZC_SHOWDIGIT). +/// type: +/// 0: Displays 'value' for 5 seconds. +/// 1: Incremental counter (1 tick/second), negated 'value' specifies start value (e.g. using -10 lets the counter start at 10). +/// 2: Decremental counter (1 tick/second), negated 'value' specifies start value (does not stop when reaching 0, but overflows). +/// 3: Decremental counter (2 ticks/second), 'value' specifies start value (stops when reaching 0, displays at most 2 digits). +/// value: +/// Except for type 3 it is interpreted as seconds for displaying as DD:HH:MM:SS, HH:MM:SS, MM:SS or SS (leftmost '00' is not displayed). +void clif_showdigit(struct map_session_data* sd, unsigned char type, int value) +{ + WFIFOHEAD(sd->fd, packet_len(0x1b1)); + WFIFOW(sd->fd,0) = 0x1b1; + WFIFOB(sd->fd,0) = type; + WFIFOL(sd->fd,0) = value; + WFIFOSET(sd->fd, packet_len(0x1b1)); +} + /*========================================== * パケットデバッグ *------------------------------------------*/ |