[Feature] Break Trader if moved (#3862)

* [Feature] Break Trader if moved

If the player moves while in trader mode, it will end the mode, this prevents traders from moving outside of the trader area after entering trader mode.

* Fix spacing
This commit is contained in:
Fryguy 2024-01-07 01:55:33 -05:00 committed by GitHub
parent 0ada53aa96
commit d4a78f4799
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4888,8 +4888,13 @@ void Client::Handle_OP_ClientUpdate(const EQApplicationPacket *app) {
CheckIncreaseSkill(EQ::skills::SkillTracking, nullptr, -20);
}
/* Break Hide if moving without sneaking and set rewind timer if moved */
if (cy != m_Position.y || cx != m_Position.x) {
// End trader mode if we move
if (Trader) {
Trader_EndTrader();
}
/* Break Hide if moving without sneaking and set rewind timer if moved */
if ((hidden || improved_hidden) && !sneaking) {
hidden = false;
improved_hidden = false;