summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorcelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-01-05 11:01:43 +0000
committercelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-01-05 11:01:43 +0000
commitabb62fb8167c112b4f9f848bf3a763e4f4376c51 (patch)
treeb37afa3a276004fdd2b43491d1166027dff29288 /src/map
parent4280180ca690da7c6734db0d4bb3cea50ae2e980 (diff)
downloadhercules-abb62fb8167c112b4f9f848bf3a763e4f4376c51.tar.gz
hercules-abb62fb8167c112b4f9f848bf3a763e4f4376c51.tar.bz2
hercules-abb62fb8167c112b4f9f848bf3a763e4f4376c51.tar.xz
hercules-abb62fb8167c112b4f9f848bf3a763e4f4376c51.zip
If a vending item was priced at 0 it'll be auto changed to 1million
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@918 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r--src/map/vending.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/map/vending.c b/src/map/vending.c
index ec9076310..a06ef285d 100644
--- a/src/map/vending.c
+++ b/src/map/vending.c
@@ -145,7 +145,10 @@ void vending_openvending(struct map_session_data *sd,int len,char *message,int f
sd->vending[i].index = *(short*)(p+8*i)-2;
sd->vending[i].amount = *(short*)(p+2+8*i);
sd->vending[i].value = *(int*)(p+4+8*i);
- if(sd->vending[i].value>battle_config.vending_max_value)sd->vending[i].value=battle_config.vending_max_value;
+ if(sd->vending[i].value > battle_config.vending_max_value)
+ sd->vending[i].value=battle_config.vending_max_value;
+ else if(sd->vending[i].value = 0)
+ sd->vending[i].value = 1000000; // auto set to 1 million [celest]
// カート内のアイテム数と販売するアイテム数に相違があったら中止
if(pc_cartitem_amount(sd, sd->vending[i].index, sd->vending[i].amount) < 0 || sd->vending[i].value < 0) { // fixes by Valaris and fritz
clif_skill_fail(sd, MC_VENDING, 0, 0);