summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
authorai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-03-25 17:31:28 +0000
committerai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-03-25 17:31:28 +0000
commit7df6d6df2e5a4073a1e6518330d7fabf3a363f70 (patch)
tree3ccaa2ef942951dcad725b63b4eb8e43a74c2665 /src/map/clif.c
parente3858c34c1a4ee83ad40c00c14ac34958f386c89 (diff)
downloadhercules-7df6d6df2e5a4073a1e6518330d7fabf3a363f70.tar.gz
hercules-7df6d6df2e5a4073a1e6518330d7fabf3a363f70.tar.bz2
hercules-7df6d6df2e5a4073a1e6518330d7fabf3a363f70.tar.xz
hercules-7df6d6df2e5a4073a1e6518330d7fabf3a363f70.zip
* Fixed battlegrounds chat packet 0x2dc (ZC_BATTLEFIELD_CHAT) being sent with the battleground id rather than the account id of the talking player (since r13593).
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14760 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 29404a373..eed800534 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -13759,7 +13759,10 @@ int clif_bg_xy_remove(struct map_session_data *sd)
return 0;
}
-int clif_bg_message(struct battleground_data *bg, const char *name, const char *mes, int len)
+
+/// Notifies clients of a battleground message (ZC_BATTLEFIELD_CHAT)
+/// 02dc <packet len>.W <account id>.L <name>.24B <message>.?B
+int clif_bg_message(struct battleground_data *bg, int src_id, const char *name, const char *mes, int len)
{
struct map_session_data *sd;
unsigned char *buf;
@@ -13770,7 +13773,7 @@ int clif_bg_message(struct battleground_data *bg, const char *name, const char *
WBUFW(buf,0) = 0x2dc;
WBUFW(buf,2) = len + NAME_LENGTH + 8;
- WBUFL(buf,4) = sd->state.bg_id;
+ WBUFL(buf,4) = src_id;
memcpy(WBUFP(buf,8), name, NAME_LENGTH);
memcpy(WBUFP(buf,32), mes, len);
clif_send(buf,WBUFW(buf,2), &sd->bl, BG);