summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/map/clif.c12
-rw-r--r--src/map/clif.h3
-rw-r--r--src/map/script.c19
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,""),