summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-09-07 07:31:58 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-09-07 07:31:58 +0000
commitbbedfd67468dc5105169fc114a54d30ae1a36f23 (patch)
tree7dd6639299a0a4ec315b2e40db2c0a59989fb415 /src/map/clif.c
parentb713afa8b0b482ff4a4f13cef138b430dee1767b (diff)
downloadhercules-bbedfd67468dc5105169fc114a54d30ae1a36f23.tar.gz
hercules-bbedfd67468dc5105169fc114a54d30ae1a36f23.tar.bz2
hercules-bbedfd67468dc5105169fc114a54d30ae1a36f23.tar.xz
hercules-bbedfd67468dc5105169fc114a54d30ae1a36f23.zip
- 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
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c34
1 files changed, 34 insertions, 0 deletions
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"},