Fix shop steal when teleporting your swallower
Picking up a shop item and not paying it, getting swallowed by a monster, and then teleporting the monster out of the shop with you in it, the shopkeeper didn't notice the theft. But the object was not marked as paid either. Also prevent giving a message of the swallower disappearing and appearing when it was teleported. (Although now there's no message given, so something should be added ...)
This commit is contained in:
@@ -1643,6 +1643,7 @@ rloc_to_core(
|
||||
if (u.ustuck == mtmp) {
|
||||
if (u.uswallow) {
|
||||
u_on_newpos(mtmp->mx, mtmp->my);
|
||||
check_special_room(FALSE);
|
||||
docrt();
|
||||
} else if (!m_next2u(mtmp)) {
|
||||
unstuck(mtmp);
|
||||
@@ -1652,7 +1653,7 @@ rloc_to_core(
|
||||
maybe_unhide_at(x, y);
|
||||
newsym(x, y); /* update new location */
|
||||
set_apparxy(mtmp); /* orient monster */
|
||||
if (domsg && (canspotmon(mtmp) || appearmsg)) {
|
||||
if (domsg && (canspotmon(mtmp) || appearmsg) && (u.ustuck != mtmp)) {
|
||||
int du = distu(x, y), olddu;
|
||||
const char *next = (du <= 2) ? " next to you" : 0, /* next2u() */
|
||||
*nearu = (du <= BOLT_LIM * BOLT_LIM) ? " close by" : 0;
|
||||
|
||||
Reference in New Issue
Block a user