From 4124c7f383d4ad12faa7ebe1c3663bb3e848233f Mon Sep 17 00:00:00 2001 From: skotlex Date: Mon, 24 Jul 2006 20:29:18 +0000 Subject: - Cleaned up the Mistress Card related code so that the no-gemstone bonus reduces item requirements by one rather than totally skip them. - Cleaned up the logs "can log"function to use the IT constants. Also corrected the "only log large amounts" setting not working on negative values (trades). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7863 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/log.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/map/log.c') diff --git a/src/map/log.c b/src/map/log.c index 279819099..08a20b456 100644 --- a/src/map/log.c +++ b/src/map/log.c @@ -47,17 +47,17 @@ time_t curtime; //check if this item should be logged according the settings int should_log_item(int filter, int nameid, int amount) { struct item_data *item_data; - if (nameid<501 || (item_data= itemdb_search(nameid)) == NULL) return 0; - if ( (filter&1) || // Filter = 1, we log any item - (filter&2 && item_data->type == 0 ) || //healing items - (filter&4 && (item_data->type == 3 || item_data->type == 10) ) || //etc+arrows - (filter&8 && (item_data->type == 2 || item_data->type == 11) ) || //usable - (filter&16 && item_data->type == 4 ) || //weapon - (filter&32 && item_data->type == 5 ) || //armor - (filter&64 && item_data->type == 6 ) || //cards - (filter&128 && (item_data->type == 7 || item_data->type == 8) ) || //eggs+pet access + if ((item_data= itemdb_exists(nameid)) == NULL) return 0; + if ((filter&1) || // Filter = 1, we log any item + (filter&2 && item_data->type == IT_HEALING ) || + (filter&4 && (item_data->type == IT_ETC || item_data->type == IT_AMMO) ) || + (filter&8 && item_data->type == IT_USABLE ) || + (filter&16 && item_data->type == IT_WEAPON ) || + (filter&32 && item_data->type == IT_ARMOR ) || + (filter&64 && item_data->type == IT_CARD ) || + (filter&128 && (item_data->type == IT_PETEGG || item_data->type == IT_PETARMOR) ) || (filter&256 && item_data->value_buy >= log_config.price_items_log ) || //expensive items - (filter&512 && amount >= log_config.amount_items_log ) || //big amount of items + (filter&512 && abs(amount) >= log_config.amount_items_log ) || //big amount of items (filter&2048 && ((item_data->maxchance <= log_config.rare_items_log) || item_data->nameid == 714) ) //Rare items or Emperium ) return item_data->nameid; -- cgit v1.2.3-60-g2f50