summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
authorcelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-12-21 12:27:02 +0000
committercelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-12-21 12:27:02 +0000
commit99ebdaf8e77e81e43d39825163837d6f4b2bc07a (patch)
tree5edaf24d7e804ab58c98897ea31e81af6277215d /src/map/clif.c
parent45544327c64939d9e7ac9578cb476ff497c6c3ce (diff)
downloadhercules-99ebdaf8e77e81e43d39825163837d6f4b2bc07a.tar.gz
hercules-99ebdaf8e77e81e43d39825163837d6f4b2bc07a.tar.bz2
hercules-99ebdaf8e77e81e43d39825163837d6f4b2bc07a.tar.xz
hercules-99ebdaf8e77e81e43d39825163837d6f4b2bc07a.zip
* Updated most of map-server to 1082
* Removed my own additions for skill delays using aspd * Adapted skill_range_leniency to jA's code * Fixed drop rates only limited to multiples of 100's * Added missing code for castle_defense_rate * Removed pc_undead_nofreeze * Updated unrefineable items table * Added 3 new script commands * Added SC_SpeedUp0 * Merged itemdb_read for SQL and TXT * Removed itemdb_read_cardillustnametable limited to TXT only * Added reading itemslotcounttable.txt from the GRF to auto set number of slots per item * Added a display message when reading itemslottable from the GRF * Added options in battle_athena.conf to enable/disable reading the GRF git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@699 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c42
1 files changed, 42 insertions, 0 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 1467493bb..ffa3acd9d 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -2387,6 +2387,8 @@ int clif_updatestatus(struct map_session_data *sd,int type)
break;
case SP_HP:
WFIFOL(fd,4)=sd->status.hp;
+ if(battle_config.disp_hpmeter)
+ clif_hpmeter(sd);
break;
case SP_SP:
WFIFOL(fd,4)=sd->status.sp;
@@ -5774,6 +5776,46 @@ int clif_party_hp(struct party *p,struct map_session_data *sd)
return 0;
}
/*==========================================
+ * GMへ場所とHP通知
+ *------------------------------------------
+ */
+int clif_hpmeter(struct map_session_data *sd)
+{
+ struct map_session_data *md;
+ unsigned char buf[16];
+ unsigned char buf2[16];
+ int i;
+
+ nullpo_retr(0, sd);
+
+ WBUFW(buf,0)=0x107;
+ WBUFL(buf,2)=sd->bl.id;
+ WBUFW(buf,6)=sd->bl.x;
+ WBUFW(buf,8)=sd->bl.y;
+
+ for(i=0;i<fd_max;i++){
+ if(session[i] && (md=session[i]->session_data) && md->state.auth &&
+ md->bl.m == sd->bl.m && pc_isGM(md) && sd != md){
+ memcpy(WFIFOP(i,0),buf,packet_len_table[0x107]);
+ WFIFOSET(i,packet_len_table[0x107]);
+ }
+ }
+
+ WBUFW(buf2,0)=0x106;
+ WBUFL(buf2,2)=sd->status.account_id;
+ WBUFW(buf2,6)=(sd->status.hp > 0x7fff)? 0x7fff:sd->status.hp;
+ WBUFW(buf2,8)=(sd->status.max_hp > 0x7fff)? 0x7fff:sd->status.max_hp;
+ for(i=0;i<fd_max;i++){
+ if(session[i] && (md=session[i]->session_data) && md->state.auth &&
+ md->bl.m == md->bl.m && pc_isGM(md) && sd != md){
+ memcpy(WFIFOP(i,0),buf2,packet_len_table[0x106]);
+ WFIFOSET(i,packet_len_table[0x106]);
+ }
+ }
+
+ return 0;
+}
+/*==========================================
* パーティ場所移動(未使用)
*------------------------------------------
*/