summaryrefslogtreecommitdiff
path: root/src/char
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2019-08-25 18:03:01 +0200
committerHaru <haru@dotalux.com>2019-08-26 00:29:07 +0200
commit470ed75a471c428e1ffe44523a9fa46ebc089469 (patch)
tree0f5959918b72909c5d39c6f26d50a66cf545edd7 /src/char
parent79432202ba48e041c102b32b2675988690a754ef (diff)
downloadhercules-470ed75a471c428e1ffe44523a9fa46ebc089469.tar.gz
hercules-470ed75a471c428e1ffe44523a9fa46ebc089469.tar.bz2
hercules-470ed75a471c428e1ffe44523a9fa46ebc089469.tar.xz
hercules-470ed75a471c428e1ffe44523a9fa46ebc089469.zip
Remove round-trip to the inter-server for the guild chat messages
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/char')
-rw-r--r--src/char/int_guild.c1
-rw-r--r--src/char/inter.c2
-rw-r--r--src/char/mapif.c24
-rw-r--r--src/char/mapif.h2
4 files changed, 1 insertions, 28 deletions
diff --git a/src/char/int_guild.c b/src/char/int_guild.c
index 8e05c76e2..87cb3bee0 100644
--- a/src/char/int_guild.c
+++ b/src/char/int_guild.c
@@ -1612,7 +1612,6 @@ static int inter_guild_parse_frommap(int fd)
case 0x3034: mapif->parse_GuildLeave(fd, RFIFOL(fd,2), RFIFOL(fd,6), RFIFOL(fd,10), RFIFOB(fd,14), RFIFOP(fd,15)); break;
case 0x3035: mapif->parse_GuildChangeMemberInfoShort(fd,RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10),RFIFOB(fd,14),RFIFOL(fd,15),RFIFOL(fd,19)); break;
case 0x3036: mapif->parse_BreakGuild(fd,RFIFOL(fd,2)); break;
- case 0x3037: mapif->parse_GuildMessage(fd, RFIFOL(fd,4), RFIFOL(fd,8), RFIFOP(fd,12), RFIFOW(fd,2)-12); break;
case 0x3039: mapif->parse_GuildBasicInfoChange(fd, RFIFOL(fd,4), RFIFOW(fd,8), RFIFOP(fd,10), RFIFOW(fd,2)-10); break;
case 0x303A: mapif->parse_GuildMemberInfoChange(fd, RFIFOL(fd,4), RFIFOL(fd,8), RFIFOL(fd,12), RFIFOW(fd,16), RFIFOP(fd,18), RFIFOW(fd,2)-18); break;
case 0x303B: mapif->parse_GuildPosition(fd, RFIFOL(fd,4), RFIFOL(fd,8), RFIFOP(fd,12)); break;
diff --git a/src/char/inter.c b/src/char/inter.c
index d6b96f020..264327289 100644
--- a/src/char/inter.c
+++ b/src/char/inter.c
@@ -70,7 +70,7 @@ static int inter_recv_packet_length[] = {
0, 0, 0, 0, -1,13,36, (2 + 4 + 4 + 4 + NAME_LENGTH), 0, 0, 0, 0, 0, 0, 0, 0, // 3000-
6,-1, 6,-1, 0, 0, 0, 0, 10,-1, 0, 0, 0, 0, 0, 0, // 3010- Account Storage, Achievements [Smokexyz]
-1,10,-1,14, 14,19, 6, 0, 14,14, 0, 0, 0, 0, 0, 0, // 3020- Party
- -1, 6,-1,-1, 55,23, 6,-1, 14,-1,-1,-1, 18,19,186,-1, // 3030-
+ -1, 6,-1,-1, 55,23, 6, 0, 14,-1,-1,-1, 18,19,186,-1, // 3030-
-1, 9, 0, 0, 10,10, 0, 0, 7, 6,10,10, 10,-1, 0, 0, // 3040- Clan System(3044-3045)
-1,-1,10,10, 0,-1,12, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 3050- Auction System [Zephyrus], Item Bound [Mhalicot]
6,-1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 3060- Quest system [Kevin] [Inkfish]
diff --git a/src/char/mapif.c b/src/char/mapif.c
index 1f27c1c60..29be4eaa2 100644
--- a/src/char/mapif.c
+++ b/src/char/mapif.c
@@ -596,22 +596,6 @@ static int mapif_guild_broken(int guild_id, int flag)
return 0;
}
-// Send guild message
-static int mapif_guild_message(int guild_id, int account_id, const char *mes, int len, int sfd)
-{
- unsigned char buf[512];
- nullpo_ret(mes);
- if (len > 500)
- len = 500;
- WBUFW(buf, 0) = 0x3837;
- WBUFW(buf, 2) = len + 12;
- WBUFL(buf, 4) = guild_id;
- WBUFL(buf, 8) = account_id;
- memcpy(WBUFP(buf, 12), mes, len);
- mapif->sendallwos(sfd, buf, len + 12);
- return 0;
-}
-
// Send basic info
static int mapif_guild_basicinfochanged(int guild_id, int type, const void *data, int len)
{
@@ -810,12 +794,6 @@ static int mapif_parse_BreakGuild(int fd, int guild_id)
return 0;
}
-// Forward Guild message to others map servers
-static int mapif_parse_GuildMessage(int fd, int guild_id, int account_id, const char *mes, int len)
-{
- return mapif->guild_message(guild_id,account_id,mes,len, fd);
-}
-
/**
* Changes basic guild information
* The types are available in mmo.h::guild_basic_info
@@ -2368,7 +2346,6 @@ void mapif_defaults(void)
mapif->guild_withdraw = mapif_guild_withdraw;
mapif->guild_memberinfoshort = mapif_guild_memberinfoshort;
mapif->guild_broken = mapif_guild_broken;
- mapif->guild_message = mapif_guild_message;
mapif->guild_basicinfochanged = mapif_guild_basicinfochanged;
mapif->guild_memberinfochanged = mapif_guild_memberinfochanged;
mapif->guild_skillupack = mapif_guild_skillupack;
@@ -2384,7 +2361,6 @@ void mapif_defaults(void)
mapif->parse_GuildLeave = mapif_parse_GuildLeave;
mapif->parse_GuildChangeMemberInfoShort = mapif_parse_GuildChangeMemberInfoShort;
mapif->parse_BreakGuild = mapif_parse_BreakGuild;
- mapif->parse_GuildMessage = mapif_parse_GuildMessage;
mapif->parse_GuildBasicInfoChange = mapif_parse_GuildBasicInfoChange;
mapif->parse_GuildMemberInfoChange = mapif_parse_GuildMemberInfoChange;
mapif->parse_GuildPosition = mapif_parse_GuildPosition;
diff --git a/src/char/mapif.h b/src/char/mapif.h
index f61b5a9d7..f5b54b6b7 100644
--- a/src/char/mapif.h
+++ b/src/char/mapif.h
@@ -70,7 +70,6 @@ struct mapif_interface {
int (*guild_withdraw) (int guild_id, int account_id, int char_id, int flag, const char *name, const char *mes);
int (*guild_memberinfoshort) (struct guild *g, int idx);
int (*guild_broken) (int guild_id, int flag);
- int (*guild_message) (int guild_id, int account_id, const char *mes, int len, int sfd);
int (*guild_basicinfochanged) (int guild_id, int type, const void *data, int len);
int (*guild_memberinfochanged) (int guild_id, int account_id, int char_id, int type, const void *data, int len);
int (*guild_skillupack) (int guild_id, uint16 skill_id, int account_id);
@@ -86,7 +85,6 @@ struct mapif_interface {
int (*parse_GuildLeave) (int fd, int guild_id, int account_id, int char_id, int flag, const char *mes);
int (*parse_GuildChangeMemberInfoShort) (int fd, int guild_id, int account_id, int char_id, int online, int lv, int class);
int (*parse_BreakGuild) (int fd, int guild_id);
- int (*parse_GuildMessage) (int fd, int guild_id, int account_id, const char *mes, int len);
int (*parse_GuildBasicInfoChange) (int fd, int guild_id, int type, const void *data, int len);
int (*parse_GuildMemberInfoChange) (int fd, int guild_id, int account_id, int char_id, int type, const char *data, int len);
int (*parse_GuildPosition) (int fd, int guild_id, int idx, const struct guild_position *p);