]> granicus.if.org Git - nethack/commit
inappropriate pacification of shopkeepers
authorcohrs <cohrs>
Fri, 12 Sep 2003 17:23:04 +0000 (17:23 +0000)
committercohrs <cohrs>
Fri, 12 Sep 2003 17:23:04 +0000 (17:23 +0000)
commit8396866296f5358754dee2562ee651c62be7b29a
treeb0500390c121e820ca2d658b53f42f4aa61a3caf
parent57a21dafde6f96fd9cc90a373543896a2980812a
inappropriate pacification of shopkeepers
A recent report noted that if you are invisible, teleport into a shop,
steal something, teleport out, and then return, the shopkeeper will become
pacified.  This is because the pacification code occurred even if the
shopkeeper already knew your name, as long as the "Welcome" message had not
yet occurred.  Implement <Someone>'s proposed fix: Before pacifying, either
the visitct must be zero (as per old code) or the customer name must
already be known.  And, of course, the customer name must differ from the
current setting.  This skips the pacification code in those situations
where the shopkeeper learned your name but was not happy about it (which is
what visitct > 0 implies, at least initially).

This also deals with an older bug report where you attack a shopkeeper
while outside the shop and then later enter the shop while the shopkeeper
is in it.  hot_pursuit() sets the customer name, and the new check avoids
pacifying the shopkeeper for the same reason as noted above.
doc/fixes34.3
src/shk.c