def SetShopItem(self, slotIndex):
itemVnum = shop.GetItemID(slotIndex)
if 0 == itemVnum:
return
price = shop.GetItemPrice(slotIndex)
if app.ENABLE_CHEQUE_SYSTEM:
cheque = shop.GetItemCheque(slotIndex)
self.ClearToolTip()
self.isShopItem = True
metinSlot = []
for i in xrange(player.METIN_SOCKET_MAX_NUM):
metinSlot.append(shop.GetItemMetinSocket(slotIndex, i))
attrSlot = []
for i in xrange(player.ATTRIBUTE_SLOT_MAX_NUM):
attrSlot.append(shop.GetItemAttribute(slotIndex, i))
apply_random_list = []
if app.ENABLE_APPLY_RANDOM:
for i in xrange(player.APPLY_RANDOM_SLOT_MAX_NUM):
apply_random_list.append(shop.GetItemApplyRandom(slotIndex, i))
if app.ENABLE_REFINE_ELEMENT:
refineElement = shop.GetItemRefineElement(slotIndex)
self.AddItemData(itemVnum, metinSlot, attrSlot, refineElement = refineElement, apply_random_list = apply_random_list)
else:
self.AddItemData(itemVnum, metinSlot, attrSlot)
if app.BL_TRANSMUTATION_SYSTEM:
self.AppendChangeLookInfoShopWIndow(slotIndex)
if shop.IsOwner():
self.AppendOfflineShopPrice(price, cheque)
else:
if shop.IsYearRound():
self.AppendYearRound(price)
elif shop.IsChequeDeskNpc():
self.AppendLimitedCountChequeDesk(shop.GetLimitedPurchaseCount(slotIndex), shop.GetMyStok(slotIndex), cheque)
elif app.ENABLE_12ZI and shop.IsLimitedItemShop():
count = shop.GetLimitedCount(slotIndex)
if count != 0:
purchaseCount = shop.GetLimitedPurchaseCount(slotIndex)
self.AppendLimitedCount(count, purchaseCount, price)
else:
if app.ENABLE_CHEQUE_SYSTEM:
self.AppendPrice(price, cheque)
else:
self.AppendPrice(price)