summaryrefslogtreecommitdiff
path: root/src/map/script.c
diff options
context:
space:
mode:
authorLupus <Lupus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-11-16 21:55:57 +0000
committerLupus <Lupus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-11-16 21:55:57 +0000
commit84567e0e4af0c4913547f1945d76bccf345b5316 (patch)
treeaab40a1a5aa0cbf01b2a32ddf103126717871b2c /src/map/script.c
parentbf0165232f8b1705c94ee02584821624f65c570b (diff)
downloadhercules-84567e0e4af0c4913547f1945d76bccf345b5316.tar.gz
hercules-84567e0e4af0c4913547f1945d76bccf345b5316.tar.bz2
hercules-84567e0e4af0c4913547f1945d76bccf345b5316.tar.xz
hercules-84567e0e4af0c4913547f1945d76bccf345b5316.zip
vending input number fix from Freya ^_-
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/athena@225 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/script.c')
-rw-r--r--src/map/script.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/map/script.c b/src/map/script.c
index 73d52679c..ddd17f915 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -1862,13 +1862,15 @@ int buildin_input(struct script_state *st)
}
}else{
- //commented by Lupus (check Value Number Input fix in clif.c)
- //** Fix by fritz :X keeps people from abusing old input bugs
- if(sd->npc_amount < 0) //** If input amount is less then 0
- {
- clif_tradecancelled(sd); // added "Deal has been cancelled" message by Valaris
- buildin_close(st); //** close
- }
+ // commented by Lupus (check Value Number Input fix in clif.c)
+ // readded by Yor: set ammount to 0 instead of cancel trade.
+ // ** Fix by fritz :X keeps people from abusing old input bugs
+ if (sd->npc_amount < 0) { //** If input amount is less then 0
+// clif_tradecancelled(sd); // added "Deal has been cancelled" message by Valaris
+// buildin_close(st); // ** close
+ sd->npc_amount = 0;
+ } else if (sd->npc_amount > battle_config.vending_max_value) // new fix by Yor
+ sd->npc_amount = battle_config.vending_max_value;
// l
if(st->end>st->start+2){ // 1
@@ -1887,7 +1889,6 @@ int buildin_input(struct script_state *st)
return 0;
}
-
/*==========================================
*
*------------------------------------------