summaryrefslogtreecommitdiff
path: root/src/map/log.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-07-24 20:29:18 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-07-24 20:29:18 +0000
commit4124c7f383d4ad12faa7ebe1c3663bb3e848233f (patch)
tree4cdbf42b421bdb6659d6b247c60813dd0bcd83c6 /src/map/log.c
parentcdc034b392f38d7a0be4ea69774888a308449aca (diff)
downloadhercules-4124c7f383d4ad12faa7ebe1c3663bb3e848233f.tar.gz
hercules-4124c7f383d4ad12faa7ebe1c3663bb3e848233f.tar.bz2
hercules-4124c7f383d4ad12faa7ebe1c3663bb3e848233f.tar.xz
hercules-4124c7f383d4ad12faa7ebe1c3663bb3e848233f.zip
- 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
Diffstat (limited to 'src/map/log.c')
-rw-r--r--src/map/log.c20
1 files changed, 10 insertions, 10 deletions
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;