Jump to content

Fix Locked Quest


Abel(Tiger)

Recommended Posts

  • Premium

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

 

  • Metin2 Dev 7
  • Good 1
  • muscle 1
  • Love 4
Link to comment
Share on other sites

  • 4 weeks later...
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

  • Active Member

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.

  • Good 1

I'll be always helpful!  😉

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.