MCPcopy Create free account
hub / github.com/NetHack/NetHack / book_disappears

Function book_disappears

src/spell.c:645–652  ·  view source on GitHub ↗

a spellbook has been destroyed or the character has changed levels; the stored address for the current book is no longer valid */

Source from the content-addressed store, hash-verified

643/* a spellbook has been destroyed or the character has changed levels;
644 the stored address for the current book is no longer valid */
645void
646book_disappears(struct obj *obj)
647{
648 if (obj == svc.context.spbook.book) {
649 svc.context.spbook.book = (struct obj *) 0;
650 svc.context.spbook.o_id = 0;
651 }
652}
653
654/* renaming an object usually results in it having a different address;
655 so the sequence start reading, get interrupted, name the book, resume

Callers 1

obfreeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected