--- deliantra/server/server/player.C 2006/11/13 20:57:16 1.28 +++ deliantra/server/server/player.C 2006/12/03 00:59:58 1.29 @@ -1428,16 +1428,13 @@ if (tmp->type == FOOD) { pick_up (op, tmp); - if (0) - fprintf (stderr, "FOOD\n"); continue; } + if (op->contr->mode & PU_DRINK) if (tmp->type == DRINK || (tmp->type == POISON && !QUERY_FLAG (tmp, FLAG_KNOWN_CURSED))) { pick_up (op, tmp); - if (0) - fprintf (stderr, "DRINK\n"); continue; } @@ -1445,8 +1442,6 @@ if (tmp->type == POTION) { pick_up (op, tmp); - if (0) - fprintf (stderr, "POTION\n"); continue; } @@ -1455,24 +1450,20 @@ if (tmp->type == SPELLBOOK) { pick_up (op, tmp); - if (0) - fprintf (stderr, "SPELLBOOK\n"); continue; } + if (op->contr->mode & PU_SKILLSCROLL) if (tmp->type == SKILLSCROLL) { pick_up (op, tmp); - if (0) - fprintf (stderr, "SKILLSCROLL\n"); continue; } + if (op->contr->mode & PU_READABLES) if (tmp->type == BOOK || tmp->type == SCROLL) { pick_up (op, tmp); - if (0) - fprintf (stderr, "READABLES\n"); continue; } @@ -1481,8 +1472,6 @@ if (tmp->type == WAND || tmp->type == ROD || tmp->type == HORN) { pick_up (op, tmp); - if (0) - fprintf (stderr, "MAGIC_DEVICE\n"); continue; } @@ -1491,8 +1480,6 @@ if (QUERY_FLAG (tmp, FLAG_KNOWN_MAGICAL) && !QUERY_FLAG (tmp, FLAG_KNOWN_CURSED)) { pick_up (op, tmp); - if (0) - fprintf (stderr, "MAGICAL\n"); continue; } @@ -1501,8 +1488,6 @@ if (tmp->type == MONEY || tmp->type == GEM) { pick_up (op, tmp); - if (0) - fprintf (stderr, "MONEY/GEM\n"); continue; } } @@ -1512,8 +1497,14 @@ if (tmp->type == RING || tmp->type == AMULET) { pick_up (op, tmp); - if (0) - fprintf (stderr, "JEWELS\n"); + continue; + } + + /* we don't forget dragon food */ + if (op->contr->mode & PU_FLESH) + if (tmp->type == FLESH) + { + pick_up (op, tmp); continue; } @@ -1522,16 +1513,13 @@ if (tmp->type == BOW) { pick_up (op, tmp); - if (0) - fprintf (stderr, "BOW\n"); continue; } + if (op->contr->mode & PU_ARROW) if (tmp->type == ARROW) { pick_up (op, tmp); - if (0) - fprintf (stderr, "ARROW\n"); continue; } @@ -1540,48 +1528,41 @@ if (tmp->type == ARMOUR) { pick_up (op, tmp); - if (0) - fprintf (stderr, "ARMOUR\n"); continue; } + if (op->contr->mode & PU_HELMET) if (tmp->type == HELMET) { pick_up (op, tmp); - if (0) - fprintf (stderr, "HELMET\n"); continue; } + if (op->contr->mode & PU_SHIELD) if (tmp->type == SHIELD) { pick_up (op, tmp); - if (0) - fprintf (stderr, "SHIELD\n"); continue; } + if (op->contr->mode & PU_BOOTS) if (tmp->type == BOOTS) { pick_up (op, tmp); - if (0) - fprintf (stderr, "BOOTS\n"); continue; } + if (op->contr->mode & PU_GLOVES) if (tmp->type == GLOVES) { pick_up (op, tmp); - if (0) - fprintf (stderr, "GLOVES\n"); continue; } + if (op->contr->mode & PU_CLOAK) if (tmp->type == CLOAK) { pick_up (op, tmp); - if (0) - fprintf (stderr, "GLOVES\n"); continue; } @@ -1590,8 +1571,6 @@ if (tmp->type == WEAPON && QUERY_FLAG (tmp, FLAG_IS_THROWN)) { pick_up (op, tmp); - if (0) - fprintf (stderr, "MISSILEWEAPON\n"); continue; } @@ -1604,18 +1583,15 @@ strstr (tmp->name, "chair") && strstr (tmp->arch->name, "chair") == NULL) { pick_up (op, tmp); - if (0) - fprintf (stderr, "WEAPON\n"); continue; } } + if (tmp->type == WEAPON && tmp->name == NULL) { if (strstr (tmp->arch->name, "table") == NULL && strstr (tmp->arch->name, "chair") == NULL) { pick_up (op, tmp); - if (0) - fprintf (stderr, "WEAPON\n"); continue; } } @@ -1626,8 +1602,6 @@ if (tmp->type == KEY || tmp->type == SPECIAL_KEY) { pick_up (op, tmp); - if (0) - fprintf (stderr, "KEY\n"); continue; } @@ -1659,6 +1633,7 @@ } } /* the new pickup model */ } + return !stop; }