diff options
author | zephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2008-12-28 17:08:51 +0000 |
---|---|---|
committer | zephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2008-12-28 17:08:51 +0000 |
commit | 69d5bbb1866f9dd0570de23ede78240e94a067e9 (patch) | |
tree | fee8f9c47281a678e92591d139fed489ce06c7af /src/map | |
parent | bb34b7681e824a17be7d60d351187977310b99a9 (diff) | |
download | hercules-69d5bbb1866f9dd0570de23ede78240e94a067e9.tar.gz hercules-69d5bbb1866f9dd0570de23ede78240e94a067e9.tar.bz2 hercules-69d5bbb1866f9dd0570de23ede78240e94a067e9.tar.xz hercules-69d5bbb1866f9dd0570de23ede78240e94a067e9.zip |
- Book reading script command.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13417 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/clif.c | 12 | ||||
-rw-r--r-- | src/map/clif.h | 3 | ||||
-rw-r--r-- | src/map/script.c | 19 |
3 files changed, 34 insertions, 0 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index 5f258a5fa..c61ed1366 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -12662,6 +12662,18 @@ void clif_rental_expired(int fd, int nameid) WFIFOSET(fd,6); } +/*------------------------------------------ + * Book Reading + *------------------------------------------*/ +void clif_readbook(int fd, int book_id, int page) +{ + WFIFOHEAD(fd,10); + WFIFOW(fd,0) = 0x0294; + WFIFOL(fd,2) = book_id; + WFIFOL(fd,6) = page; + WFIFOSET(fd,10); +} + /*========================================== * パケットデバッグ *------------------------------------------*/ diff --git a/src/map/clif.h b/src/map/clif.h index 1f79445ee..e0e100852 100644 --- a/src/map/clif.h +++ b/src/map/clif.h @@ -449,4 +449,7 @@ void clif_mercenary_updatestatus(struct map_session_data *sd, int type); void clif_rental_time(int fd, int nameid, int seconds); void clif_rental_expired(int fd, int nameid); +// BOOK READING +void clif_readbook(int fd, int book_id, int page); + #endif /* _CLIF_H_ */ diff --git a/src/map/script.c b/src/map/script.c index a40a50bd7..8bd8c9ef1 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -13140,6 +13140,24 @@ BUILDIN_FUNC(mercenary_set_faith) return 0; } +/*------------------------------------------ + * Book Reading + *------------------------------------------*/ +BUILDIN_FUNC(readbook) +{ + struct map_session_data *sd; + int book_id, page; + + if( (sd = script_rid2sd(st)) == NULL ) + return 0; + + book_id = script_getnum(st,2); + page = script_getnum(st,3); + + clif_readbook(sd->fd, book_id, page); + return 0; +} + /****************** Questlog script commands *******************/ @@ -13578,6 +13596,7 @@ struct script_function buildin_func[] = { BUILDIN_DEF(mercenary_get_faith,"i"), BUILDIN_DEF(mercenary_set_calls,"ii"), BUILDIN_DEF(mercenary_set_faith,"ii"), + BUILDIN_DEF(readbook,"ii"), // WoE SE BUILDIN_DEF(agitstart2,""), BUILDIN_DEF(agitend2,""), |