ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/common/treasure.C
(Generate patch)

Comparing deliantra/server/common/treasure.C (file contents):
Revision 1.51 by root, Thu Apr 19 16:36:00 2007 UTC vs.
Revision 1.54 by root, Sat Apr 21 17:34:23 2007 UTC

237 * this is the original object, or if this is an object that should be created 237 * this is the original object, or if this is an object that should be created
238 * by another object. 238 * by another object.
239 */ 239 */
240 if (flags & GT_ENVIRONMENT && op->type != SPELL) 240 if (flags & GT_ENVIRONMENT && op->type != SPELL)
241 { 241 {
242 op->expand_tail ();
243
242 if (ob_blocked (op, creator->map, creator->x, creator->y)) 244 if (ob_blocked (op, creator->map, creator->x, creator->y))
243 op->destroy (); 245 op->destroy ();
244 else 246 else
245 { 247 {
246 SET_FLAG (op, FLAG_OBJ_ORIGINAL); 248 SET_FLAG (op, FLAG_OBJ_ORIGINAL);
1570 if (change->msg) 1572 if (change->msg)
1571 op->msg = change->msg; 1573 op->msg = change->msg;
1572} 1574}
1573 1575
1574static int 1576static int
1575legal_artifact_combination (object *op, artifact * art) 1577legal_artifact_combination (object *op, artifact *art)
1576{ 1578{
1577 int neg, success = 0; 1579 int neg, success = 0;
1578 linked_char *tmp; 1580 linked_char *tmp;
1579 const char *name; 1581 const char *name;
1580 1582
1581 if (art->allowed == (linked_char *) NULL) 1583 if (!art->allowed)
1582 return 1; /* Ie, "all" */ 1584 return 1; /* Ie, "all" */
1585
1583 for (tmp = art->allowed; tmp; tmp = tmp->next) 1586 for (tmp = art->allowed; tmp; tmp = tmp->next)
1584 { 1587 {
1585#ifdef TREASURE_VERBOSE 1588#ifdef TREASURE_VERBOSE
1586 LOG (llevDebug, "legal_art: %s\n", &tmp->name); 1589 LOG (llevDebug, "legal_art: %s\n", &tmp->name);
1587#endif 1590#endif
1598 * everything is allowed except what we match 1601 * everything is allowed except what we match
1599 */ 1602 */
1600 else if (neg) 1603 else if (neg)
1601 success = 1; 1604 success = 1;
1602 } 1605 }
1606
1603 return success; 1607 return success;
1604} 1608}
1605 1609
1606/* 1610/*
1607 * Fixes the given object, giving it the abilities and titles 1611 * Fixes the given object, giving it the abilities and titles

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines