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

Function get_mleash

src/apply.c:879–888  ·  view source on GitHub ↗

assuming mtmp->mleashed has been checked */

Source from the content-addressed store, hash-verified

877
878/* assuming mtmp->mleashed has been checked */
879struct obj *
880get_mleash(struct monst *mtmp)
881{
882 struct obj *otmp;
883
884 for (otmp = gi.invent; otmp; otmp = otmp->nobj)
885 if (otmp->otyp == LEASH && (unsigned) otmp->leashmon == mtmp->m_id)
886 break;
887 return otmp;
888}
889
890staticfn boolean
891mleashed_next2u(struct monst *mtmp)

Callers 4

teleport_petFunction · 0.85
sanity_check_single_monFunction · 0.85
m_unleashFunction · 0.85
mleashed_next2uFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected