summaryrefslogtreecommitdiff
path: root/src/char
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2018-06-24 15:33:24 +0200
committerHaru <haru@dotalux.com>2018-06-30 01:51:08 +0200
commita77ed4bbf9a7afa60954c8eab6778be1840e77c5 (patch)
tree584b0f624917ec850c5bf00278b62c5d38de69f7 /src/char
parent2c294b2cb454fc3c4fbe8f27a4453491ab220457 (diff)
downloadhercules-a77ed4bbf9a7afa60954c8eab6778be1840e77c5.tar.gz
hercules-a77ed4bbf9a7afa60954c8eab6778be1840e77c5.tar.bz2
hercules-a77ed4bbf9a7afa60954c8eab6778be1840e77c5.tar.xz
hercules-a77ed4bbf9a7afa60954c8eab6778be1840e77c5.zip
Move mapif functions from int_clan.c to mapif.c
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/char')
-rw-r--r--src/char/int_clan.c26
-rw-r--r--src/char/mapif.c28
2 files changed, 26 insertions, 28 deletions
diff --git a/src/char/int_clan.c b/src/char/int_clan.c
index e68f6a655..1b875d7e1 100644
--- a/src/char/int_clan.c
+++ b/src/char/int_clan.c
@@ -123,32 +123,6 @@ int inter_clan_count_members(int clan_id, int kick_interval)
return count;
}
-int mapif_parse_ClanMemberCount(int fd, int clan_id, int kick_interval)
-{
-
- WFIFOHEAD(fd, 10);
- WFIFOW(fd, 0) = 0x3858;
- WFIFOL(fd, 2) = clan_id;
- WFIFOL(fd, 6) = inter_clan->count_members(clan_id, kick_interval);
- WFIFOSET(fd, 10);
- return 0;
-}
-
-int mapif_parse_ClanMemberKick(int fd, int clan_id, int kick_interval)
-{
- int count = 0;
-
- if (inter_clan->kick_inactive_members(clan_id, kick_interval) == 1)
- count = inter_clan->count_members(clan_id, kick_interval);
-
- WFIFOHEAD(fd, 10);
- WFIFOW(fd, 0) = 0x3858;
- WFIFOL(fd, 2) = clan_id;
- WFIFOL(fd, 6) = count;
- WFIFOSET(fd, 10);
- return 0;
-}
-
// Communication from the map server
// - Can analyzed only one by one packet
// Data packet length that you set to inter.c
diff --git a/src/char/mapif.c b/src/char/mapif.c
index 5f578126f..e9da31f07 100644
--- a/src/char/mapif.c
+++ b/src/char/mapif.c
@@ -24,6 +24,7 @@
#include "char/char.h"
#include "char/int_auction.h"
+#include "char/int_clan.h"
#include "char/int_guild.h"
#include "char/int_homun.h"
#include "char/int_mail.h"
@@ -578,9 +579,32 @@ int mapif_parse_Registry(int fd);
int mapif_parse_RegistryRequest(int fd);
void mapif_namechange_ack(int fd, int account_id, int char_id, int type, int flag, const char *const name);
int mapif_parse_NameChangeRequest(int fd);
+
// Clan System
-int mapif_parse_ClanMemberKick(int fd, int clan_id, int kick_interval);
-int mapif_parse_ClanMemberCount(int fd, int clan_id, int kick_interval);
+int mapif_parse_ClanMemberKick(int fd, int clan_id, int kick_interval)
+{
+ int count = 0;
+
+ if (inter_clan->kick_inactive_members(clan_id, kick_interval) == 1)
+ count = inter_clan->count_members(clan_id, kick_interval);
+
+ WFIFOHEAD(fd, 10);
+ WFIFOW(fd, 0) = 0x3858;
+ WFIFOL(fd, 2) = clan_id;
+ WFIFOL(fd, 6) = count;
+ WFIFOSET(fd, 10);
+ return 0;
+}
+
+int mapif_parse_ClanMemberCount(int fd, int clan_id, int kick_interval)
+{
+ WFIFOHEAD(fd, 10);
+ WFIFOW(fd, 0) = 0x3858;
+ WFIFOL(fd, 2) = clan_id;
+ WFIFOL(fd, 6) = inter_clan->count_members(clan_id, kick_interval);
+ WFIFOSET(fd, 10);
+ return 0;
+}
struct mapif_interface mapif_s;
struct mapif_interface *mapif;