ESO Lua File v100012

ingame/mail/mailsend_shared.lua

[◄ back to folders ]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
ZO_MAIL_EMPTY_SLOT_TEXTURE = "EsoUI/Art/Mail/mail_attachment_empty.dds"
function ZO_MailSendShared_AddAttachedItem(attachSlot, slot)
    local bagId, slotIndex, icon, stack = GetQueuedItemAttachmentInfo(attachSlot)
     local soundCategory = GetItemSoundCategory(bagId, slotIndex)
     PlayItemSound(soundCategory, ITEM_SOUND_ACTION_EQUIP)
    
    slot.bagId = bagId
    slot.slotIndex = slotIndex
    slot:SetHidden(false)
    ZO_Inventory_SetupSlot(slot, stack, icon)
end
function ZO_MailSendShared_RemoveAttachedItem(attachSlot, slot)
    local soundCategory = GetItemSoundCategory(slot.bagId, slot.slotIndex)
     PlayItemSound(soundCategory, ITEM_SOUND_ACTION_UNEQUIP)
    
    slot:SetHidden(true)    
    ZO_Inventory_BindSlot(slot, SLOT_TYPE_MAIL_QUEUED_ATTACHMENT, attachSlot)
    ZO_Inventory_SetupSlot(slot, 0, ZO_MAIL_EMPTY_SLOT_TEXTURE)
    
end