1. if exchange.isTrading() and item.IsAntiFlag(item.ANTIFLAG_GIVE):
  2. self.wndItem.SetUnusableSlot(i)
  3. self.listUnusableSlot.append(i)
  4. elif not exchange.isTrading() and item.IsAntiFlag(item.ANTIFLAG_GIVE) and slotNumber in self.listUnusableSlot:
  5. self.wndItem.SetUsableSlot(i)
  6. self.listUnusableSlot.remove(i)