summaryrefslogtreecommitdiff
path: root/src/map/party.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/party.c')
-rw-r--r--src/map/party.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/map/party.c b/src/map/party.c
index 47dba49e9..88f53bcb0 100644
--- a/src/map/party.c
+++ b/src/map/party.c
@@ -32,7 +32,7 @@ static DBMap* party_db; // int party_id -> struct party_data*
static DBMap* party_booking_db; // Party Booking [Spiria]
static unsigned long party_booking_nextid = 1;
-int party_send_xy_timer(int tid, unsigned int tick, int id, intptr data);
+int party_send_xy_timer(int tid, unsigned int tick, int id, intptr_t data);
/*==========================================
* Fills the given party_member structure according to the sd provided.
@@ -369,11 +369,19 @@ int party_invite(struct map_session_data *sd,struct map_session_data *tsd)
return 1;
}
-void party_reply_invite(struct map_session_data *sd,int account_id,int flag)
+void party_reply_invite(struct map_session_data *sd,int party_id,int flag)
{
- struct map_session_data *tsd= map_id2sd(account_id);
+ struct map_session_data* tsd;
struct party_member member;
+ if( sd->party_invite != party_id )
+ {// forged
+ sd->party_invite = 0;
+ sd->party_invite_account = 0;
+ return;
+ }
+ tsd = map_id2sd(sd->party_invite_account);
+
if( flag == 1 && !sd->party_creating && !sd->party_joining )
{// accepted and allowed
sd->party_joining = true;
@@ -832,7 +840,7 @@ int party_skill_check(struct map_session_data *sd, int party_id, int skillid, in
return 0;
}
-int party_send_xy_timer(int tid, unsigned int tick, int id, intptr data)
+int party_send_xy_timer(int tid, unsigned int tick, int id, intptr_t data)
{
struct party_data* p;