… | |
… | |
505 | //new_draw_info_format (NDI_UNIQUE, 0, this, "You switch to your %s.", &ob->name); |
505 | //new_draw_info_format (NDI_UNIQUE, 0, this, "You switch to your %s.", &ob->name); |
506 | } |
506 | } |
507 | else |
507 | else |
508 | ;//new_draw_info_format (NDI_UNIQUE, 0, this, "You unwield your weapons."); |
508 | ;//new_draw_info_format (NDI_UNIQUE, 0, this, "You unwield your weapons."); |
509 | |
509 | |
|
|
510 | if (ob && !ob->flag [FLAG_APPLIED] && ob->type != SPELL) |
|
|
511 | { |
|
|
512 | LOG (llevError | logBacktrace, "%s changed to unapplied weapon %s", |
|
|
513 | &name, ob->debug_desc ()); |
|
|
514 | return false; |
|
|
515 | } |
|
|
516 | |
510 | return true; |
517 | return true; |
511 | } |
518 | } |
512 | |
519 | |
513 | /* Zero the key_values on op, decrementing the shared-string |
520 | /* Zero the key_values on op, decrementing the shared-string |
514 | * refcounts and freeing the links. |
521 | * refcounts and freeing the links. |
… | |
… | |
1660 | return op; |
1667 | return op; |
1661 | } |
1668 | } |
1662 | |
1669 | |
1663 | if (where->head) |
1670 | if (where->head) |
1664 | { |
1671 | { |
1665 | LOG (llevDebug, "Warning: Tried to insert object into wrong part of multipart object.\n"); |
1672 | LOG (llevError | logBacktrace, "Warning: Tried to insert object into wrong part of multipart object.\n"); |
1666 | where = where->head; |
1673 | where = where->head; |
1667 | } |
1674 | } |
1668 | |
1675 | |
1669 | return where->insert (op); |
1676 | return where->insert (op); |
1670 | } |
1677 | } |
… | |
… | |
1998 | for (object *tmp = op->inv; tmp != NULL; tmp = tmp->below) |
2005 | for (object *tmp = op->inv; tmp != NULL; tmp = tmp->below) |
1999 | { |
2006 | { |
2000 | CLEAR_FLAG (tmp, flag); |
2007 | CLEAR_FLAG (tmp, flag); |
2001 | unflag_inv (tmp, flag); |
2008 | unflag_inv (tmp, flag); |
2002 | } |
2009 | } |
2003 | } |
|
|
2004 | |
|
|
2005 | /* |
|
|
2006 | * set_cheat(object) sets the cheat flag (WAS_WIZ) in the object and in |
|
|
2007 | * all it's inventory (recursively). |
|
|
2008 | * If checksums are used, a player will get set_cheat called for |
|
|
2009 | * him/her-self and all object carried by a call to this function. |
|
|
2010 | */ |
|
|
2011 | void |
|
|
2012 | set_cheat (object *op) |
|
|
2013 | { |
|
|
2014 | SET_FLAG (op, FLAG_WAS_WIZ); |
|
|
2015 | flag_inv (op, FLAG_WAS_WIZ); |
|
|
2016 | } |
2010 | } |
2017 | |
2011 | |
2018 | /* |
2012 | /* |
2019 | * find_free_spot(object, map, x, y, start, stop) will search for |
2013 | * find_free_spot(object, map, x, y, start, stop) will search for |
2020 | * a spot at the given map and coordinates which will be able to contain |
2014 | * a spot at the given map and coordinates which will be able to contain |