Advertisement
Guest User

Untitled

a guest
Apr 30th, 2021
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.99 KB | None | 0 0
  1.     def __PutItem(self, attachedType, attachedItemIndex, attachedItemSlotPos, attachedItemCount, dstChrID):
  2.         if app.ENABLE_SPECIAL_STORAGE_SYSTEM:
  3.             if player.SLOT_TYPE_INVENTORY == attachedType or\
  4.                 player.SLOT_TYPE_DRAGON_SOUL_INVENTORY == attachedType or\
  5.                 player.SLOT_TYPE_SKILLBOOK_INVENTORY == attachedType or\
  6.                 player.SLOT_TYPE_UPPITEM_INVENTORY == attachedType or\
  7.                 player.SLOT_TYPE_GHOSTSTONE_INVENTORY == attachedType or\
  8.                 player.SLOT_TYPE_GENERAL_INVENTORY == attachedType:
  9.  
  10.                 attachedInvenType = player.SlotTypeToInvenType(attachedType)
  11.  
  12.                 if True == chr.HasInstance(self.PickingCharacterIndex) and player.GetMainCharacterIndex() != dstChrID:
  13.                     if player.IsEquipmentSlot(attachedItemSlotPos) and\
  14.                         player.SLOT_TYPE_DRAGON_SOUL_INVENTORY != attachedType and\
  15.                         player.SLOT_TYPE_SKILLBOOK_INVENTORY != attachedType and\
  16.                         player.SLOT_TYPE_UPPITEM_INVENTORY != attachedType and\
  17.                         player.SLOT_TYPE_GHOSTSTONE_INVENTORY != attachedType and\
  18.                         player.SLOT_TYPE_GENERAL_INVENTORY != attachedType:
  19.                         self.stream.popupWindow.Close()
  20.                         self.stream.popupWindow.Open(localeInfo.EXCHANGE_FAILURE_EQUIP_ITEM, 0, localeInfo.UI_OK)
  21.                     else:
  22.                         if chr.IsNPC(dstChrID):
  23.                         if app.ENABLE_REFINE_RENEWAL:
  24.                            constInfo.AUTO_REFINE_TYPE = 2
  25.                            constInfo.AUTO_REFINE_DATA["NPC"][0] = dstChrID
  26.                            constInfo.AUTO_REFINE_DATA["NPC"][1] = attachedInvenType
  27.                            constInfo.AUTO_REFINE_DATA["NPC"][2] = attachedItemSlotPos
  28.                            constInfo.AUTO_REFINE_DATA["NPC"][3] = attachedItemCount
  29.                             net.SendGiveItemPacket(dstChrID, attachedInvenType, attachedItemSlotPos, attachedItemCount)
  30.                         else:
  31.                             net.SendExchangeStartPacket(dstChrID)
  32.                             net.SendExchangeItemAddPacket(attachedInvenType, attachedItemSlotPos, 0)
  33.                 else:
  34.                     self.__DropItem(attachedType, attachedItemIndex, attachedItemSlotPos, attachedItemCount)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement