summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
authorzephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-07-26 11:13:39 +0000
committerzephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-07-26 11:13:39 +0000
commit81d811f3c35d37e358f6874dd702923a0a934275 (patch)
tree1cd3966f751bfa6924f5bcb47fc7ec73bee0f0c7 /src/map/clif.c
parent0aebc2311a3167c5f261f78ff7ab89a4b25a2ddb (diff)
downloadhercules-81d811f3c35d37e358f6874dd702923a0a934275.tar.gz
hercules-81d811f3c35d37e358f6874dd702923a0a934275.tar.bz2
hercules-81d811f3c35d37e358f6874dd702923a0a934275.tar.xz
hercules-81d811f3c35d37e358f6874dd702923a0a934275.zip
- Implemented official Convex Mirror (With help of Yomanda and Sirius White)
- Fixed SC_WARN don't receiving reflecting damage (Bug Report 1854). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12997 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c44
1 files changed, 44 insertions, 0 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 103994a76..6752a9699 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -12153,6 +12153,50 @@ void clif_parse_Adopt_reply(int fd, struct map_session_data *sd)
}
/*==========================================
+ * Convex Mirror
+ * S 0293 <flag>.b <x>.l <y>.l <Hours>.w <Minutes>.w <unknown>.l <monster name>.40B <unknown>.11B
+ *==========================================*/
+void clif_bossmapinfo(int fd, struct mob_data *md, short flag)
+{
+ WFIFOHEAD(fd,70);
+ memset(WFIFOP(fd,0),0,70);
+ WFIFOW(fd,0) = 0x0293;
+
+ if( md != NULL )
+ {
+ if( md->bl.prev != NULL )
+ { // Boss on This Map
+ if( flag )
+ {
+ WFIFOB(fd,2) = 1;
+ WFIFOL(fd,3) = md->bl.x;
+ WFIFOL(fd,7) = md->bl.y;
+ }
+ else
+ WFIFOB(fd,2) = 2; // First Time
+ }
+ else
+ { // Boss is Dead
+ const struct TimerData * timer_data = get_timer(md->spawn_timer);
+ unsigned int seconds;
+ int hours, minutes;
+
+ seconds = DIFF_TICK(timer_data->tick, gettick()) / 1000;
+ hours = seconds / (60 * 60);
+ seconds = seconds - (60 * 60 * hours);
+ minutes = seconds / 60;
+
+ WFIFOB(fd,2) = 3;
+ WFIFOW(fd,11) = hours; // Hours
+ WFIFOW(fd,13) = minutes; // Minutes
+ }
+ safestrncpy((char*)WFIFOP(fd,19), md->db->jname, NAME_LENGTH);
+ }
+
+ WFIFOSET(fd,70);
+}
+
+/*==========================================
* Requesting equip of a player
*------------------------------------------*/
void clif_parse_ViewPlayerEquip(int fd, struct map_session_data* sd)