def onContextCheckVisible(player, vendor, tag): vclass = getClassFromVendor(vendor) if not vclass: return False return True
def onContextEntry(player, vendor, tag): vclass = getClassFromVendor(vendor) if not vclass: return False if not vclass.checkAccess(vendor, player): return False if tag == 1: vclass.onBuy(vendor, player) elif tag == 2: vclass.onSell(vendor, player) return True