Salut,stiu ca am postat pe dev,dar postez si aici,ca poate e cineva care nu stie de dev..

def SetHyperlinkItem(wrong):
def SetHyperlinkItem(self, tokens):
minTokenCount = 3 + player.METIN_SOCKET_MAX_NUM
maxTokenCount = minTokenCount + 2 * player.ATTRIBUTE_SLOT_MAX_NUM
if tokens and len(tokens) >= minTokenCount and len(tokens) <= maxTokenCount:
head, vnum, flag = tokens[:3]
itemVnum = int(vnum, 16)
metinSlot = [int(metin, 16) for metin in tokens[3:6]]
rests = tokens[6:]
if rests:
attrSlot = []
rests.reverse()
while rests:
key = int(rests.pop(), 16)
if rests:
val = int(rests.pop())
attrSlot.append((key, val))
attrSlot += [(0, 0)] * (player.ATTRIBUTE_SLOT_MAX_NUM - len(attrSlot))
else:
attrSlot = [(0, 0)] * player.ATTRIBUTE_SLOT_MAX_NUM
self.ClearToolTip()
dbg.TraceError("SetHyperlinkItem!”!!!!!!!!!!!! itemVnum(%d) metinSlot(%s) attrSlot(%s)" % (itemVnum, metinSlot, attrSlot))
self.AddItemData(itemVnum, metinSlot, attrSlot)
ItemToolTip.OnUpdate(self)
def SetShopItem(correct):
def SetShopItem(self, slotIndex):
itemVnum = shop.GetItemID(slotIndex)
if 0 == itemVnum:
return
price = shop.GetItemPrice(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))
dbg.TraceError("SetShopItem!”!!!!!!!!!!!! itemVnum(%d) metinSlot(%s) attrSlot(%s)" % (itemVnum, metinSlot, attrSlot))
self.AddItemData(itemVnum, metinSlot, attrSlot)
self.AppendPrice(price)
Syser at setshopitem(correct):
SetShopItem!”!!!!!!!!!!!! itemVnum(85004) metinSlot([0, 20, 0]) attrSlot([(0, 1), (0, 1), (0, 1), (0, 1), (0, 1), (0, 1), (0, 1), (0, 1), (53, 6), (53, 126), (55, 1), (55, 125), (7, 12), (17, 14), (15, 14)])
Syser at SetHyperlinkItem(Wrong):
SetHyperlinkItem!”!!!!!!!!!!!! itemVnum(85004) metinSlot([0, 20, 0]) attrSlot([(53, 6), (53, 126), (55, 1), (55, 125), (7, 12), (17, 14), (15, 14), (0, 0), (0, 0), (0, 0), (0, 0), (0, 0), (0, 0), (0, 0), (0, 0)])
Diferenta este in attrslot