MCPcopy Index your code
hub / github.com/NetHack/NetHack / menudrop_split

Function menudrop_split

src/do.c:963–977  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

961 return FALSE;
962}
963staticfn int /* check callers */
964menudrop_split(struct obj *otmp, long cnt)
965{
966 if (cnt && cnt < otmp->quan) {
967 if (welded(otmp)) {
968 ; /* don't split */
969 } else if (otmp->otyp == LOADSTONE && otmp->cursed) {
970 /* same kludge as getobj(), for canletgo()'s use */
971 otmp->corpsenm = (int) cnt; /* don't split */
972 } else {
973 otmp = splitobj(otmp, cnt);
974 }
975 }
976 return drop(otmp);
977}
978
979/* Drop things from the hero's inventory, using a menu. */
980staticfn int

Callers 1

menu_dropFunction · 0.85

Calls 3

weldedFunction · 0.85
splitobjFunction · 0.85
dropFunction · 0.85

Tested by

no test coverage detected