hallo habe ein Problem mit dem Item Zerstörer undzwar hab ich ihn eingefügt. hat auch erst alles super geklappt bis ich das hier eingefügt habe un es mit dem alten ersetzt habe
- HOW_MANY_ITEM_DO_YOU_DESTROY1 Do you want to destroy that item %s;
- HOW_MANY_ITEM_DO_YOU_DESTROY2 Do you want to destroy %s %d;
- localeinfo.py
- Code:
- def HOW_MANY_ITEM_DO_YOU_DESTROY(dropItemName, dropItemCount) :
- if dropItemCount > 1 :
- return HOW_MANY_ITEM_DO_YOU_DESTROY2 % (dropItemName, dropItemCount)
- else :
- return HOW_MANY_ITEM_DO_YOU_DESTROY1 % (dropItemName)
- game.py
- Code:
- def RequestDestroyItemConfirm(self, answer):
- if not self.itemDropQuestionDialog:
- return
- if answer:
- dropType = self.itemDropQuestionDialog.dropType
- dropCount = self.itemDropQuestionDialog.dropCount
- dropNumber = self.itemDropQuestionDialog.dropNumber
- self.itemDropQuestionDialog.Close()
- self.itemDropQuestionDialog = None
- dropItemIndex = player.GetItemIndex(dropNumber)
- item.SelectItem(dropItemIndex)
- dropItemName = item.GetItemName()
- ## Question Text
- questionText = localeInfo.HOW_MANY_ITEM_DO_YOU_DESTROY(dropItemName, dropCount)
- ## Dialog
- itemDestroyQuestionDialog = uiCommon.QuestionDialog()
- itemDestroyQuestionDialog.SetText(questionText)
- itemDestroyQuestionDialog.SetAcceptEvent(lambda arg=True: self.RequestDestroyItem(arg))
- itemDestroyQuestionDialog.SetCancelEvent(lambda arg=False: self.RequestDestroyItem(arg))
- itemDestroyQuestionDialog.dropType = dropType
- itemDestroyQuestionDialog.dropNumber = dropNumber
- itemDestroyQuestionDialog.dropCount = dropCount
- itemDestroyQuestionDialog.Open()
- self.itemDestroyQuestionDialog = itemDestroyQuestionDialog
- def RequestDestroyItem(self, answer):
- if not self.itemDestroyQuestionDialog:
- return
- if answer:
- dropType = self.itemDestroyQuestionDialog.dropType
- dropNumber = self.itemDestroyQuestionDialog.dropNumber
- if player.SLOT_TYPE_INVENTORY == dropType:
- if dropNumber == player.ITEM_MONEY:
- return
- else:
- self.__SendDestroyItemPacket(dropNumber)
- self.itemDestroyQuestionDialog.Close()
- self.itemDestroyQuestionDialog = None
- constInfo.SET_ITEM_DROP_QUESTION_DIALOG_STATUS(0)
meine Syserr Spuckt jz Folgenden Fehler aus :
0920 18:13:26966 :: Traceback (most recent call last):
0920 18:13:26966 :: File "ui.py", line 1016, in CallEvent
0920 18:13:26966 :: File "game.py", line 1376, in <lambda>
0920 18:13:26966 :: File "game.py", line 1468, in RequestDestroyItem
0920 18:13:26966 :: AttributeError
0920 18:13:26966 :: :
0920 18:13:26966 :: 'GameWindow' object has no attribute 'itemDestroyQuestionDialog'
0920 18:13:26966 ::
0920 18:13:27560 :: Traceback (most recent call last):
0920 18:13:27560 :: File "ui.py", line 1016, in CallEvent
0920 18:13:27560 :: File "game.py", line 1376, in <lambda>
0920 18:13:27560 :: File "game.py", line 1468, in RequestDestroyItem
0920 18:13:27560 :: AttributeError
0920 18:13:27560 :: :
0920 18:13:27560 :: 'GameWindow' object has no attribute 'itemDestroyQuestionDialog'
0920 18:13:27560 ::
0920 18:13:27725 :: Traceback (most recent call last):
0920 18:13:27725 :: File "ui.py", line 1016, in CallEvent
0920 18:13:27725 :: File "game.py", line 1376, in <lambda>
0920 18:13:27725 :: File "game.py", line 1468, in RequestDestroyItem
0920 18:13:27725 :: AttributeError
0920 18:13:27725 :: :
0920 18:13:27725 :: 'GameWindow' object has no attribute 'itemDestroyQuestionDialog'
0920 18:13:27725 ::
0920 18:13:27857 :: Traceback (most recent call last):
0920 18:13:27857 :: File "ui.py", line 1016, in CallEvent
0920 18:13:27857 :: File "game.py", line 1376, in <lambda>
0920 18:13:27857 :: File "game.py", line 1468, in RequestDestroyItem
0920 18:13:27857 :: AttributeError
0920 18:13:27857 :: :
0920 18:13:27857 :: 'GameWindow' object has no attribute 'itemDestroyQuestionDialog'
0920 18:13:27857 ::
ich hoffe ihr habt eine Lösung