def UpgradeItem(self, Mode, Slot, Count):
     self.BannedSlotIndex = []
     for i in xrange(Count):
         if Mode == 1:
             net.SendRefinePacket(Slot, 0)
         elif Mode == 2:
             net.SendRefinePacket(Slot, 4)
         elif Mode == 3:
             net.SendRefinePacket(Slot, 1)
         elif Mode == 4 or Mode == 5:
             for InventorySlot in xrange(player.INVENTORY_PAGE_SIZE * 2):
                 ItemValue = player.GetItemIndex(InventorySlot)
                 if Mode == 4:
                     if ItemValue == self.SegiID and not InventorySlot in self.BannedSlotIndex:
                         self.BannedSlotIndex.append(InventorySlot)
                         net.SendItemUseToItemPacket(InventorySlot, Slot)
                         net.SendRefinePacket(Slot, 2)
                         break
                 elif Mode == 5:
                     if ItemValue == self.MetalID and not InventorySlot in self.BannedSlotIndex:
                         self.BannedSlotIndex.append(InventorySlot)
                         net.SendItemUseToItemPacket(InventorySlot, Slot)
                         net.SendRefinePacket(Slot, 2)
                         break
     self.UpdateFileList()
Beispiel #2
0
 def CancelRefine(self):
     net.SendRefinePacket(255, 255)
     self.Close()
Beispiel #3
0
 def Accept(self):
     net.SendRefinePacket(self.targetItemPos, self.type)
     self.Close()