viewing paste topic/4217- price reduce itemdb.c | Diff

Posted on the
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
 src/map/itemdb.c | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)
 
diff --git a/src/map/itemdb.c b/src/map/itemdb.c
index bfcc6f7..9b63ce5 100644
--- a/src/map/itemdb.c
+++ b/src/map/itemdb.c
@@ -1582,6 +1582,33 @@ int itemdb_validate_entry(struct item_data *entry, int n, const char *source) {
        entry->flag.delay_consume = 1;
    }
 
+   // hard-coded price modification
+   switch ( entry->type ) {
+   case IT_HEALING:
+       entry->value_buy = 1;
+       entry->value_sell = entry->value_buy / 2;
+       break;
+   case IT_USABLE:
+   case IT_DELAYCONSUME:
+       entry->value_buy = 1;
+       entry->value_sell = entry->value_buy / 2;
+       break;
+   case IT_ETC:
+       entry->value_buy = 5;
+       entry->value_sell = entry->value_buy / 2;
+       break;
+   case IT_ARMOR:
+       entry->value_buy = 10;
+       entry->value_sell = entry->value_buy / 2;
+       break;
+   case IT_WEAPON:
+       entry->value_buy = 20;
+       entry->value_sell = entry->value_buy / 2;
+       break;
+   default:
+       break;
+   }
+
    //When a particular price is not given, we should base it off the other one
    //(it is important to make a distinction between 'no price' and 0z)
    if( entry->value_buy < 0 && entry->value_sell < 0 ) {
 
Viewed 1266 times, submitted by AnnieRuru.