diff options
author | FlavioJS <FlavioJS@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-11-30 00:17:26 +0000 |
---|---|---|
committer | FlavioJS <FlavioJS@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-11-30 00:17:26 +0000 |
commit | d157481db8a77069628b6186b9a31ea6267854ee (patch) | |
tree | 53c49ca6ad0be53d230ccdc2ed54c95d38b7f54d /src/map/clif.c | |
parent | 5740884867c926482c52ce81fa1490500a365bfd (diff) | |
download | hercules-d157481db8a77069628b6186b9a31ea6267854ee.tar.gz hercules-d157481db8a77069628b6186b9a31ea6267854ee.tar.bz2 hercules-d157481db8a77069628b6186b9a31ea6267854ee.tar.xz hercules-d157481db8a77069628b6186b9a31ea6267854ee.zip |
* 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
Diffstat (limited to 'src/map/clif.c')
-rw-r--r-- | src/map/clif.c | 78 |
1 files changed, 56 insertions, 22 deletions
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) |