Use get_mleash to find the leash attached to monster
This commit is contained in:
+4
-6
@@ -565,12 +565,10 @@ m_unleash(struct monst *mtmp, boolean feedback)
|
|||||||
else
|
else
|
||||||
Your("leash falls slack.");
|
Your("leash falls slack.");
|
||||||
}
|
}
|
||||||
for (otmp = g.invent; otmp; otmp = otmp->nobj)
|
if ((otmp = get_mleash(mtmp)) != 0) {
|
||||||
if (otmp->otyp == LEASH && (unsigned) otmp->leashmon == mtmp->m_id) {
|
otmp->leashmon = 0;
|
||||||
otmp->leashmon = 0;
|
update_inventory();
|
||||||
update_inventory();
|
}
|
||||||
break;
|
|
||||||
}
|
|
||||||
mtmp->mleashed = 0;
|
mtmp->mleashed = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user