diff --git a/Metin2.exe b/Metin2.exe index 13747b74..d3440997 100644 Binary files a/Metin2.exe and b/Metin2.exe differ diff --git a/assets/root/interfacemodule.py b/assets/root/interfacemodule.py index 498b6f2d..45f8d7cb 100644 --- a/assets/root/interfacemodule.py +++ b/assets/root/interfacemodule.py @@ -173,6 +173,7 @@ class Interface(object): wndInventory.BindInterfaceClass(self) if app.ENABLE_DRAGON_SOUL_SYSTEM: wndDragonSoul = uiDragonSoul.DragonSoulWindow() + wndDragonSoul.BindInterfaceClass(self) wndDragonSoulRefine = uiDragonSoul.DragonSoulRefineWindow() else: wndDragonSoul = None @@ -1697,6 +1698,10 @@ class Interface(object): def EmptyFunction(self): pass + def UseDSSButtonEffect(self, enable): + if self.wndInventory: + self.wndInventory.UseDSSButtonEffect(enable) + if __name__ == "__main__": import app diff --git a/assets/root/ui.py b/assets/root/ui.py index 3afd5431..cfa0bc87 100644 --- a/assets/root/ui.py +++ b/assets/root/ui.py @@ -1470,6 +1470,10 @@ class SlotWindow(Window): wndMgr.SetSlot(self.hWnd, renderingSlotNumber, emotionIndex, 1, 1, icon) + def SetRenderSlot(self, renderingSlotNumber, diffuseColor = (1.0, 1.0, 1.0, 1.0)): + wndMgr.SetSlot(self.hWnd, renderingSlotNumber, 1, 1, 1, 0, diffuseColor) + wndMgr.SetSlotCount(self.hWnd, renderingSlotNumber, 0) + ## Event def OnSelectEmptySlot(self, slotNumber): if self.eventSelectEmptySlot: diff --git a/assets/root/uiaffectshower.py b/assets/root/uiaffectshower.py index 305e2b55..6e037df0 100644 --- a/assets/root/uiaffectshower.py +++ b/assets/root/uiaffectshower.py @@ -118,7 +118,7 @@ class HorseImage(ui.ExpandedImageBox): try: grade = self.__GetHorseGrade(level) - self.__AppendText(localeInfo.LEVEL_LIST[grade]) + self.__AppendText(localeInfo.LEVEL_LIST[int(grade)]) except IndexError: print(("HorseImage.SetState(level=%d, health=%d, battery=%d) - Unknown Index" % (level, health, battery))) return diff --git a/assets/root/uidragonsoul.py b/assets/root/uidragonsoul.py index fe1669ed..3ded5e84 100644 --- a/assets/root/uidragonsoul.py +++ b/assets/root/uidragonsoul.py @@ -253,6 +253,18 @@ class DragonSoulWindow(ui.ScriptWindow): break self.wndEquip.RefreshSlot() + + def ActivateEquipSlotWindow(self, deck): + for i in range(6): + if deck == 2: + plusCount = 6 + else: + plusCount = 0 + self.wndEquip.ActivateSlot(player.DRAGON_SOUL_EQUIPMENT_SLOT_START + i + plusCount) + + def DeactivateEquipSlotWindow(self): + for i in range(12): + self.wndEquip.DeactivateSlot(player.DRAGON_SOUL_EQUIPMENT_SLOT_START + i) def RefreshStatus(self): self.RefreshItemSlot() @@ -686,11 +698,17 @@ class DragonSoulWindow(ui.ScriptWindow): self.deckTab[(deck + 1) % 2].SetUp() self.RefreshEquipSlotWindow() + self.ActivateEquipSlotWindow(deck) + if self.interface: + self.interface.UseDSSButtonEffect(self.isActivated) self.__WarmDragonSoulTimeCache(deck) def DeactivateDragonSoul(self): self.isActivated = False self.activateButton.SetUp() + self.DeactivateEquipSlotWindow() + if self.interface: + self.interface.UseDSSButtonEffect(self.isActivated) if self.tooltipItem: self.tooltipItem.ClearDragonSoulTimeCache() @@ -810,6 +828,10 @@ class DragonSoulWindow(ui.ScriptWindow): self.listHighlightedSlot.append (slot) # Slot highlight related end + def BindInterfaceClass(self, interface): + from _weakref import proxy + self.interface = proxy(interface) + def SetDragonSoulRefineWindow(self, wndDragonSoulRefine): if app.ENABLE_DRAGON_SOUL_SYSTEM: from _weakref import proxy diff --git a/assets/root/uiinventory.py b/assets/root/uiinventory.py index 949f6518..deb20a39 100644 --- a/assets/root/uiinventory.py +++ b/assets/root/uiinventory.py @@ -416,6 +416,7 @@ class InventoryWindow(ui.ScriptWindow): self.questionDialog = None self.mallButton = None self.DSSButton = None + self.DSSButtonEffect = None self.interface = None if self.wndCostume: @@ -473,6 +474,25 @@ class InventoryWindow(ui.ScriptWindow): print("click_dss_button") self.interface.ToggleDragonSoulWindow() + def UseDSSButtonEffect(self, enable): + if self.DSSButton: + DSSButtonEffect = ui.SlotWindow() + DSSButtonEffect.AddFlag("attach") + DSSButtonEffect.SetParent(self.DSSButton) + DSSButtonEffect.SetPosition(3.2, 0) + + DSSButtonEffect.AppendSlot(0, 0, 0, 32, 32) + DSSButtonEffect.SetRenderSlot(0) + DSSButtonEffect.RefreshSlot() + + if enable == True: + DSSButtonEffect.ActivateSlot(0) + DSSButtonEffect.Show() + else: + DSSButtonEffect.DeactivateSlot(0) + DSSButtonEffect.Hide() + self.DSSButtonEffect = DSSButtonEffect + def ClickCostumeButton(self): print("Click Costume Button") if self.wndCostume: diff --git a/channel.inf b/config/channel.inf similarity index 100% rename from channel.inf rename to config/channel.inf diff --git a/config/metin2.cfg b/config/metin2.cfg index 9f86c486..712cd20e 100644 --- a/config/metin2.cfg +++ b/config/metin2.cfg @@ -6,14 +6,15 @@ SOFTWARE_CURSOR 0 OBJECT_CULLING 1 VISIBILITY 3 MUSIC_VOLUME 0.000 -VOICE_VOLUME 0 +VOICE_VOLUME 0.000 GAMMA 1 IS_SAVE_ID 0 SAVE_ID 0 PRE_LOADING_DELAY_TIME 20 DECOMPRESSED_TEXTURE 0 -WINDOWED 1 +WINDOWED 1 USE_DEFAULT_IME 0 -SOFTWARE_TILING 0 +SOFTWARE_TILING 2 SHADOW_LEVEL 3 +FOG_LEVEL 2 diff --git a/config/mouse.cfg b/config/mouse.cfg index ba2682b7..6b596ba9 100644 --- a/config/mouse.cfg +++ b/config/mouse.cfg @@ -1 +1 @@ -2 3 \ No newline at end of file +5 3 \ No newline at end of file diff --git a/mark/20_0.tga b/mark/20_0.tga new file mode 100644 index 00000000..2bc03f6a Binary files /dev/null and b/mark/20_0.tga differ