Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def DetachMetinFromItem(self, scrollSlotPos, targetSlotPos): ## Resetting Sash Stats Fix - Galet - 11/11/2015 - 17h45 - Tribute to the victims of the war
- scrollIndex = player.GetItemIndex(scrollSlotPos)
- targetIndex = player.GetItemIndex(targetSlotPos)
- for i in xrange(player.INVENTORY_PAGE_SIZE*2):
- slotNumber = self.__InventoryLocalSlotPosToGlobalSlotPos(i)
- getItemVNum=player.GetItemIndex
- itemVnum = getItemVNum(slotNumber)
- if 85009 == itemVnum:
- item.SelectItem(targetIndex)
- if item.GetItemSubType() == item.COSTUME_TYPE_ACCE:
- if self.GetAcceAttribute(targetSlotPos) == 0:
- return
- self.questionDialog = uiCommon.QuestionDialog()
- self.questionDialog.SetText("Would you like to reset your sash shoulder stats?")
- self.questionDialog.SetAcceptEvent(ui.__mem_func__(self.OnDetachMetinFromItem))
- self.questionDialog.SetCancelEvent(ui.__mem_func__(self.OnCloseQuestionDialog))
- self.questionDialog.Open()
- self.questionDialog.sourcePos = scrollSlotPos
- self.questionDialog.targetPos = targetSlotPos
- else:
- return
- else:
- if not player.CanDetach(scrollIndex, targetSlotPos):
- chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.REFINE_FAILURE_METIN_INSEPARABLE_ITEM)
- return
- self.questionDialog = uiCommon.QuestionDialog()
- self.questionDialog.SetText(localeInfo.REFINE_DO_YOU_SEPARATE_METIN)
- self.questionDialog.SetAcceptEvent(ui.__mem_func__(self.OnDetachMetinFromItem))
- self.questionDialog.SetCancelEvent(ui.__mem_func__(self.OnCloseQuestionDialog))
- self.questionDialog.Open()
- self.questionDialog.sourcePos = scrollSlotPos
- self.questionDialog.targetPos = targetSlotPos
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement