summaryrefslogtreecommitdiff
path: root/src/map/npc.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-12-15 18:13:37 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-12-15 18:13:37 +0000
commita08c2d5709c644507cf034e319e60eeed0ad636a (patch)
treeb922bc1bf52ee40e89e101be2335c6b1408277f5 /src/map/npc.c
parentebbe046a99ed1928e60506fe1a86edc8a396ee54 (diff)
downloadhercules-a08c2d5709c644507cf034e319e60eeed0ad636a.tar.gz
hercules-a08c2d5709c644507cf034e319e60eeed0ad636a.tar.bz2
hercules-a08c2d5709c644507cf034e319e60eeed0ad636a.tar.xz
hercules-a08c2d5709c644507cf034e319e60eeed0ad636a.zip
- There will be now warnings printed when a shop sells an item which's buy price is 20z, since those usually are "rare" items with no buyying price set. Note that this reports one fake, and that is the selling of a certain shuriken that indeed costs 20z.
- Most likely fixed client crash when xmas/wedding status runs out. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9505 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/npc.c')
-rw-r--r--src/map/npc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/map/npc.c b/src/map/npc.c
index 629d9e94f..7f7e7e669 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -1657,7 +1657,12 @@ static int npc_parse_shop (char *w1, char *w2, char *w3, char *w4)
nd->u.shop_item[pos].nameid = nameid;
id = itemdb_search(nameid);
if (value < 0)
+ {
+ if (id->value_buy == 20)
+ ShowWarning ("Selling item %s [%d] with no buying price (defaults to %d) at %s\n",
+ id->name, id->nameid, id->value_buy, current_file);
value = id->value_buy;
+ }
nd->u.shop_item[pos].value = value;
// check for bad prices that can possibly cause exploits
if (value/124. < id->value_sell/75.) { //Clened up formula to prevent overflows.