diff options
author | Jônatas Andreta <jonataandretta@hotmail.com> | 2018-03-14 23:08:06 -0300 |
---|---|---|
committer | Jônatas Andreta <jonataandretta@hotmail.com> | 2018-03-14 23:08:59 -0300 |
commit | 6518dd8702421c0ff614ae3f771f56950269a77b (patch) | |
tree | c03bd6130c693366e9bc97e464d90a655bbedea4 /src/map | |
parent | ea964c75ac213eab98e22cce938d8bf141071179 (diff) | |
download | hercules-6518dd8702421c0ff614ae3f771f56950269a77b.tar.gz hercules-6518dd8702421c0ff614ae3f771f56950269a77b.tar.bz2 hercules-6518dd8702421c0ff614ae3f771f56950269a77b.tar.xz hercules-6518dd8702421c0ff614ae3f771f56950269a77b.zip |
- Implemented login date for guild members.
Signed-off-by: Megasantos <jonataandretta@hotmail.com>
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/clif.c | 2 | ||||
-rw-r--r-- | src/map/guild.c | 4 | ||||
-rw-r--r-- | src/map/guild.h | 2 | ||||
-rw-r--r-- | src/map/intif.c | 4 |
4 files changed, 7 insertions, 5 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index 7c314b075..f998778a2 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -7700,7 +7700,7 @@ void clif_guild_memberlist(struct map_session_data *sd) memset(WFIFOP(fd, c * size + 34), 0, 50); //[Ind] - This is displayed in the 'note' column but being you can't edit it it's sent empty. memcpy(WFIFOP(fd, c * size + 84), m->name, NAME_LENGTH); #else - WFIFOL(fd, c * size + 34) = 0; // [4144] this is member last login time. But in hercules it not present. + WFIFOL(fd, c * size + 34) = m->last_login; // [Megasantos] - Shows last date online #endif c++; } diff --git a/src/map/guild.c b/src/map/guild.c index 11609ec81..d33df5e08 100644 --- a/src/map/guild.c +++ b/src/map/guild.c @@ -275,6 +275,7 @@ void guild_makemember(struct guild_member *m,struct map_session_data *sd) m->online = 1; m->position = MAX_GUILDPOSITION-1; memcpy(m->name,sd->status.name,NAME_LENGTH); + m->last_login = (uint32)time(NULL); // When player create or join a guild the date is updated return; } @@ -1001,7 +1002,7 @@ int guild_send_memberinfoshort(struct map_session_data *sd,int online) return 0; } -int guild_recv_memberinfoshort(int guild_id, int account_id, int char_id, int online, int lv, int16 class) +int guild_recv_memberinfoshort(int guild_id, int account_id, int char_id, int online, int lv, int16 class, uint32 last_login) { // cleaned up [LuzZza] int i, alv, c, idx = INDEX_NOT_FOUND, om = 0, oldonline = -1; struct guild *g = guild->search(guild_id); @@ -1017,6 +1018,7 @@ int guild_recv_memberinfoshort(int guild_id, int account_id, int char_id, int on m->online=online; m->lv=lv; m->class = class; + m->last_login = last_login; idx=i; } alv+=m->lv; diff --git a/src/map/guild.h b/src/map/guild.h index 9296f9ec0..d6bba2a56 100644 --- a/src/map/guild.h +++ b/src/map/guild.h @@ -126,7 +126,7 @@ struct guild_interface { int (*check_alliance) (int guild_id1, int guild_id2, int flag); /* */ int (*send_memberinfoshort) (struct map_session_data *sd,int online); - int (*recv_memberinfoshort) (int guild_id, int account_id, int char_id, int online, int lv, int16 class); + int (*recv_memberinfoshort) (int guild_id, int account_id, int char_id, int online, int lv, int16 class, uint32 last_login); int (*change_memberposition) (int guild_id,int account_id,int char_id,short idx); int (*memberposition_changed) (struct guild *g,int idx,int pos); int (*change_position) (int guild_id,int idx,int mode,int exp_mode,const char *name); diff --git a/src/map/intif.c b/src/map/intif.c index 0e5cd3db2..858652af2 100644 --- a/src/map/intif.c +++ b/src/map/intif.c @@ -1494,7 +1494,7 @@ void intif_parse_GuildMemberWithdraw(int fd) { // ACK guild member basic info void intif_parse_GuildMemberInfoShort(int fd) { - guild->recv_memberinfoshort(RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10),RFIFOB(fd,14),RFIFOW(fd,15),RFIFOW(fd,17)); + guild->recv_memberinfoshort(RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10),RFIFOB(fd,14),RFIFOW(fd,15),RFIFOW(fd,17),RFIFOL(fd,19)); } // ACK guild break @@ -2842,7 +2842,7 @@ void intif_defaults(void) { -1,-1,27,-1, -1,-1,37,-1, 7, 0, 0, 0, 0, 0, 0, 0, //0x3800-0x380f 0, 0, 0, 0, 0, 0, 0, 0, -1,11, 0, 0, 0, 0, 0, 0, //0x3810 39,-1,15,15, 14,19, 7,-1, 0, 0, 0, 0, 0, 0, 0, 0, //0x3820 - 10,-1,15, 0, 79,19, 7,-1, 0,-1,-1,-1, 14,67,186,-1, //0x3830 + 10,-1,15, 0, 79,23, 7,-1, 0,-1,-1,-1, 14,67,186,-1, //0x3830 -1, 0, 0,14, 0, 0, 0, 0, -1,74,-1,11, 11,-1, 0, 0, //0x3840 -1,-1, 7, 7, 7,11, 8, 0, 10, 0, 0, 0, 0, 0, 0, 0, //0x3850 Auctions [Zephyrus] itembound[Akinari] Clan System[Murilo BiO] -1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //0x3860 Quests [Kevin] [Inkfish] |