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

Function fully_identify_obj

src/invent.c:2636–2647  ·  view source on GitHub ↗

make an object actually be identified; no display updating */

Source from the content-addressed store, hash-verified

2634
2635/* make an object actually be identified; no display updating */
2636void
2637fully_identify_obj(struct obj *otmp)
2638{
2639 makeknown(otmp->otyp);
2640 if (otmp->oartifact)
2641 discover_artifact((xint16) otmp->oartifact);
2642 observe_object(otmp);
2643 otmp->known = otmp->bknown = otmp->rknown = 1;
2644 set_cknown_lknown(otmp); /* set otmp->{cknown,lknown} if applicable */
2645 if (otmp->otyp == EGG && otmp->corpsenm != NON_PM)
2646 learn_egg_type(otmp->corpsenm);
2647}
2648
2649/* ggetobj callback routine; identify an object and give immediate feedback */
2650int

Callers 4

finish_questFunction · 0.85
put_saddle_on_monFunction · 0.85
thitmonstFunction · 0.85
identifyFunction · 0.85

Calls 4

discover_artifactFunction · 0.85
observe_objectFunction · 0.85
set_cknown_lknownFunction · 0.85
learn_egg_typeFunction · 0.85

Tested by

no test coverage detected