From d157481db8a77069628b6186b9a31ea6267854ee Mon Sep 17 00:00:00 2001 From: FlavioJS Date: Fri, 30 Nov 2007 00:17:26 +0000 Subject: * Random cleanup/documentation. * Made common/Makefile get the svn version from the src directory, not src/common. * Added a warning message to the install and uninstall targets. * Renamed all obj directories to obj_all, obj_txt or obj_sql in the makefiles (if an obj/ directory exists, BSD make enters it before reading the makefile) (run ./configure to update your makefiles, and don't forget to do 'make clean' before updating) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11844 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/clif.c | 78 +++++++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 56 insertions(+), 22 deletions(-) (limited to 'src/map/clif.c') diff --git a/src/map/clif.c b/src/map/clif.c index 5f59bda74..2a45b1b79 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -4396,35 +4396,44 @@ void clif_skill_warppoint(struct map_session_data* sd, short skill_num, short sk else sd->menuskill_val = skill_lv; } -/*========================================== - * メモ応答 - *------------------------------------------*/ -int clif_skill_memo(struct map_session_data *sd,int flag) + +/// Memo message. +/// type=0 : "Saved location as a Memo Point for Warp skill." in color 0xFFFF00 (cyan) +/// type=1 : "Skill Level is not high enough." in color 0x0000FF (red) +/// type=2 : "You haven't learned Warp." in color 0x0000FF (red) +/// +/// @param sd Who receives the message +/// @param type What message +void clif_skill_memomessage(struct map_session_data* sd, int type) { int fd; - nullpo_retr(0, sd); + nullpo_retv(sd); fd=sd->fd; - WFIFOHEAD(fd,packet_len(0x11e)); WFIFOW(fd,0)=0x11e; - WFIFOB(fd,2)=flag; + WFIFOB(fd,2)=type; WFIFOSET(fd,packet_len(0x11e)); - return 0; } -int clif_skill_teleportmessage(struct map_session_data *sd,int flag) + +/// Teleport message. +/// type=0 : "Unable to Teleport in this area" in color 0xFFFF00 (cyan) +/// type=1 : "Saved point cannot be memorized." in color 0x0000FF (red) +/// +/// @param sd Who receives the message +/// @param type What message +void clif_skill_teleportmessage(struct map_session_data *sd, int type) { int fd; - nullpo_retr(0, sd); + nullpo_retv(sd); fd=sd->fd; WFIFOHEAD(fd,packet_len(0x189)); WFIFOW(fd,0)=0x189; - WFIFOW(fd,2)=flag; + WFIFOW(fd,2)=type; WFIFOSET(fd,packet_len(0x189)); - return 0; } /*========================================== @@ -4700,18 +4709,43 @@ int clif_resurrection(struct block_list *bl,int type) return 0; } -/*========================================== - * PVP実装?(仮) - *------------------------------------------*/ -int clif_set0199(int fd,int type) +/// Sets the map mode. +/// +/// mode=1 : pvp mode +/// mode=2 : unknown mode (pk?) +/// mode=3 : gvg mode +/// mode=4 : message "You are in a PK area. Please beware of sudden attacks." in color 0x9B9BFF (light red) +/// mode=5 : pvp mode +/// mode=other : ? +void clif_set0199(struct map_session_data* sd, int mode) { + int fd; + + nullpo_retv(sd); + + fd=sd->fd; WFIFOHEAD(fd,packet_len(0x199)); WFIFOW(fd,0)=0x199; - WFIFOW(fd,2)=type; + WFIFOW(fd,2)=mode; WFIFOSET(fd,packet_len(0x199)); +} - return 0; +#if 0 +/// Set the map mode? +/// Differs from the behaviour of clif_set0199 with unknown consequences. +void clif_set01D6(struct map_session_data* sd, int mode) +{ + int fd; + + nullpo_retv(sd); + + fd=sd->fd; + WFIFOHEAD(fd,packet_len(0x1D6)); + WFIFOW(fd,0)=0x1D6; + WFIFOW(fd,2)=mode; + WFIFOSET(fd,packet_len(0x1D6)); } +#endif /*========================================== * PVP実装?(仮) @@ -7762,15 +7796,15 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) sd->pvp_won = 0; sd->pvp_lost = 0; } - clif_set0199(fd,1); + clif_set0199(sd,1); } else // set flag, if it's a duel [LuzZza] if(sd->duel_group) - clif_set0199(fd,1); + clif_set0199(sd,1); if (map[sd->bl.m].flag.gvg_dungeon) { - clif_set0199(fd,1); //TODO: Figure out the real packet to send here. + clif_set0199(sd,1); //TODO: Figure out the real packet to send here. if (!sd->pvp_point) { sd->pvp_point = 5; //Need to die twice to be warped out. @@ -7780,7 +7814,7 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) } if(map_flag_gvg(sd->bl.m)) - clif_set0199(fd,3); + clif_set0199(sd,3); // info about nearby objects // must use foreachinarea (CIRCULAR_AREA interferes with foreachinrange) -- cgit v1.2.3-70-g09d2