SamuraiHUN 1550 Posted November 11, 2021 Share Posted November 11, 2021 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") 3 Link to comment Share on other sites More sharing options...
Gurugu 2 Posted January 3, 2022 Share Posted January 3, 2022 (edited) works perfect Edited January 4, 2022 by Gurugu Link to comment Share on other sites More sharing options...
Recommended Posts