summaryrefslogtreecommitdiff
path: root/src/map/party.c
diff options
context:
space:
mode:
authorgumi <mekolat@users.noreply.github.com>2017-07-31 16:39:33 -0400
committergumi <mekolat@users.noreply.github.com>2017-08-01 10:10:19 -0400
commit4bde7760f12752a385ff065c8d83bc66765b93b8 (patch)
tree179bcdbe28eeb4e655b7b6f78b9d0e9a735bf071 /src/map/party.c
parent71d694baa88d2beb6ec0f89fb2f8b733898acea5 (diff)
downloadhercules-4bde7760f12752a385ff065c8d83bc66765b93b8.tar.gz
hercules-4bde7760f12752a385ff065c8d83bc66765b93b8.tar.bz2
hercules-4bde7760f12752a385ff065c8d83bc66765b93b8.tar.xz
hercules-4bde7760f12752a385ff065c8d83bc66765b93b8.zip
add option to restrict party leader change to same map
Diffstat (limited to 'src/map/party.c')
-rw-r--r--src/map/party.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/map/party.c b/src/map/party.c
index 26b4bae8b..a4a7e6dca 100644
--- a/src/map/party.c
+++ b/src/map/party.c
@@ -731,6 +731,11 @@ bool party_changeleader(struct map_session_data *sd, struct map_session_data *ts
return false;
}
+ if (battle_config.party_change_leader_same_map && sd->bl.m != tsd->bl.m) {
+ clif->msgtable(sd, MSG_PARTY_LEADER_SAMEMAP); // It is only possible to change the party leader while on the same map.
+ return false;
+ }
+
if( map->list[sd->bl.m].flag.partylock ) {
clif->message(sd->fd, msg_sd(sd,287)); // You cannot change party leaders in this map.
return false;