INTREBARE
In root>game.py
Functia pentru echipare:
Functia pentru dezechipare:
Functiile integrale arata asa:
Echipare
Dezechipare:
Functia pentru echipare:
Cod: Selectaţi tot
def __PutItem(self, attachedType, attachedItemIndex, attachedItemSlotPos, attachedItemCount, dstChrID):Cod: Selectaţi tot
def __DropItem(self, attachedType, attachedItemIndex, attachedItemSlotPos, attachedItemCount):Functiile integrale arata asa:
Echipare
Cod: Selectaţi tot
def __PutItem(self, attachedType, attachedItemIndex, attachedItemSlotPos, attachedItemCount, dstChrID):
if TRUE == chr.HasInstance(self.PickingCharacterIndex) and player.GetMainCharacterIndex() != dstChrID:
if player.IsEquipmentSlot(attachedItemSlotPos):
self.stream.popupWindow.Close()
self.stream.popupWindow.Open(locale.EXCHANGE_FAILURE_EQUIP_ITEM, 0, locale.UI_OK)
else:
if chr.IsNPC(dstChrID):
net.SendGiveItemPacket(dstChrID, attachedItemSlotPos, attachedItemCount)
else:
net.SendExchangeStartPacket(dstChrID)
net.SendExchangeItemAddPacket(attachedItemSlotPos, 0)
else:
self.__DropItem(attachedType, attachedItemIndex, attachedItemSlotPos, attachedItemCount)Cod: Selectaţi tot
def __DropItem(self, attachedType, attachedItemIndex, attachedItemSlotPos, attachedItemCount):
# PRIVATESHOP_DISABLE_ITEM_DROP - 개인상점 열고 있는 동안 아이템 버림 방지
if uiPrivateShopBuilder.IsBuildingPrivateShop():
chat.AppendChat(chat.CHAT_TYPE_INFO, locale.DROP_ITEM_FAILURE_PRIVATE_SHOP)
return
# END_OF_PRIVATESHOP_DISABLE_ITEM_DROP
if player.IsEquipmentSlot(attachedItemSlotPos):
self.stream.popupWindow.Close()
self.stream.popupWindow.Open(locale.DROP_ITEM_FAILURE_EQUIP_ITEM, 0, locale.UI_OK)
else:
dropItemIndex = player.GetItemIndex(attachedItemSlotPos)
item.SelectItem(dropItemIndex)
dropItemName = item.GetItemName()
## Question Text
questionText = locale.HOW_MANY_ITEM_DO_YOU_DROP(dropItemName, attachedItemCount)
## Dialog
itemDropQuestionDialog = uiCommon.QuestionDialog()
itemDropQuestionDialog.SetText(questionText)
itemDropQuestionDialog.SetAcceptEvent(lambda arg=TRUE: self.RequestDropItem(arg))
itemDropQuestionDialog.SetCancelEvent(lambda arg=FALSE: self.RequestDropItem(arg))
itemDropQuestionDialog.Open()
itemDropQuestionDialog.dropType = attachedType
itemDropQuestionDialog.dropNumber = attachedItemSlotPos
itemDropQuestionDialog.dropCount = attachedItemCount
self.itemDropQuestionDialog = itemDropQuestionDialog
constInfo.SET_ITEM_DROP_QUESTION_DIALOG_STATUS(1)
Răspunsuri
2 Vizualizări
252
2 Vizualizări
252
-
- Informaţie
-
Cine este conectat
Utilizatori ce ce navighează pe acest forum: Niciun utilizator înregistrat și 66 vizitatori



