diff options
author | Andrei Karas <akaras@inbox.ru> | 2019-05-03 01:56:25 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2019-05-05 22:24:25 +0300 |
commit | 1c3269935f7ad144ab8af5d2129d030a27f4acb9 (patch) | |
tree | 015a967de011220888f79bae9f1fcced6d583ee5 | |
parent | 7923cecc16aad3ff6fb80070240e99e667af1d6c (diff) | |
download | hercules-1c3269935f7ad144ab8af5d2129d030a27f4acb9.tar.gz hercules-1c3269935f7ad144ab8af5d2129d030a27f4acb9.tar.bz2 hercules-1c3269935f7ad144ab8af5d2129d030a27f4acb9.tar.xz hercules-1c3269935f7ad144ab8af5d2129d030a27f4acb9.zip |
Add some missing trading flag checks
-rw-r--r-- | src/map/clif.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index c9b895656..299c69a1c 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -12161,7 +12161,7 @@ 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 (sd->state.vending || sd->state.prevend) + if (pc_istrading(sd) || sd->state.prevend) return; if (!pc_iscarton(sd)) return; @@ -13037,7 +13037,7 @@ static void clif_parse_MoveToKafra(int fd, struct map_session_data *sd) { int item_index, item_amount; - if (pc_istrading(sd)) + if (pc_istrading(sd) || sd->state.prevend) return; item_index = RFIFOW(fd,packet_db[RFIFOW(fd,0)].pos[0])-2; @@ -13058,6 +13058,9 @@ static void clif_parse_MoveFromKafra(int fd, struct map_session_data *sd) __attr /// There are various variants of this packet, some of them have padding between fields. static void clif_parse_MoveFromKafra(int fd, struct map_session_data *sd) { + if (pc_istrading(sd) || sd->state.prevend) + return; + int item_index, item_amount; item_index = RFIFOW(fd,packet_db[RFIFOW(fd,0)].pos[0])-1; @@ -13074,7 +13077,7 @@ static void clif_parse_MoveToKafraFromCart(int fd, struct map_session_data *sd) /// 0129 <index>.W <amount>.L static void clif_parse_MoveToKafraFromCart(int fd, struct map_session_data *sd) { - if (sd->state.vending || sd->state.prevend) + if (pc_istrading(sd) || sd->state.prevend) return; if (!pc_iscarton(sd)) return; @@ -13090,7 +13093,7 @@ static void clif_parse_MoveFromKafraToCart(int fd, struct map_session_data *sd) /// 0128 <index>.W <amount>.L static void clif_parse_MoveFromKafraToCart(int fd, struct map_session_data *sd) { - if (sd->state.vending || sd->state.prevend) + if (pc_istrading(sd) || sd->state.prevend) return; if (!pc_iscarton(sd)) return; |