summaryrefslogtreecommitdiff
path: root/src/map/vending.c
diff options
context:
space:
mode:
authorshennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-12-20 13:51:30 +0000
committershennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-12-20 13:51:30 +0000
commit46ad2a8a7ec3cbad577ec5f83b37afc21f657c01 (patch)
tree55a3673bb5297130115f66157118a22e1aad2f1f /src/map/vending.c
parentd0f02711b3eb7e510169a0a66dcbf584f88912a5 (diff)
downloadhercules-46ad2a8a7ec3cbad577ec5f83b37afc21f657c01.tar.gz
hercules-46ad2a8a7ec3cbad577ec5f83b37afc21f657c01.tar.bz2
hercules-46ad2a8a7ec3cbad577ec5f83b37afc21f657c01.tar.xz
hercules-46ad2a8a7ec3cbad577ec5f83b37afc21f657c01.zip
vending bugfix for bugreport:947
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15188 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/vending.c')
-rw-r--r--src/map/vending.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/map/vending.c b/src/map/vending.c
index 3bb528509..a34c715ee 100644
--- a/src/map/vending.c
+++ b/src/map/vending.c
@@ -254,8 +254,8 @@ void vending_openvending(struct map_session_data* sd, const char* message, bool
if( !flag ) // cancelled
return; // nothing to do
- if (pc_istrading(sd))
- return; // can't have 2 shops at once
+ if ( pc_isdead(sd) || pc_istrading(sd))
+ return; // can't open vendings lying dead || can't have 2 shops at once
vending_skill_lvl = pc_checkskill(sd, MC_VENDING);
// skill level and cart check
@@ -306,7 +306,7 @@ void vending_openvending(struct map_session_data* sd, const char* message, bool
clif_skill_fail(sd, MC_VENDING, 0, 0); // custom reply packet
return;
}
-
+ sd->state.prevend = 0;
sd->state.vending = true;
sd->vender_id = vending_getuid();
sd->vend_num = i;