Added game files from TMP4

This commit is contained in:
2023-07-21 21:55:58 +03:00
parent bb44b31af9
commit eb47a22455
9325 changed files with 276198 additions and 69890 deletions

View File

@ -1,14 +1,12 @@
##
## Interface
##
import constInfo
import systemSetting
import wndMgr
import chat
import app
import player
import uiTaskBar
import uiCharacter
import uiInventory
@ -40,7 +38,7 @@ import uiTip
import uiCube
import miniMap
# ACCESSORY_REFINE_ADD_METIN_STONE
import uiSelectItem
import uiselectitem
# END_OF_ACCESSORY_REFINE_ADD_METIN_STONE
import uiScriptLocale
@ -78,7 +76,8 @@ class Interface(object):
self.wndGuildBuilding = None
self.listGMName = {}
self.wndQuestWindow = []
self.wndQuestWindow = {}
self.wndQuestWindowNewKey = 0
self.privateShopAdvertisementBoardDict = {}
self.guildScoreBoardDict = {}
self.equipmentDialogDict = {}
@ -164,7 +163,7 @@ class Interface(object):
self.wndGameButton = wndGameButton
def __IsChatOpen(self):
return TRUE
return True
def __MakeWindows(self):
wndCharacter = uiCharacter.CharacterWindow()
@ -275,7 +274,7 @@ class Interface(object):
# ACCESSORY_REFINE_ADD_METIN_STONE
def __MakeItemSelectWindow(self):
self.wndItemSelect = uiSelectItem.SelectItemWindow()
self.wndItemSelect = uiselectitem.SelectItemWindow()
self.wndItemSelect.Hide()
# END_OF_ACCESSORY_REFINE_ADD_METIN_STONE
@ -332,7 +331,7 @@ class Interface(object):
self.privateShopBuilder.SetItemToolTip(self.tooltipItem)
self.__InitWhisper()
self.DRAGON_SOUL_IS_QUALIFIED = TRUE
self.DRAGON_SOUL_IS_QUALIFIED = False
def MakeHyperlinkTooltip(self, hyperlink):
tokens = hyperlink.split(":")
@ -345,7 +344,6 @@ class Interface(object):
################################
def Close(self):
if self.dlgWhisperWithoutTarget:
self.dlgWhisperWithoutTarget.Destroy()
del self.dlgWhisperWithoutTarget
@ -354,10 +352,11 @@ class Interface(object):
uiQuest.QuestDialog.QuestCurtain.Close()
if self.wndQuestWindow:
for eachQuestWindow in self.wndQuestWindow:
for key, eachQuestWindow in self.wndQuestWindow.items():
eachQuestWindow.nextCurtainMode = -1
eachQuestWindow.CloseSelf()
eachQuestWindow = None
self.wndQuestWindow = {}
if self.wndChat:
self.wndChat.Destroy()
@ -519,10 +518,6 @@ class Interface(object):
uiChat.DestroyChatInputSetWindow()
## Self
def SetOpenBoniSwitcherEvent(self, event):
self.wndInventory.SetOpenBoniSwitcherEvent(event)
## Skill
def OnUseSkill(self, slotIndex, coolTime):
self.wndCharacter.OnUseSkill(slotIndex, coolTime)
@ -668,12 +663,15 @@ class Interface(object):
if skin:
q.AddOnCloseEvent(q.Unlock)
q.AddOnCloseEvent(lambda s = self, qw = q: s.__dict__.__getitem__("wndQuestWindow").remove(qw))
q.AddOnCloseEvent(lambda key = self.wndQuestWindowNewKey:ui.__mem_func__(self.RemoveQuestDialog)(key))
self.wndQuestWindow[self.wndQuestWindowNewKey] = q
self.wndQuestWindowNewKey = self.wndQuestWindowNewKey + 1
# UNKNOWN_UPDATE
self.wndQuestWindow.append(q)
# END_OF_UNKNOWN_UPDATE
def RemoveQuestDialog(self, key):
del self.wndQuestWindow[key]
## Exchange
def StartExchange(self):
@ -873,7 +871,7 @@ class Interface(object):
self.wndTaskBar.HideMouseImage()
def ToggleChat(self):
if TRUE == self.wndChat.IsEditMode():
if True == self.wndChat.IsEditMode():
self.wndChat.CloseChat()
else:
# <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ä<><C3A4> <20>Է<EFBFBD><D4B7><EFBFBD> <20>ȵ<EFBFBD>
@ -896,7 +894,7 @@ class Interface(object):
self.dlgRestart.Close()
def ToggleSystemDialog(self):
if FALSE == self.dlgSystem.IsShow():
if False == self.dlgSystem.IsShow():
self.dlgSystem.OpenDialog()
self.dlgSystem.SetTop()
else:
@ -915,7 +913,7 @@ class Interface(object):
def ToggleMiniMap(self):
if app.IsPressed(app.DIK_LSHIFT) or app.IsPressed(app.DIK_RSHIFT):
if FALSE == self.wndMiniMap.isShowMiniMap():
if False == self.wndMiniMap.isShowMiniMap():
self.wndMiniMap.ShowMiniMap()
self.wndMiniMap.SetTop()
else:
@ -941,8 +939,8 @@ class Interface(object):
self.wndMiniMap.ScaleDown()
def ToggleCharacterWindow(self, state):
if FALSE == player.IsObserverMode():
if FALSE == self.wndCharacter.IsShow():
if False == player.IsObserverMode():
if False == self.wndCharacter.IsShow():
self.OpenCharacterWindowWithState(state)
else:
if state == self.wndCharacter.GetState():
@ -952,7 +950,7 @@ class Interface(object):
self.wndCharacter.SetState(state)
def OpenCharacterWindowWithState(self, state):
if FALSE == player.IsObserverMode():
if False == player.IsObserverMode():
self.wndCharacter.SetState(state)
self.wndCharacter.Show()
self.wndCharacter.SetTop()
@ -961,8 +959,8 @@ class Interface(object):
self.ToggleCharacterWindow("STATUS")
def ToggleInventoryWindow(self):
if FALSE == player.IsObserverMode():
if FALSE == self.wndInventory.IsShow():
if False == player.IsObserverMode():
if False == self.wndInventory.IsShow():
self.wndInventory.Show()
self.wndInventory.SetTop()
else:
@ -970,8 +968,8 @@ class Interface(object):
self.wndInventory.Close()
def ToggleExpandedButton(self):
if FALSE == player.IsObserverMode():
if FALSE == self.wndExpandedTaskBar.IsShow():
if False == player.IsObserverMode():
if False == self.wndExpandedTaskBar.IsShow():
self.wndExpandedTaskBar.Show()
self.wndExpandedTaskBar.SetTop()
else:
@ -992,13 +990,13 @@ class Interface(object):
self.wndDragonSoul.HighlightSlot(inven_pos)
def DragonSoulGiveQuilification(self):
self.DRAGON_SOUL_IS_QUALIFIED = TRUE
self.DRAGON_SOUL_IS_QUALIFIED = True
self.wndExpandedTaskBar.SetToolTipText(uiTaskBar.ExpandedTaskBar.BUTTON_DRAGON_SOUL, uiScriptLocale.TASKBAR_DRAGON_SOUL)
def ToggleDragonSoulWindow(self):
if FALSE == player.IsObserverMode():
if False == player.IsObserverMode():
if app.ENABLE_DRAGON_SOUL_SYSTEM:
if FALSE == self.wndDragonSoul.IsShow():
if False == self.wndDragonSoul.IsShow():
if self.DRAGON_SOUL_IS_QUALIFIED:
self.wndDragonSoul.Show()
else:
@ -1013,39 +1011,39 @@ class Interface(object):
self.wndDragonSoul.Close()
def ToggleDragonSoulWindowWithNoInfo(self):
if FALSE == player.IsObserverMode():
if False == player.IsObserverMode():
if app.ENABLE_DRAGON_SOUL_SYSTEM:
if FALSE == self.wndDragonSoul.IsShow():
if False == self.wndDragonSoul.IsShow():
if self.DRAGON_SOUL_IS_QUALIFIED:
self.wndDragonSoul.Show()
else:
self.wndDragonSoul.Close()
def FailDragonSoulRefine(self, reason, inven_type, inven_pos):
if FALSE == player.IsObserverMode():
if False == player.IsObserverMode():
if app.ENABLE_DRAGON_SOUL_SYSTEM:
if TRUE == self.wndDragonSoulRefine.IsShow():
if True == self.wndDragonSoulRefine.IsShow():
self.wndDragonSoulRefine.RefineFail(reason, inven_type, inven_pos)
def SucceedDragonSoulRefine(self, inven_type, inven_pos):
if FALSE == player.IsObserverMode():
if False == player.IsObserverMode():
if app.ENABLE_DRAGON_SOUL_SYSTEM:
if TRUE == self.wndDragonSoulRefine.IsShow():
if True == self.wndDragonSoulRefine.IsShow():
self.wndDragonSoulRefine.RefineSucceed(inven_type, inven_pos)
def OpenDragonSoulRefineWindow(self):
if FALSE == player.IsObserverMode():
if False == player.IsObserverMode():
if app.ENABLE_DRAGON_SOUL_SYSTEM:
if FALSE == self.wndDragonSoulRefine.IsShow():
if False == self.wndDragonSoulRefine.IsShow():
self.wndDragonSoulRefine.Show()
if None != self.wndDragonSoul:
if FALSE == self.wndDragonSoul.IsShow():
if False == self.wndDragonSoul.IsShow():
self.wndDragonSoul.Show()
def CloseDragonSoulRefineWindow(self):
if FALSE == player.IsObserverMode():
if False == player.IsObserverMode():
if app.ENABLE_DRAGON_SOUL_SYSTEM:
if TRUE == self.wndDragonSoulRefine.IsShow():
if True == self.wndDragonSoulRefine.IsShow():
self.wndDragonSoulRefine.Close()
# <20><>ȥ<EFBFBD><C8A5> <20><>
@ -1103,7 +1101,7 @@ class Interface(object):
# show GIFT
def ShowGift(self):
self.wndTaskBar.ShowGift()
self.wndTaskBar.ShowGift()
def CloseWbWindow(self):
self.wndWeb.Close()
@ -1149,7 +1147,7 @@ class Interface(object):
hideWindows += self.wndEnergyBar,
if self.wndExpandedTaskBar:
hideWindows += self.wndExpandedTaskBar,
hideWindows += self.wndExpandedTaskBar,
if app.ENABLE_DRAGON_SOUL_SYSTEM:
hideWindows += self.wndDragonSoul,\
@ -1208,19 +1206,19 @@ class Interface(object):
def ClosePrivateShopInputNameDialog(self):
self.inputDialog = None
return TRUE
return True
def OpenPrivateShopBuilder(self):
if not self.inputDialog:
return TRUE
return True
if not len(self.inputDialog.GetText()):
return TRUE
return True
self.privateShopBuilder.Open(self.inputDialog.GetText())
self.ClosePrivateShopInputNameDialog()
return TRUE
return True
def AppearPrivateShop(self, vid, text):
@ -1591,9 +1589,9 @@ class Interface(object):
def IsGameMasterName(self, name):
if self.listGMName.has_key(name):
return TRUE
return True
else:
return FALSE
return False
#####################################################################################
@ -1626,22 +1624,22 @@ class Interface(object):
# GUILD_BUILDING
if self.wndGuildBuilding.IsPositioningMode():
self.wndGuildBuilding.SettleCurrentPosition()
return TRUE
return True
elif self.wndGuildBuilding.IsPreviewMode():
pass
else:
return TRUE
return True
# END_OF_GUILD_BUILDING
return FALSE
return False
def BUILD_OnMouseLeftButtonUp(self):
if not self.wndGuildBuilding:
return
if not self.wndGuildBuilding.IsPreviewMode():
return TRUE
return True
return FALSE
return False
def BULID_EnterGuildArea(self, areaID):
# GUILD_BUILDING
@ -1685,7 +1683,7 @@ if __name__ == "__main__":
import localeInfo
app.SetMouseHandler(mouseModule.mouseController)
app.SetHairColorEnable(TRUE)
app.SetHairColorEnable(True)
wndMgr.SetMouseHandler(mouseModule.mouseController)
wndMgr.SetScreenSize(systemSetting.GetWidth(), systemSetting.GetHeight())
app.Create(localeInfo.APP_TITLE, systemSetting.GetWidth(), systemSetting.GetHeight(), 1)