summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorflaviojs <flaviojs@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-10-10 17:25:15 +0000
committerflaviojs <flaviojs@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-10-10 17:25:15 +0000
commit0f7d8af5eba0c587328cb57c79a2378ac533a3f5 (patch)
tree81ce5b860984badb7ba5e16ab7b96cb971c1584e /src
parenta8ee3c14340344c50c34514520c165aa283e91e0 (diff)
downloadhercules-0f7d8af5eba0c587328cb57c79a2378ac533a3f5.tar.gz
hercules-0f7d8af5eba0c587328cb57c79a2378ac533a3f5.tar.bz2
hercules-0f7d8af5eba0c587328cb57c79a2378ac533a3f5.tar.xz
hercules-0f7d8af5eba0c587328cb57c79a2378ac533a3f5.zip
* Add correct reply when player invited to party isn't found.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14970 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r--src/map/clif.c38
-rw-r--r--src/map/clif.h2
-rw-r--r--src/map/party.c4
3 files changed, 27 insertions, 17 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index d986e8700..e83db8d4f 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -5903,38 +5903,48 @@ void clif_party_invite(struct map_session_data *sd,struct map_session_data *tsd)
WFIFOSET(fd,packet_len(cmd));
}
-/*==========================================
- * Party invitation result.
- * R 00fd <nick>.24S <flag>.B
- * R 02c5 <nick>.24S <flag>.L
- * Flag values are:
- * 0 -> char is already in a party
- * 1 -> party invite was rejected
- * 2 -> party invite was accepted
- * 3 -> party is full
- * 4 -> char of the same account already joined the party
- *------------------------------------------*/
-void clif_party_inviteack(struct map_session_data* sd, const char* nick, int flag)
+
+/// Party invite result.
+/// R 00fd <nick>.24S <result>.B
+/// R 02c5 <nick>.24S <result>.L
+/// result=0 : char is already in a party -> MsgStringTable[80]
+/// result=1 : party invite was rejected -> MsgStringTable[81]
+/// result=2 : party invite was accepted -> MsgStringTable[82]
+/// result=3 : party is full -> MsgStringTable[83]
+/// result=4 : char of the same account already joined the party -> MsgStringTable[608]
+/// result=5 : char blocked party invite -> MsgStringTable[1324] (since 20070904)
+/// result=7 : char is not online or doesn't exist -> MsgStringTable[71] (since 20070904)
+/// result=8 : (%s) TODO instance related? -> MsgStringTable[1388] (since 20080527)
+/// return=9 : TODO map prohibits party joining? -> MsgStringTable[1871] (since 20110205)
+void clif_party_inviteack(struct map_session_data* sd, const char* nick, int result)
{
int fd;
nullpo_retv(sd);
fd=sd->fd;
+#if PACKETVER < 20070904
+ if( result == 7 ) {
+ clif_displaymessage(fd, msg_txt(3));
+ return;
+ }
+#endif
+
#if PACKETVER < 20070821
WFIFOHEAD(fd,packet_len(0xfd));
WFIFOW(fd,0) = 0xfd;
safestrncpy((char*)WFIFOP(fd,2),nick,NAME_LENGTH);
- WFIFOB(fd,26) = flag;
+ WFIFOB(fd,26) = result;
WFIFOSET(fd,packet_len(0xfd));
#else
WFIFOHEAD(fd,packet_len(0x2c5));
WFIFOW(fd,0) = 0x2c5;
safestrncpy((char*)WFIFOP(fd,2),nick,NAME_LENGTH);
- WFIFOL(fd,26) = flag;
+ WFIFOL(fd,26) = result;
WFIFOSET(fd,packet_len(0x2c5));
#endif
}
+
/*==========================================
* パーティ設定送信
* flag & 0x001=exp変更ミス
diff --git a/src/map/clif.h b/src/map/clif.h
index 620ba0668..f68204361 100644
--- a/src/map/clif.h
+++ b/src/map/clif.h
@@ -406,7 +406,7 @@ int clif_party_created(struct map_session_data *sd,int result);
int clif_party_member_info(struct party_data *p, struct map_session_data *sd);
int clif_party_info(struct party_data *p, struct map_session_data *sd);
void clif_party_invite(struct map_session_data *sd,struct map_session_data *tsd);
-void clif_party_inviteack(struct map_session_data* sd, const char* nick, int flag);
+void clif_party_inviteack(struct map_session_data* sd, const char* nick, int result);
int clif_party_option(struct party_data *p,struct map_session_data *sd,int flag);
int clif_party_withdraw(struct party_data* p, struct map_session_data* sd, int account_id, const char* name, int flag);
int clif_party_message(struct party_data* p, int account_id, const char* mes, int len);
diff --git a/src/map/party.c b/src/map/party.c
index 803c8d491..0ef07864d 100644
--- a/src/map/party.c
+++ b/src/map/party.c
@@ -338,8 +338,8 @@ int party_invite(struct map_session_data *sd,struct map_session_data *tsd)
nullpo_ret(sd);
if( ( p = party_search(sd->status.party_id) ) == NULL )
return 0;
- if( tsd == NULL) { //TODO: Find the correct reply packet.
- clif_displaymessage(sd->fd, msg_txt(3));
+ if( tsd == NULL) {
+ clif_party_inviteack(sd, "", 7);
return 0;
}