summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-11-14 14:21:47 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-11-14 14:21:47 +0000
commitc9d4051012392245ec08e1ee25395bd22555e638 (patch)
tree772d7b672d421ed0e07df450d7904d9174f2eb56 /src/map/clif.c
parentaf5a9674dc39e941466fe92502d77f1a6861d0c0 (diff)
downloadhercules-c9d4051012392245ec08e1ee25395bd22555e638.tar.gz
hercules-c9d4051012392245ec08e1ee25395bd22555e638.tar.bz2
hercules-c9d4051012392245ec08e1ee25395bd22555e638.tar.xz
hercules-c9d4051012392245ec08e1ee25395bd22555e638.zip
- Characters with Karma may fight amongst them anywhere.
- Added mapflags partylock and guildlock, which lock the state of the parties/guilds on said maps. partylock blocks user party requests to create/invite/leave/kick, while guildlock blocks user guild requests to create/invite/leave/expel/make alliance/make opposition/delete alliance/delete opposition/break git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9216 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c72
1 files changed, 72 insertions, 0 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 01032a535..bc3f1e2e7 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -10308,6 +10308,11 @@ void clif_parse_CloseKafra(int fd, struct map_session_data *sd) {
*/
void clif_parse_CreateParty(int fd, struct map_session_data *sd) {
RFIFOHEAD(fd);
+ if(map[sd->bl.m].flag.partylock)
+ { //Guild locked.
+ clif_displaymessage(fd, msg_txt(227));
+ return;
+ }
if (battle_config.basic_skill_check == 0 || pc_checkskill(sd,NV_BASIC) >= 7) {
party_create(sd,(char*)RFIFOP(fd,2),0,0);
} else
@@ -10319,6 +10324,11 @@ void clif_parse_CreateParty(int fd, struct map_session_data *sd) {
*------------------------------------------
*/
void clif_parse_CreateParty2(int fd, struct map_session_data *sd) {
+ if(map[sd->bl.m].flag.partylock)
+ { //Guild locked.
+ clif_displaymessage(fd, msg_txt(227));
+ return;
+ }
if (battle_config.basic_skill_check == 0 || pc_checkskill(sd,NV_BASIC) >= 7){
RFIFOHEAD(fd);
party_create(sd,(char*)RFIFOP(fd,2),RFIFOB(fd,26),RFIFOB(fd,27));
@@ -10335,6 +10345,12 @@ void clif_parse_PartyInvite(int fd, struct map_session_data *sd) {
struct map_session_data *t_sd;
RFIFOHEAD(fd);
+ if(map[sd->bl.m].flag.partylock)
+ { //Guild locked.
+ clif_displaymessage(fd, msg_txt(227));
+ return;
+ }
+
t_sd = map_id2sd(RFIFOL(sd->fd,2));
// @noask [LuzZza]
@@ -10365,6 +10381,11 @@ void clif_parse_ReplyPartyInvite(int fd,struct map_session_data *sd) {
*------------------------------------------
*/
void clif_parse_LeaveParty(int fd, struct map_session_data *sd) {
+ if(map[sd->bl.m].flag.partylock)
+ { //Guild locked.
+ clif_displaymessage(fd, msg_txt(227));
+ return;
+ }
party_leave(sd);
}
@@ -10374,6 +10395,11 @@ void clif_parse_LeaveParty(int fd, struct map_session_data *sd) {
*/
void clif_parse_RemovePartyMember(int fd, struct map_session_data *sd) {
RFIFOHEAD(fd);
+ if(map[sd->bl.m].flag.partylock)
+ { //Guild locked.
+ clif_displaymessage(fd, msg_txt(227));
+ return;
+ }
party_removemember(sd,RFIFOL(fd,2),(char*)RFIFOP(fd,6));
}
@@ -10471,6 +10497,11 @@ void clif_parse_OpenVending(int fd,struct map_session_data *sd) {
*/
void clif_parse_CreateGuild(int fd,struct map_session_data *sd) {
RFIFOHEAD(fd);
+ if(map[sd->bl.m].flag.guildlock)
+ { //Guild locked.
+ clif_displaymessage(fd, msg_txt(228));
+ return;
+ }
guild_create(sd, (char*)RFIFOP(fd,6));
}
@@ -10580,6 +10611,13 @@ void clif_parse_GuildInvite(int fd,struct map_session_data *sd) {
struct map_session_data *t_sd;
RFIFOHEAD(fd);
+
+ if(map[sd->bl.m].flag.guildlock)
+ { //Guild locked.
+ clif_displaymessage(fd, msg_txt(228));
+ return;
+ }
+
t_sd = map_id2sd(RFIFOL(sd->fd,2));
// @noask [LuzZza]
@@ -10606,6 +10644,11 @@ void clif_parse_GuildReplyInvite(int fd,struct map_session_data *sd) {
*/
void clif_parse_GuildLeave(int fd,struct map_session_data *sd) {
RFIFOHEAD(fd);
+ if(map[sd->bl.m].flag.guildlock)
+ { //Guild locked.
+ clif_displaymessage(fd, msg_txt(228));
+ return;
+ }
guild_leave(sd,RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10),(char*)RFIFOP(fd,14));
}
@@ -10615,6 +10658,11 @@ void clif_parse_GuildLeave(int fd,struct map_session_data *sd) {
*/
void clif_parse_GuildExpulsion(int fd,struct map_session_data *sd) {
RFIFOHEAD(fd);
+ if(map[sd->bl.m].flag.guildlock)
+ { //Guild locked.
+ clif_displaymessage(fd, msg_txt(228));
+ return;
+ }
guild_expulsion(sd,RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10),(char*)RFIFOP(fd,14));
}
@@ -10654,6 +10702,13 @@ void clif_parse_GuildRequestAlliance(int fd, struct map_session_data *sd) {
struct map_session_data *t_sd;
RFIFOHEAD(fd);
+
+ if(map[sd->bl.m].flag.guildlock)
+ { //Guild locked.
+ clif_displaymessage(fd, msg_txt(228));
+ return;
+ }
+
t_sd = map_id2sd(RFIFOL(sd->fd,2));
// @noask [LuzZza]
@@ -10680,6 +10735,11 @@ void clif_parse_GuildReplyAlliance(int fd, struct map_session_data *sd) {
*/
void clif_parse_GuildDelAlliance(int fd, struct map_session_data *sd) {
RFIFOHEAD(fd);
+ if(map[sd->bl.m].flag.guildlock)
+ { //Guild locked.
+ clif_displaymessage(fd, msg_txt(228));
+ return;
+ }
guild_delalliance(sd,RFIFOL(fd,2),RFIFOL(fd,6));
}
@@ -10692,6 +10752,13 @@ void clif_parse_GuildOpposition(int fd, struct map_session_data *sd) {
struct map_session_data *t_sd;
RFIFOHEAD(fd);
+
+ if(map[sd->bl.m].flag.guildlock)
+ { //Guild locked.
+ clif_displaymessage(fd, msg_txt(228));
+ return;
+ }
+
t_sd = map_id2sd(RFIFOL(sd->fd,2));
// @noask [LuzZza]
@@ -10709,6 +10776,11 @@ void clif_parse_GuildOpposition(int fd, struct map_session_data *sd) {
*/
void clif_parse_GuildBreak(int fd, struct map_session_data *sd) {
RFIFOHEAD(fd);
+ if(map[sd->bl.m].flag.guildlock)
+ { //Guild locked.
+ clif_displaymessage(fd, msg_txt(228));
+ return;
+ }
guild_break(sd,(char*)RFIFOP(fd,2));
}