From bbedfd67468dc5105169fc114a54d30ae1a36f23 Mon Sep 17 00:00:00 2001 From: skotlex Date: Fri, 7 Sep 2007 07:31:58 +0000 Subject: - Added support for the new party invite/reply packets from the latest client version. - Cleared up some TODO's - Added auto-rejecting party/guild invites when the target is disconnected from the server. - Added a correction in the walking code to abort it when map_moveblock cancels the player's walking (by warping/knocking back),the default code would fail because unit_stopwalking would do nothing since the walk timer was already -1 in that moment. - Corrected mob_randomwalk to use unsigned int for the tick variable. - Changed the default @Main format to prevent crashes in the newer clients. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11134 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/clif.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'src/map/clif.c') diff --git a/src/map/clif.c b/src/map/clif.c index 8af8de5d8..16b6f19f0 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -10105,6 +10105,28 @@ void clif_parse_PartyInvite(int fd, struct map_session_data *sd) party_invite(sd, t_sd); } +void clif_parse_PartyInvite2(int fd, struct map_session_data *sd) +{ + struct map_session_data *t_sd; + char *name = RFIFOP(fd,2); + name[NAME_LENGTH]='\0'; + + if(map[sd->bl.m].flag.partylock) + { //Guild locked. + clif_displaymessage(fd, msg_txt(227)); + return; + } + + t_sd = map_nick2sd(name); + + // @noask [LuzZza] + if(t_sd && t_sd->state.noask) { + clif_noask_sub(sd, t_sd, 1); + return; + } + + party_invite(sd, t_sd); +} /*========================================== * パーティ勧誘返答 *------------------------------------------*/ @@ -10118,6 +10140,16 @@ void clif_parse_ReplyPartyInvite(int fd,struct map_session_data *sd) } } +void clif_parse_ReplyPartyInvite2(int fd,struct map_session_data *sd) +{ + if(battle_config.basic_skill_check == 0 || pc_checkskill(sd,NV_BASIC) >= 5){ + party_reply_invite(sd,RFIFOL(fd,2),RFIFOB(fd,6)); + } else { + party_reply_invite(sd,RFIFOL(fd,2),-1); + clif_skill_fail(sd,1,0,4); + } +} + /*========================================== * パーティ脱退要求 *------------------------------------------*/ @@ -11820,7 +11852,9 @@ static int packetdb_readdb(void) {clif_parse_CreateParty,"createparty"}, {clif_parse_CreateParty2,"createparty2"}, {clif_parse_PartyInvite,"partyinvite"}, + {clif_parse_PartyInvite2,"partyinvite2"}, {clif_parse_ReplyPartyInvite,"replypartyinvite"}, + {clif_parse_ReplyPartyInvite2,"replypartyinvite2"}, {clif_parse_LeaveParty,"leaveparty"}, {clif_parse_RemovePartyMember,"removepartymember"}, {clif_parse_PartyChangeOption,"partychangeoption"}, -- cgit v1.2.3-60-g2f50