public void TrackPosition(IPlayer p, IPosition oldPos, IPosition newPos) { bool oldInside = ShopPosition.IsInside(oldPos), newInside = ShopPosition.IsInside(newPos); if (oldInside == newInside) { return; } if (!oldInside && newInside) { p.Message("You entered the '{0}'-Shop. You can now use the shop related commands.", ShopName); p.SetCurrentShop(this); return; } if (oldInside && !newInside) { p.Message("You left the '{0}'-Shop.", ShopName); p.SetCurrentShop(null); return; } }