Premium Abel(Tiger) 1443 Posted September 11, 2024 Premium Share Posted September 11, 2024 As you may already know metin2 has a functionality in quest called "Confirm". This functionality is basically a question between 2 players (like the messenger question) but on quest. This is used at wedding system when the partner is asked if he/she wants to marry you. Today I found a bug at this functionality. Basically if the asked player press ESC on the confirm question dialog the entire quest system remains locked on the player that requests the confirmation. Here is the fix: ## uiCommon.py ## Inside class QuestionDialogWithTimeLimit override the OnPressEscapeKey method like this: def OnPressEscapeKey(self): if self.cancelButton: self.cancelButton.CallEvent() self.Close() return True 7 1 1 4 Link to comment Share on other sites More sharing options...
Lead0b110010100 15 Posted October 4, 2024 Share Posted October 4, 2024 Isn't it better to add this code to the QuestionDialog class directly? Link to comment Share on other sites More sharing options...
Marcos17 22 Posted October 4, 2024 Share Posted October 4, 2024 On 9/11/2024 at 9:06 AM, Abel(Tiger) said: As you may already know metin2 has a functionality in quest called "Confirm". This functionality is basically a question between 2 players (like the messenger question) but on quest. This is used at wedding system when the partner is asked if he/she wants to marry you. Today I found a bug at this functionality. Basically if the asked player press ESC on the confirm question dialog the entire quest system remains locked on the player that requests the confirmation. Here is the fix: ## uiCommon.py ## Inside class QuestionDialogWithTimeLimit override the OnPressEscapeKey method like this: def OnPressEscapeKey(self): if self.cancelButton: self.cancelButton.CallEvent() self.Close() return True In my class: class QuestionDialogWithTimeLimit there is no def OnPressEscapeKey in my uicommon there is this def in two classes: class PopupDialog(ui.ScriptWindow): and in class QuestionDialog(ui.ScriptWindow): Link to comment Share on other sites More sharing options...
Active Member ReFresh 2566 Posted October 5, 2024 Active Member Share Posted October 5, 2024 I did something like that long time ago. Just like that: Spoiler def OnPressEscapeKey(self): self.Close() self.cancelButton.CallEvent() return True But your method is more robust and more correct. Thanks for your contribution. 1 I'll be always helpful! Link to comment Share on other sites More sharing options...
Recommended Posts