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.53 by root, Sat Apr 21 16:56:30 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->deactivate_recursive ();
243 op->expand_tail ();
244
242 if (ob_blocked (op, creator->map, creator->x, creator->y)) 245 if (ob_blocked (op, creator->map, creator->x, creator->y))
243 op->destroy (); 246 op->destroy ();
244 else 247 else
245 { 248 {
246 SET_FLAG (op, FLAG_OBJ_ORIGINAL); 249 SET_FLAG (op, FLAG_OBJ_ORIGINAL);
1570 if (change->msg) 1573 if (change->msg)
1571 op->msg = change->msg; 1574 op->msg = change->msg;
1572} 1575}
1573 1576
1574static int 1577static int
1575legal_artifact_combination (object *op, artifact * art) 1578legal_artifact_combination (object *op, artifact *art)
1576{ 1579{
1577 int neg, success = 0; 1580 int neg, success = 0;
1578 linked_char *tmp; 1581 linked_char *tmp;
1579 const char *name; 1582 const char *name;
1580 1583
1581 if (art->allowed == (linked_char *) NULL) 1584 if (!art->allowed)
1582 return 1; /* Ie, "all" */ 1585 return 1; /* Ie, "all" */
1586
1583 for (tmp = art->allowed; tmp; tmp = tmp->next) 1587 for (tmp = art->allowed; tmp; tmp = tmp->next)
1584 { 1588 {
1585#ifdef TREASURE_VERBOSE 1589#ifdef TREASURE_VERBOSE
1586 LOG (llevDebug, "legal_art: %s\n", &tmp->name); 1590 LOG (llevDebug, "legal_art: %s\n", &tmp->name);
1587#endif 1591#endif
1598 * everything is allowed except what we match 1602 * everything is allowed except what we match
1599 */ 1603 */
1600 else if (neg) 1604 else if (neg)
1601 success = 1; 1605 success = 1;
1602 } 1606 }
1607
1603 return success; 1608 return success;
1604} 1609}
1605 1610
1606/* 1611/*
1607 * Fixes the given object, giving it the abilities and titles 1612 * Fixes the given object, giving it the abilities and titles

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines