summaryrefslogtreecommitdiff
path: root/src/map/party.c
diff options
context:
space:
mode:
authorsketchyphoenix <sketchyphoenix@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-08-07 21:07:31 +0000
committersketchyphoenix <sketchyphoenix@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-08-07 21:07:31 +0000
commit75e25456f77add4d6b38980f43fa1d0fca060d50 (patch)
tree3e14fe99f8ac51e2be510dede70c42b11bd0adab /src/map/party.c
parent67402d4edc42f520f50ecd87f4d34073e465251c (diff)
downloadhercules-75e25456f77add4d6b38980f43fa1d0fca060d50.tar.gz
hercules-75e25456f77add4d6b38980f43fa1d0fca060d50.tar.bz2
hercules-75e25456f77add4d6b38980f43fa1d0fca060d50.tar.xz
hercules-75e25456f77add4d6b38980f43fa1d0fca060d50.zip
* Added another GM trust config for party invitations (bugreport:2004)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13051 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/party.c')
-rw-r--r--src/map/party.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/map/party.c b/src/map/party.c
index 82cecc3ff..0de52d5c8 100644
--- a/src/map/party.c
+++ b/src/map/party.c
@@ -287,7 +287,16 @@ int party_invite(struct map_session_data *sd,struct map_session_data *tsd)
nullpo_retr(0, sd);
if (p==NULL)
return 0;
-
+
+ if ( (pc_isGM(sd) && !pc_isGM(tsd) && !battle_config.gm_can_party && pc_isGM(sd) < battle_config.gm_cant_party_max_lv)
+ || ( !pc_isGM(sd) && pc_isGM(tsd) && !battle_config.gm_can_party ) )
+ {
+ //GMs can't invite non GMs to the party if not above the invite trust level
+ //Likewise, as long as gm_can_party is off, players can't invite GMs.
+ clif_displaymessage(sd->fd, msg_txt(81));
+ return 0;
+ }
+
if(tsd==NULL) { //TODO: Find the correct reply packet.
clif_displaymessage(sd->fd, msg_txt(3));
return 0;