Jump to content

Dragonsoul refine from window


Recommended Posts

open game/cmd_gm.cpp

Search this function:

 

ACMD(do_dragon_soul)

extend with this:

 

		case 'r':
		{
			if (ch->DragonSoul_IsQualified())
				ch->DragonSoul_RefineWindow_Open(ch);
		}
		break;

 

open locale_interface.txt

 

add this:

 

DRAGONSOUL_REFINE_BUTTON	Refine


open root/dragonsoulwindow.py


Search this:

 

					{					
						"name" : "activate",
						"type" : "toggle_button",

						"x" : 217,
						"y" : 492,

						"text" : uiScriptLocale.DRAGONSOUL_ACTIVATE,

						"default_image" : "d:/ymir work/ui/dragonsoul/m_button01.tga",
						"over_image" : "d:/ymir work/ui/dragonsoul/m_button02.tga",
						"down_image" : "d:/ymir work/ui/dragonsoul/m_button03.tga",
					},

add under this:

 

					{
						"name" : "refine_button",
						"type" : "button",

						"x" : 150,
						"y" : 492,

						"text" : uiScriptLocale.DRAGONSOUL_REFINE_BUTTON,

						"default_image" : "d:/ymir work/ui/dragonsoul/m_button01.tga",
						"over_image" : "d:/ymir work/ui/dragonsoul/m_button02.tga",
						"down_image" : "d:/ymir work/ui/dragonsoul/m_button03.tga",
					},

open root/uidragonsoul.py

search this:

 

			self.activateButton = self.GetChild("activate")

add under this:

 

			self.refineButton = self.GetChild("refine_button")

search this:

 

		self.activateButton.SetToggleUpEvent(ui.__mem_func__(self.ActivateButtonClick))

add under this:

 

		self.refineButton.SetEvent(ui.__mem_func__(self.RefineButtonClick))

search this:

 

	def ActivateButtonClick(self):
		self.isActivated = self.isActivated ^ True
		if self.isActivated:
			if self.__CanActivateDeck():
				net.SendChatPacket("/dragon_soul activate " + str(self.deckPageIndex))
			else:
				self.isActivated = False
				self.activateButton.SetUp()
		else:
			net.SendChatPacket("/dragon_soul deactivate")

add under this:

 

	def RefineButtonClick(self):
		net.SendChatPacket("/dragon_soul refinewindow")
  • Good 3
Link to comment
Share on other sites

  • 1 month later...

Announcements



×
×
  • 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.