summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKenpachi Developer <Kenpachi.Developer@gmx.de>2020-06-25 08:11:48 +0200
committerKenpachi Developer <Kenpachi.Developer@gmx.de>2020-06-25 08:11:48 +0200
commit1ae87bdd29223dd5983b92bbac54496e7277d98d (patch)
tree87ff2ea1f8950413ff8c5b7d8d52551838b457e1 /src
parent43160bc727551e07252dfcb5dbcad183cc9308c9 (diff)
downloadhercules-1ae87bdd29223dd5983b92bbac54496e7277d98d.tar.gz
hercules-1ae87bdd29223dd5983b92bbac54496e7277d98d.tar.bz2
hercules-1ae87bdd29223dd5983b92bbac54496e7277d98d.tar.xz
hercules-1ae87bdd29223dd5983b92bbac54496e7277d98d.zip
Enable party booking features while Megaphone input box is present
Diffstat (limited to 'src')
-rw-r--r--src/map/clif.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 7a394f0ae..96348d338 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -13937,7 +13937,7 @@ static void clif_parse_PartyBookingRegisterReq(int fd, struct map_session_data *
static void clif_parse_PartyBookingRegisterReq(int fd, struct map_session_data *sd)
{
#ifndef PARTY_RECRUIT
- if (pc_istrading(sd) || pc_isvending(sd))
+ if (pc_istrading_except_npc(sd) || (sd->npc_id != 0 && sd->state.using_megaphone == 0) || pc_isvending(sd))
return;
short level = RFIFOW(fd,2);
@@ -13982,7 +13982,7 @@ static void clif_parse_PartyBookingSearchReq(int fd, struct map_session_data *sd
static void clif_parse_PartyBookingSearchReq(int fd, struct map_session_data *sd)
{
#ifndef PARTY_RECRUIT
- if (pc_istrading(sd) || pc_isvending(sd))
+ if (pc_istrading_except_npc(sd) || (sd->npc_id != 0 && sd->state.using_megaphone == 0) || pc_isvending(sd))
return;
short level = RFIFOW(fd,2);
@@ -14036,7 +14036,7 @@ static void clif_parse_PartyBookingDeleteReq(int fd, struct map_session_data *sd
static void clif_parse_PartyBookingDeleteReq(int fd, struct map_session_data *sd)
{
#ifndef PARTY_RECRUIT
- if (pc_istrading(sd) || pc_isvending(sd))
+ if (pc_istrading_except_npc(sd) || (sd->npc_id != 0 && sd->state.using_megaphone == 0) || pc_isvending(sd))
return;
if (party->booking_delete(sd))
@@ -14075,7 +14075,7 @@ static void clif_parse_PartyBookingUpdateReq(int fd, struct map_session_data *sd
static void clif_parse_PartyBookingUpdateReq(int fd, struct map_session_data *sd)
{
#ifndef PARTY_RECRUIT
- if (pc_istrading(sd) || pc_isvending(sd))
+ if (pc_istrading_except_npc(sd) || (sd->npc_id != 0 && sd->state.using_megaphone == 0) || pc_isvending(sd))
return;
short job[PARTY_BOOKING_JOBS];
@@ -14094,7 +14094,7 @@ static void clif_parse_PartyBookingUpdateReq(int fd, struct map_session_data *sd
static void clif_PartyBookingInsertNotify(struct map_session_data *sd, struct party_booking_ad_info *pb_ad)
{
#ifndef PARTY_RECRUIT
- if (pc_istrading(sd) || pc_isvending(sd))
+ if (pc_istrading_except_npc(sd) || (sd->npc_id != 0 && sd->state.using_megaphone == 0) || pc_isvending(sd))
return;
int i;
@@ -14165,7 +14165,7 @@ static void clif_parse_PartyRecruitRegisterReq(int fd, struct map_session_data *
static void clif_parse_PartyRecruitRegisterReq(int fd, struct map_session_data *sd)
{
#ifdef PARTY_RECRUIT
- if (pc_istrading(sd) || pc_isvending(sd))
+ if (pc_istrading_except_npc(sd) || (sd->npc_id != 0 && sd->state.using_megaphone == 0) || pc_isvending(sd))
return;
short level = RFIFOW(fd, 2);
@@ -14239,7 +14239,7 @@ static void clif_parse_PartyRecruitSearchReq(int fd, struct map_session_data *sd
static void clif_parse_PartyRecruitSearchReq(int fd, struct map_session_data *sd)
{
#ifdef PARTY_RECRUIT
- if (pc_istrading(sd) || pc_isvending(sd))
+ if (pc_istrading_except_npc(sd) || (sd->npc_id != 0 && sd->state.using_megaphone == 0) || pc_isvending(sd))
return;
short level = RFIFOW(fd, 2);
@@ -14259,7 +14259,7 @@ static void clif_parse_PartyRecruitDeleteReq(int fd, struct map_session_data *sd
static void clif_parse_PartyRecruitDeleteReq(int fd, struct map_session_data *sd)
{
#ifdef PARTY_RECRUIT
- if (pc_istrading(sd) || pc_isvending(sd))
+ if (pc_istrading_except_npc(sd) || (sd->npc_id != 0 && sd->state.using_megaphone == 0) || pc_isvending(sd))
return;
if (party->booking_delete(sd))
@@ -14298,7 +14298,7 @@ static void clif_parse_PartyRecruitUpdateReq(int fd, struct map_session_data *sd
static void clif_parse_PartyRecruitUpdateReq(int fd, struct map_session_data *sd)
{
#ifdef PARTY_RECRUIT
- if (pc_istrading(sd) || pc_isvending(sd))
+ if (pc_istrading_except_npc(sd) || (sd->npc_id != 0 && sd->state.using_megaphone == 0) || pc_isvending(sd))
return;
const char *notice = RFIFOP(fd, 2);
@@ -14374,7 +14374,7 @@ static void clif_parse_PartyBookingAddFilteringList(int fd, struct map_session_d
static void clif_parse_PartyBookingAddFilteringList(int fd, struct map_session_data *sd)
{
#ifdef PARTY_RECRUIT
- if (pc_istrading(sd) || pc_isvending(sd))
+ if (pc_istrading_except_npc(sd) || (sd->npc_id != 0 && sd->state.using_megaphone == 0) || pc_isvending(sd))
return;
int index = RFIFOL(fd, 2);
@@ -14391,7 +14391,7 @@ static void clif_parse_PartyBookingSubFilteringList(int fd, struct map_session_d
static void clif_parse_PartyBookingSubFilteringList(int fd, struct map_session_data *sd)
{
#ifdef PARTY_RECRUIT
- if (pc_istrading(sd) || pc_isvending(sd))
+ if (pc_istrading_except_npc(sd) || (sd->npc_id != 0 && sd->state.using_megaphone == 0) || pc_isvending(sd))
return;
int gid = RFIFOL(fd, 2);
@@ -14408,7 +14408,7 @@ static void clif_parse_PartyBookingReqVolunteer(int fd, struct map_session_data
static void clif_parse_PartyBookingReqVolunteer(int fd, struct map_session_data *sd)
{
#ifdef PARTY_RECRUIT
- if (pc_istrading(sd) || pc_isvending(sd))
+ if (pc_istrading_except_npc(sd) || (sd->npc_id != 0 && sd->state.using_megaphone == 0) || pc_isvending(sd))
return;
int index = RFIFOL(fd, 2);
@@ -14487,7 +14487,7 @@ static void clif_parse_PartyBookingRefuseVolunteer(int fd, struct map_session_da
static void clif_parse_PartyBookingRefuseVolunteer(int fd, struct map_session_data *sd)
{
#ifdef PARTY_RECRUIT
- if (pc_istrading(sd) || pc_isvending(sd))
+ if (pc_istrading_except_npc(sd) || (sd->npc_id != 0 && sd->state.using_megaphone == 0) || pc_isvending(sd))
return;
unsigned int aid = RFIFOL(fd, 2);
@@ -14519,7 +14519,7 @@ static void clif_parse_PartyBookingCancelVolunteer(int fd, struct map_session_da
static void clif_parse_PartyBookingCancelVolunteer(int fd, struct map_session_data *sd)
{
#ifdef PARTY_RECRUIT
- if (pc_istrading(sd) || pc_isvending(sd))
+ if (pc_istrading_except_npc(sd) || (sd->npc_id != 0 && sd->state.using_megaphone == 0) || pc_isvending(sd))
return;
int index = RFIFOL(fd, 2);