summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorKenpachi Developer <Kenpachi.Developer@gmx.de>2020-06-25 08:00:37 +0200
committerKenpachi Developer <Kenpachi.Developer@gmx.de>2020-06-25 08:00:37 +0200
commit7aacf9eed8162c18733364cc9b52f1b9358bc9db (patch)
tree8d7591ee91a938c9f258d9becf71a6b5c9366de0 /src/map
parent7aa47a08bfdce1a6f65acaa86815b9d8a02e3a48 (diff)
downloadhercules-7aacf9eed8162c18733364cc9b52f1b9358bc9db.tar.gz
hercules-7aacf9eed8162c18733364cc9b52f1b9358bc9db.tar.bz2
hercules-7aacf9eed8162c18733364cc9b52f1b9358bc9db.tar.xz
hercules-7aacf9eed8162c18733364cc9b52f1b9358bc9db.zip
Enable moving items between cart and inventory while Megaphone input box is present
Diffstat (limited to 'src/map')
-rw-r--r--src/map/clif.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index db719256e..491e4f805 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -12548,8 +12548,10 @@ static void clif_parse_PutItemToCart(int fd, struct map_session_data *sd) __attr
static void clif_parse_PutItemToCart(int fd, struct map_session_data *sd)
{
int flag = 0;
- if (pc_istrading(sd) || sd->state.prevend)
+
+ if (pc_istrading_except_npc(sd) || (sd->npc_id != 0 && sd->state.using_megaphone == 0) || sd->state.prevend != 0)
return;
+
if (!pc_iscarton(sd))
return;
if ( (flag = pc->putitemtocart(sd,RFIFOW(fd,2)-2,RFIFOL(fd,4))) ) {
@@ -12563,8 +12565,9 @@ static void clif_parse_GetItemFromCart(int fd, struct map_session_data *sd) __at
/// 0127 <index>.W <amount>.L
static void clif_parse_GetItemFromCart(int fd, struct map_session_data *sd)
{
- if (pc_istrading(sd) || sd->state.prevend)
+ if (pc_istrading_except_npc(sd) || (sd->npc_id != 0 && sd->state.using_megaphone == 0) || sd->state.prevend != 0)
return;
+
if (!pc_iscarton(sd))
return;
pc->getitemfromcart(sd,RFIFOW(fd,2)-2,RFIFOL(fd,4));