Official DragonSoul System to share today
Add Game.py
PHP Code:
# ¿ëÈ¥¼®
def BINARY_Highlight_Item(self, inven_type, inven_pos):
self.interface.Highligt_Item(inven_type, inven_pos)
def BINARY_DragonSoulGiveQuilification(self):
self.interface.DragonSoulGiveQuilification()
def BINARY_DragonSoulRefineWindow_Open(self):
self.interface.OpenDragonSoulRefineWindow()
def BINARY_DragonSoulRefineWindow_RefineFail(self, reason, inven_type, inven_pos):
self.interface.FailDragonSoulRefine(reason, inven_type, inven_pos)
def BINARY_DragonSoulRefineWindow_RefineSucceed(self, inven_type, inven_pos):
self.interface.SucceedDragonSoulRefine(inven_type, inven_pos)
# END of DRAGON SOUL REFINE WINDOW
Add Game.py
PHP Code:
# UNKNOWN_UPDATE
def BINARY_NEW_AddAffect(self, type, pointIdx, value, duration):
self.affectShower.BINARY_NEW_AddAffect(type, pointIdx, value, duration)
if chr.NEW_AFFECT_DRAGON_SOUL_DECK1 == type or chr.NEW_AFFECT_DRAGON_SOUL_DECK2 == type:
self.interface.DragonSoulActivate(type - chr.NEW_AFFECT_DRAGON_SOUL_DECK1)
elif chr.NEW_AFFECT_DRAGON_SOUL_QUALIFIED == type:
self.BINARY_DragonSoulGiveQuilification()
def BINARY_NEW_RemoveAffect(self, type, pointIdx):
self.affectShower.BINARY_NEW_RemoveAffect(type, pointIdx)
if chr.NEW_AFFECT_DRAGON_SOUL_DECK1 == type or chr.NEW_AFFECT_DRAGON_SOUL_DECK2 == type:
self.interface.DragonSoulDeactivate()
# END_OF_UNKNOWN_UPDATE
PHP Code:
## DragonSoul
elif player.SLOT_TYPE_DRAGON_SOUL_INVENTORY == attachedType:
self.__PutItem(attachedType, attachedItemIndex, attachedItemSlotPos, attachedItemCount, self.PickingCharacterIndex)
mouseModule.mouseController.DeattachObject()
else:
hyperlink = ui.GetHyperlink()
if hyperlink:
if app.IsPressed(app.DIK_LALT):
link = chat.GetLinkFromHyperlink(hyperlink)
ime.PasteString(link)
else:
self.interface.MakeHyperlinkTooltip(hyperlink)
return
else:
player.SetMouseState(player.MBT_LEFT, player.MBS_CLICK)
#player.EndMouseWalking()
return TRUE
def __PutItem(self, attachedType, attachedItemIndex, attachedItemSlotPos, attachedItemCount, dstChrID):
if player.SLOT_TYPE_INVENTORY == attachedType or player.SLOT_TYPE_DRAGON_SOUL_INVENTORY == attachedType:
attachedInvenType = player.SlotTypeToInvenType(attachedType)
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, attachedInvenType, attachedItemSlotPos, attachedItemCount)
else:
net.SendExchangeStartPacket(dstChrID)
net.SendExchangeItemAddPacket(attachedInvenType, attachedItemSlotPos, 0)
else:
self.__DropItem(attachedType, attachedItemIndex, attachedItemSlotPos, attachedItemCount)
PHP Code:
def RequestDropItem(self, answer):
if not self.itemDropQuestionDialog:
return
if answer:
dropType = self.itemDropQuestionDialog.dropType
dropCount = self.itemDropQuestionDialog.dropCount
dropNumber = self.itemDropQuestionDialog.dropNumber
if player.SLOT_TYPE_INVENTORY == dropType:
if dropNumber == player.ITEM_MONEY:
net.SendGoldDropPacketNew(dropCount)
snd.PlaySound("sound/ui/money.wav")
else:
# PRIVATESHOP_DISABLE_ITEM_DROP
self.__SendDropItemPacket(dropNumber, dropCount)
# END_OF_PRIVATESHOP_DISABLE_ITEM_DROP
elif player.SLOT_TYPE_DRAGON_SOUL_INVENTORY == dropType:
# PRIVATESHOP_DISABLE_ITEM_DROP
self.__SendDropItemPacket(dropNumber, dropCount, player.DRAGON_SOUL_INVENTORY)
# END_OF_PRIVATESHOP_DISABLE_ITEM_DROP
self.itemDropQuestionDialog.Close()
self.itemDropQuestionDialog = None
constInfo.SET_ITEM_DROP_QUESTION_DIALOG_STATUS(0)
Add Game.py
PHP Code:
## 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)
elif player.SLOT_TYPE_DRAGON_SOUL_INVENTORY == attachedType:
dropItemIndex = player.GetItemIndex(player.DRAGON_SOUL_INVENTORY, attachedItemSlotPos)
item.SelectItem(dropItemIndex)
dropItemName = item.GetItemName()
PHP Code:
onPressKeyDict[app.DIK_I] = lambda : self.interface.ToggleInventoryWindow()
PHP Code:
onPressKeyDict[app.DIK_O] = lambda : self.interface.ToggleDragonSoulWindowWithNoInfo()
PHP Code:
# ¿ëÈ¥¼®
def BINARY_Highlight_Item(self, inven_type, inven_pos):
self.interface.Highligt_Item(inven_type, inven_pos)
def BINARY_DragonSoulGiveQuilification(self):
self.interface.DragonSoulGiveQuilification()
def BINARY_DragonSoulRefineWindow_Open(self):
self.interface.OpenDragonSoulRefineWindow()
def BINARY_DragonSoulRefineWindow_RefineFail(self, reason, inven_type, inven_pos):
self.interface.FailDragonSoulRefine(reason, inven_type, inven_pos)
def BINARY_DragonSoulRefineWindow_RefineSucceed(self, inven_type, inven_pos):
self.interface.SucceedDragonSoulRefine(inven_type, inven_pos)
# END of DRAGON SOUL REFINE WINDOW