summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-04-28 02:41:54 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-04-28 02:41:54 +0000
commitfd5a6f34813f11dde4d46a7cfa6402ab681f9d28 (patch)
tree703f15c7f7c43ea3fe2a8ad8c9b3bf0512b3f06c /src/map/clif.c
parent35542f9ed851da21ca19b63ff1f36ca8c980b9f6 (diff)
downloadhercules-fd5a6f34813f11dde4d46a7cfa6402ab681f9d28.tar.gz
hercules-fd5a6f34813f11dde4d46a7cfa6402ab681f9d28.tar.bz2
hercules-fd5a6f34813f11dde4d46a7cfa6402ab681f9d28.tar.xz
hercules-fd5a6f34813f11dde4d46a7cfa6402ab681f9d28.zip
- Modified clif_skill_nodamage to allow for a NULL source. This is to simplify code related to AL_HEAL/MG_RECOVERY effects where someone shows a healing value, but there's no "caster" in sight (Pitcher skills, Blood Drain, Kaahi)
- Updated Kaahi to use clif_skill_nodamage to display amount healed. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6335 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 8156d9e48..43e3374b5 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -4440,28 +4440,28 @@ int clif_skill_nodamage(struct block_list *src,struct block_list *dst,
{
unsigned char buf[32];
- nullpo_retr(0, src);
nullpo_retr(0, dst);
WBUFW(buf,0)=0x11a;
WBUFW(buf,2)=skill_id;
WBUFW(buf,4)=(heal > SHRT_MAX)? SHRT_MAX:heal;
WBUFL(buf,6)=dst->id;
- WBUFL(buf,10)=src->id;
+ WBUFL(buf,10)=src?src->id:0;
WBUFB(buf,14)=fail;
- clif_send(buf,packet_len_table[0x11a],src,AREA);
+ clif_send(buf,packet_len_table[0x11a],dst,AREA);
- if(disguised(src)) {
- WBUFL(buf,10)=-src->id;
- clif_send(buf,packet_len_table[0x115],src,SELF);
- }
if (disguised(dst)) {
WBUFL(buf,6)=-dst->id;
- if (disguised(src))
- WBUFL(buf,10)=src->id;
clif_send(buf,packet_len_table[0x115],dst,SELF);
}
+ if(src && disguised(src)) {
+ WBUFL(buf,10)=-src->id;
+ if (disguised(dst))
+ WBUFL(buf,6)=dst->id;
+ clif_send(buf,packet_len_table[0x115],src,SELF);
+ }
+
return fail;
}