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

Function obj_attach_mid

src/mkobj.c:2146–2154  ·  view source on GitHub ↗

* Attach a monster id to an object, to provide * a lasting association between the two. */

Source from the content-addressed store, hash-verified

2144 * a lasting association between the two.
2145 */
2146struct obj *
2147obj_attach_mid(struct obj *obj, unsigned int mid)
2148{
2149 if (!mid || !obj)
2150 return (struct obj *) 0;
2151 newomid(obj);
2152 OMID(obj) = mid;
2153 return obj;
2154}
2155
2156staticfn struct obj *
2157save_mtraits(struct obj *obj, struct monst *mtmp)

Callers 1

savebonesFunction · 0.85

Calls 1

newomidFunction · 0.70

Tested by

no test coverage detected