diff options
author | Haru <haru@dotalux.com> | 2020-06-28 03:21:28 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-28 03:21:28 +0200 |
commit | 9b22213254d64b2c155c6700030303852fd5b912 (patch) | |
tree | 7eb4047ade3194749eee98d62beca06fdf820a39 /src/map/vending.c | |
parent | 44513531ea39c6bdb464ef74ef60a21d70084904 (diff) | |
parent | 1d00e2268b7a20077d9d61dc8989b9f770344e59 (diff) | |
download | hercules-9b22213254d64b2c155c6700030303852fd5b912.tar.gz hercules-9b22213254d64b2c155c6700030303852fd5b912.tar.bz2 hercules-9b22213254d64b2c155c6700030303852fd5b912.tar.xz hercules-9b22213254d64b2c155c6700030303852fd5b912.zip |
Merge pull request #2775 from Kenpachi2k13/megaphone
Fix Megaphone behaviour
Diffstat (limited to 'src/map/vending.c')
-rw-r--r-- | src/map/vending.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/map/vending.c b/src/map/vending.c index 4fd009025..9b3f48f38 100644 --- a/src/map/vending.c +++ b/src/map/vending.c @@ -251,8 +251,10 @@ static void vending_openvending(struct map_session_data *sd, const char *message int vending_skill_lvl; nullpo_retv(sd); - if ( pc_isdead(sd) || !sd->state.prevend || pc_istrading(sd)) - return; // can't open vendings lying dead || didn't use via the skill (wpe/hack) || can't have 2 shops at once + if (pc_isdead(sd) || sd->state.prevend == 0 || pc_istrading_except_npc(sd) + || (sd->npc_id != 0 && sd->state.using_megaphone == 0)) { + return; // Can't open vendings lying dead. || Didn't use via the skill. (wpe/hack) || Can't have 2 shops at once. + } vending_skill_lvl = pc->checkskill(sd, MC_VENDING); // skill level and cart check |