some changes
This commit is contained in:
BIN
Metin2.exe
BIN
Metin2.exe
Binary file not shown.
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
2 3
|
||||
5 3
|
||||
BIN
mark/20_0.tga
Normal file
BIN
mark/20_0.tga
Normal file
Binary file not shown.
Reference in New Issue
Block a user