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

@ -40,6 +40,7 @@ import uiPrivateShopBuilder
import mouseModule
import consoleModule
import localeInfo
import playerSettingModule
import interfaceModule
@ -56,15 +57,15 @@ from _weakref import proxy
# END_OF_TEXTTAIL_LIVINGTIME_CONTROL
# SCREENSHOT_CWDSAVE
SCREENSHOT_CWDSAVE = FALSE
SCREENSHOT_CWDSAVE = False
SCREENSHOT_DIR = None
if localeInfo.IsEUROPE():
SCREENSHOT_CWDSAVE = TRUE
SCREENSHOT_CWDSAVE = True
if localeInfo.IsCIBN10():
SCREENSHOT_CWDSAVE = FALSE
SCREENSHOT_DIR = "YT2W"
SCREENSHOT_CWDSAVE = False
SCREENSHOT_DIR = "YT2W"
cameraDistance = 1550.0
cameraPitch = 27.0
@ -82,7 +83,6 @@ class GameWindow(ui.ScriptWindow):
self.quickSlotPageIndex = 0
self.lastPKModeSendedTime = 0
self.LastBoniSwitcherId = 0
self.pressNumber = None
self.guildWarQuestionDialog = None
@ -92,18 +92,10 @@ class GameWindow(ui.ScriptWindow):
self.mapNameShower = None
self.affectShower = None
self.playerGauge = None
self.boniSwitcherWnd = []
constInfo.BONI_SWITCHER_LOAD = FALSE
#import uiBoniSwitcher
#for i in xrange(constInfo.SWITCHER_COUNT):
#self.boniSwitcherWnd.append(uiBoniSwitcher.BoniSwitcherDialog(i))
#self.boniSwitcherWnd[i].SetChangeBonusSwitcherEvent(self.__BoniSwitcherShow)
#self.boniSwitcherWnd[i].GAMESetBoniSwitcherCheckEvent(self.__BoniSwitcherCheckEvent)
self.stream=stream
self.interface = interfaceModule.Interface()
self.interface.MakeInterface()
self.interface.SetOpenBoniSwitcherEvent(self.__BoniSwitcherShow)
self.interface.ShowDefaultWindows()
self.curtain = uiPhaseCurtain.PhaseCurtain()
@ -124,6 +116,9 @@ class GameWindow(ui.ScriptWindow):
self.playerGauge = uiPlayerGauge.PlayerGauge(self)
self.playerGauge.Hide()
#wj 2014.1.2. ESCŰ<43><C5B0> <20><><EFBFBD><EFBFBD> <20><> <20><EFBFBD><ECBCB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD> DropQuestionDialog<6F><67> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ó<><C3B3><EFBFBD><EFBFBD> itemDropQuestionDialog<6F><67> <20><><EFBFBD><EFBFBD><EFBFBD>Ǿ<EFBFBD> <20><><EFBFBD><EFBFBD> <20>ʾ<EFBFBD> ERROR<4F><52> <20>߻<EFBFBD><DFBB>Ͽ<EFBFBD> init<69><74><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ÿ<EFBFBD> <20>ʱ<EFBFBD>ȭ <20><>Ŵ.
self.itemDropQuestionDialog = None
self.__SetQuickSlotMode()
@ -143,11 +138,11 @@ class GameWindow(ui.ScriptWindow):
self.quickSlotPageIndex = 0
self.PickingCharacterIndex = -1
self.PickingItemIndex = -1
self.consoleEnable = FALSE
self.isShowDebugInfo = FALSE
self.ShowNameFlag = FALSE
self.consoleEnable = False
self.isShowDebugInfo = False
self.ShowNameFlag = False
self.enableXMasBoom = FALSE
self.enableXMasBoom = False
self.startTimeXMasBoom = 0.0
self.indexXMasBoom = 0
@ -201,6 +196,8 @@ class GameWindow(ui.ScriptWindow):
exchange.InitTrading()
# END_OF_UNKNOWN_UPDATE
if debugInfo.IsDebugMode():
self.ToggleDebugInfo()
## Sound
snd.SetMusicVolume(systemSetting.GetMusicVolume()*net.GetFieldMusicVolume())
@ -306,11 +303,6 @@ class GameWindow(ui.ScriptWindow):
self.interface.Close()
self.interface=None
for i in xrange(len(self.boniSwitcherWnd)):
if self.boniSwitcherWnd[i]:
self.boniSwitcherWnd[i].Destroy()
self.boniSwitcherWnd[i] = None
player.ClearSkillDict()
player.ResetCameraRotation()
@ -339,7 +331,6 @@ class GameWindow(ui.ScriptWindow):
onPressKeyDict[app.DIK_F2] = lambda : self.__PressQuickSlot(5)
onPressKeyDict[app.DIK_F3] = lambda : self.__PressQuickSlot(6)
onPressKeyDict[app.DIK_F4] = lambda : self.__PressQuickSlot(7)
onPressKeyDict[app.DIK_F5] = lambda : self.BINARY_DragonSoulGiveQuilification()#packen
onPressKeyDict[app.DIK_LALT] = lambda : self.ShowName()
onPressKeyDict[app.DIK_LCONTROL] = lambda : self.ShowMouseImage()
@ -727,12 +718,12 @@ class GameWindow(ui.ScriptWindow):
net.SendAnswerMakeGuildPacket(guildName)
self.guildNameBoard.Close()
self.guildNameBoard = None
return TRUE
return True
def CancelGuildName(self):
self.guildNameBoard.Close()
self.guildNameBoard = None
return TRUE
return True
## Refine
def PopupMessage(self, msg):
@ -970,8 +961,8 @@ class GameWindow(ui.ScriptWindow):
def RecvPartyInviteQuestion(self, leaderVID, leaderName):
partyInviteQuestionDialog = uiCommon.QuestionDialog()
partyInviteQuestionDialog.SetText(leaderName + localeInfo.PARTY_DO_YOU_JOIN)
partyInviteQuestionDialog.SetAcceptEvent(lambda arg=TRUE: self.AnswerPartyInvite(arg))
partyInviteQuestionDialog.SetCancelEvent(lambda arg=FALSE: self.AnswerPartyInvite(arg))
partyInviteQuestionDialog.SetAcceptEvent(lambda arg=True: self.AnswerPartyInvite(arg))
partyInviteQuestionDialog.SetCancelEvent(lambda arg=False: self.AnswerPartyInvite(arg))
partyInviteQuestionDialog.Open()
partyInviteQuestionDialog.partyLeaderVID = leaderVID
self.partyInviteQuestionDialog = partyInviteQuestionDialog
@ -985,7 +976,7 @@ class GameWindow(ui.ScriptWindow):
distance = player.GetCharacterDistance(partyLeaderVID)
if distance < 0.0 or distance > 5000:
answer = FALSE
answer = False
net.SendPartyInviteAnswerPacket(partyLeaderVID, answer)
@ -1033,18 +1024,18 @@ class GameWindow(ui.ScriptWindow):
name = self.messengerAddFriendQuestion.name
net.SendChatPacket("/messenger_auth y " + name)
self.OnCloseAddFriendQuestionDialog()
return TRUE
return True
def OnDenyAddFriend(self):
name = self.messengerAddFriendQuestion.name
net.SendChatPacket("/messenger_auth n " + name)
self.OnCloseAddFriendQuestionDialog()
return TRUE
return True
def OnCloseAddFriendQuestionDialog(self):
self.messengerAddFriendQuestion.Close()
self.messengerAddFriendQuestion = None
return TRUE
return True
## SafeBox
def OpenSafeboxWindow(self, size):
@ -1068,8 +1059,8 @@ class GameWindow(ui.ScriptWindow):
def RecvGuildInviteQuestion(self, guildID, guildName):
guildInviteQuestionDialog = uiCommon.QuestionDialog()
guildInviteQuestionDialog.SetText(guildName + localeInfo.GUILD_DO_YOU_JOIN)
guildInviteQuestionDialog.SetAcceptEvent(lambda arg=TRUE: self.AnswerGuildInvite(arg))
guildInviteQuestionDialog.SetCancelEvent(lambda arg=FALSE: self.AnswerGuildInvite(arg))
guildInviteQuestionDialog.SetAcceptEvent(lambda arg=True: self.AnswerGuildInvite(arg))
guildInviteQuestionDialog.SetCancelEvent(lambda arg=False: self.AnswerGuildInvite(arg))
guildInviteQuestionDialog.Open()
guildInviteQuestionDialog.guildID = guildID
self.guildInviteQuestionDialog = guildInviteQuestionDialog
@ -1106,8 +1097,8 @@ class GameWindow(ui.ScriptWindow):
## Keyboard Functions
def CheckFocus(self):
if FALSE == self.IsFocus():
if TRUE == self.interface.IsOpenChat():
if False == self.IsFocus():
if True == self.interface.IsOpenChat():
self.interface.ToggleChat()
self.SetFocus()
@ -1137,10 +1128,12 @@ class GameWindow(ui.ScriptWindow):
chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.SCREENSHOT_SAVE_FAILURE)
def ShowConsole(self):
pass
if debugInfo.IsDebugMode() or True == self.consoleEnable:
player.EndKeyWalkingImmediately()
self.console.OpenWindow()
def ShowName(self):
self.ShowNameFlag = TRUE
self.ShowNameFlag = True
self.playerGauge.EnableShowAlways()
player.SetQuickPage(self.quickSlotPageIndex+1)
@ -1148,16 +1141,16 @@ class GameWindow(ui.ScriptWindow):
def __IsShowName(self):
if systemSetting.IsAlwaysShowName():
return TRUE
return True
if self.ShowNameFlag:
return TRUE
return True
return FALSE
return False
# END_OF_ADD_ALWAYS_SHOW_NAME
def HideName(self):
self.ShowNameFlag = FALSE
self.ShowNameFlag = False
self.playerGauge.DisableShowAlways()
player.SetQuickPage(self.quickSlotPageIndex)
@ -1168,34 +1161,34 @@ class GameWindow(ui.ScriptWindow):
self.interface.HideMouseImage()
def StartAttack(self):
player.SetAttackKeyState(TRUE)
player.SetAttackKeyState(True)
def EndAttack(self):
player.SetAttackKeyState(FALSE)
player.SetAttackKeyState(False)
def MoveUp(self):
player.SetSingleDIKKeyState(app.DIK_UP, TRUE)
player.SetSingleDIKKeyState(app.DIK_UP, True)
def MoveDown(self):
player.SetSingleDIKKeyState(app.DIK_DOWN, TRUE)
player.SetSingleDIKKeyState(app.DIK_DOWN, True)
def MoveLeft(self):
player.SetSingleDIKKeyState(app.DIK_LEFT, TRUE)
player.SetSingleDIKKeyState(app.DIK_LEFT, True)
def MoveRight(self):
player.SetSingleDIKKeyState(app.DIK_RIGHT, TRUE)
player.SetSingleDIKKeyState(app.DIK_RIGHT, True)
def StopUp(self):
player.SetSingleDIKKeyState(app.DIK_UP, FALSE)
player.SetSingleDIKKeyState(app.DIK_UP, False)
def StopDown(self):
player.SetSingleDIKKeyState(app.DIK_DOWN, FALSE)
player.SetSingleDIKKeyState(app.DIK_DOWN, False)
def StopLeft(self):
player.SetSingleDIKKeyState(app.DIK_LEFT, FALSE)
player.SetSingleDIKKeyState(app.DIK_LEFT, False)
def StopRight(self):
player.SetSingleDIKKeyState(app.DIK_RIGHT, FALSE)
player.SetSingleDIKKeyState(app.DIK_RIGHT, False)
def PickUpItem(self):
player.PickCloseItem()
@ -1208,7 +1201,9 @@ class GameWindow(ui.ScriptWindow):
if self.interface.wndWeb and self.interface.wndWeb.IsShow():
return
constInfo.SET_ITEM_DROP_QUESTION_DIALOG_STATUS(0)
if key == app.DIK_ESC:
self.RequestDropItem(False)
constInfo.SET_ITEM_QUESTION_DIALOG_STATUS(0)
try:
self.onPressKeyDict[key]()
@ -1217,7 +1212,7 @@ class GameWindow(ui.ScriptWindow):
except:
raise
return TRUE
return True
def OnKeyUp(self, key):
try:
@ -1227,7 +1222,7 @@ class GameWindow(ui.ScriptWindow):
except:
raise
return TRUE
return True
def OnMouseLeftButtonDown(self):
if self.interface.BUILD_OnMouseLeftButtonDown():
@ -1243,7 +1238,7 @@ class GameWindow(ui.ScriptWindow):
self.CheckFocus()
player.SetMouseState(player.MBT_LEFT, player.MBS_PRESS);
return TRUE
return True
def OnMouseLeftButtonUp(self):
@ -1288,13 +1283,13 @@ class GameWindow(ui.ScriptWindow):
player.SetMouseState(player.MBT_LEFT, player.MBS_CLICK)
#player.EndMouseWalking()
return TRUE
return True
def __PutItem(self, attachedType, attachedItemIndex, attachedItemSlotPos, attachedItemCount, dstChrID):
if player.SLOT_TYPE_INVENTORY == attachedType or player.SLOT_TYPE_DRAGON_SOUL_INVENTORY == attachedType:
attachedInvenType = player.SlotTypeToInvenType(attachedType)
if TRUE == chr.HasInstance(self.PickingCharacterIndex) and player.GetMainCharacterIndex() != dstChrID:
if player.IsEquipmentSlot(attachedItemSlotPos):
if True == chr.HasInstance(self.PickingCharacterIndex) and player.GetMainCharacterIndex() != dstChrID:
if player.IsEquipmentSlot(attachedItemSlotPos) and player.SLOT_TYPE_DRAGON_SOUL_INVENTORY != attachedType:
self.stream.popupWindow.Close()
self.stream.popupWindow.Open(localeInfo.EXCHANGE_FAILURE_EQUIP_ITEM, 0, localeInfo.UI_OK)
else:
@ -1307,7 +1302,7 @@ class GameWindow(ui.ScriptWindow):
self.__DropItem(attachedType, attachedItemIndex, attachedItemSlotPos, attachedItemCount)
def __PutMoney(self, attachedType, attachedMoney, dstChrID):
if TRUE == chr.HasInstance(dstChrID) and player.GetMainCharacterIndex() != dstChrID:
if True == chr.HasInstance(dstChrID) and player.GetMainCharacterIndex() != dstChrID:
net.SendExchangeStartPacket(dstChrID)
net.SendExchangeElkAddPacket(attachedMoney)
else:
@ -1327,8 +1322,8 @@ class GameWindow(ui.ScriptWindow):
itemDropQuestionDialog = uiCommon.QuestionDialog()
itemDropQuestionDialog.SetText(localeInfo.DO_YOU_DROP_MONEY % (attachedMoney))
itemDropQuestionDialog.SetAcceptEvent(lambda arg=TRUE: self.RequestDropItem(arg))
itemDropQuestionDialog.SetCancelEvent(lambda arg=FALSE: self.RequestDropItem(arg))
itemDropQuestionDialog.SetAcceptEvent(lambda arg=True: self.RequestDropItem(arg))
itemDropQuestionDialog.SetCancelEvent(lambda arg=False: self.RequestDropItem(arg))
itemDropQuestionDialog.Open()
itemDropQuestionDialog.dropType = attachedType
itemDropQuestionDialog.dropCount = attachedMoney
@ -1359,15 +1354,15 @@ class GameWindow(ui.ScriptWindow):
## Dialog
itemDropQuestionDialog = uiCommon.QuestionDialog()
itemDropQuestionDialog.SetText(questionText)
itemDropQuestionDialog.SetAcceptEvent(lambda arg=TRUE: self.RequestDropItem(arg))
itemDropQuestionDialog.SetCancelEvent(lambda arg=FALSE: self.RequestDropItem(arg))
itemDropQuestionDialog.SetAcceptEvent(lambda arg=True: self.RequestDropItem(arg))
itemDropQuestionDialog.SetCancelEvent(lambda arg=False: self.RequestDropItem(arg))
itemDropQuestionDialog.Open()
itemDropQuestionDialog.dropType = attachedType
itemDropQuestionDialog.dropNumber = attachedItemSlotPos
itemDropQuestionDialog.dropCount = attachedItemCount
self.itemDropQuestionDialog = itemDropQuestionDialog
constInfo.SET_ITEM_DROP_QUESTION_DIALOG_STATUS(1)
constInfo.SET_ITEM_QUESTION_DIALOG_STATUS(1)
elif player.SLOT_TYPE_DRAGON_SOUL_INVENTORY == attachedType:
dropItemIndex = player.GetItemIndex(player.DRAGON_SOUL_INVENTORY, attachedItemSlotPos)
@ -1380,15 +1375,15 @@ class GameWindow(ui.ScriptWindow):
## Dialog
itemDropQuestionDialog = uiCommon.QuestionDialog()
itemDropQuestionDialog.SetText(questionText)
itemDropQuestionDialog.SetAcceptEvent(lambda arg=TRUE: self.RequestDropItem(arg))
itemDropQuestionDialog.SetCancelEvent(lambda arg=FALSE: self.RequestDropItem(arg))
itemDropQuestionDialog.SetAcceptEvent(lambda arg=True: self.RequestDropItem(arg))
itemDropQuestionDialog.SetCancelEvent(lambda arg=False: self.RequestDropItem(arg))
itemDropQuestionDialog.Open()
itemDropQuestionDialog.dropType = attachedType
itemDropQuestionDialog.dropNumber = attachedItemSlotPos
itemDropQuestionDialog.dropCount = attachedItemCount
self.itemDropQuestionDialog = itemDropQuestionDialog
constInfo.SET_ITEM_DROP_QUESTION_DIALOG_STATUS(1)
constInfo.SET_ITEM_QUESTION_DIALOG_STATUS(1)
def RequestDropItem(self, answer):
if not self.itemDropQuestionDialog:
@ -1415,7 +1410,7 @@ class GameWindow(ui.ScriptWindow):
self.itemDropQuestionDialog.Close()
self.itemDropQuestionDialog = None
constInfo.SET_ITEM_DROP_QUESTION_DIALOG_STATUS(0)
constInfo.SET_ITEM_QUESTION_DIALOG_STATUS(0)
# PRIVATESHOP_DISABLE_ITEM_DROP
def __SendDropItemPacket(self, itemVNum, itemCount, itemInvenType = player.INVENTORY):
@ -1430,20 +1425,20 @@ class GameWindow(ui.ScriptWindow):
self.CheckFocus()
if TRUE == mouseModule.mouseController.isAttached():
if True == mouseModule.mouseController.isAttached():
mouseModule.mouseController.DeattachObject()
else:
player.SetMouseState(player.MBT_RIGHT, player.MBS_PRESS)
return TRUE
return True
def OnMouseRightButtonUp(self):
if TRUE == mouseModule.mouseController.isAttached():
return TRUE
if True == mouseModule.mouseController.isAttached():
return True
player.SetMouseState(player.MBT_RIGHT, player.MBS_CLICK)
return TRUE
return True
def OnMouseMiddleButtonDown(self):
player.SetMouseMiddleButtonState(player.MBS_PRESS)
@ -1465,11 +1460,7 @@ class GameWindow(ui.ScriptWindow):
self.interface.BUILD_OnUpdate()
#for i in xrange(4+1):
#if self.boniSwitcherWnd[i]:
#if not self.boniSwitcherWnd[i].IsShow():
#self.boniSwitcherWnd[i].OnUpdate()
def UpdateDebugInfo(self):
#
# ij<><C4B3><EFBFBD><EFBFBD> <20><>ǥ <20><> FPS <20><><EFBFBD><EFBFBD>
@ -1517,7 +1508,7 @@ class GameWindow(ui.ScriptWindow):
########################
textTail.UpdateAllTextTail()
if TRUE == wndMgr.IsPickedWindow(self.hWnd):
if True == wndMgr.IsPickedWindow(self.hWnd):
self.PickingCharacterIndex = chr.Pick()
@ -1556,24 +1547,24 @@ class GameWindow(ui.ScriptWindow):
if app.TARGET == app.GetCursor():
app.SetCursor(app.NORMAL)
elif TRUE == mouseModule.mouseController.isAttached():
elif True == mouseModule.mouseController.isAttached():
mouseModule.mouseController.DeattachObject()
else:
self.interface.OpenSystemDialog()
return TRUE
return True
def OnIMEReturn(self):
if app.IsPressed(app.DIK_LSHIFT):
self.interface.OpenWhisperDialogWithoutTarget()
else:
self.interface.ToggleChat()
return TRUE
return True
def OnPressExitKey(self):
self.interface.ToggleSystemDialog()
return TRUE
return True
## BINARY CALLBACK
######################################################################################
@ -1596,8 +1587,8 @@ class GameWindow(ui.ScriptWindow):
def BINARY_OnQuestConfirm(self, msg, timeout, pid):
confirmDialog = uiCommon.QuestionDialogWithTimeLimit()
confirmDialog.Open(msg, timeout)
confirmDialog.SetAcceptEvent(lambda answer=TRUE, pid=pid: net.SendQuestConfirmPacket(answer, pid) or self.confirmDialog.Hide())
confirmDialog.SetCancelEvent(lambda answer=FALSE, pid=pid: net.SendQuestConfirmPacket(answer, pid) or self.confirmDialog.Hide())
confirmDialog.SetAcceptEvent(lambda answer=True, pid=pid: net.SendQuestConfirmPacket(answer, pid) or self.confirmDialog.Hide())
confirmDialog.SetCancelEvent(lambda answer=False, pid=pid: net.SendQuestConfirmPacket(answer, pid) or self.confirmDialog.Hide())
self.confirmDialog = confirmDialog
# END_OF_QUEST_CONFIRM
@ -1902,20 +1893,9 @@ class GameWindow(ui.ScriptWindow):
"PlayMusic" : self.__PlayMusic,
# END_OF_WEDDING
########Anti Exp Button by Sanii##########
"anti_exp" : self.AntiExp,
"anti_exp_state" : self.AntiExpState,
# PRIVATE_SHOP_PRICE_LIST
"MyShopPriceList" : self.__PrivateShop_PriceList,
# END_OF_PRIVATE_SHOP_PRICE_LIST
# BONI_SWITCHER
#"ResetBoniFromSwitcher" : self.__ResetBoniFromSwitcher,
#"AddBoniToSwitcher" : self.__AddBoniToSwitcher,
#"AddMaxValueToBoni" : self.__AddMaxValueToBoni,
#"SetBoniSwitcherLoad" : self.__SetBoniSwitcherLoad,
# END_OF_BONI_SWITCHER
}
self.serverCommander=stringCommander.Analyzer()
@ -1990,9 +1970,9 @@ class GameWindow(ui.ScriptWindow):
"metin2_map_deviltower1", )
if background.GetCurrentMapName() in mapDict:
return FALSE
return False
return TRUE
return True
def __XMasSnow_Enable(self, mode):
@ -2018,12 +1998,12 @@ class GameWindow(ui.ScriptWindow):
print "XMAS_BOOM ON"
self.__DayMode_Update("dark")
self.enableXMasBoom = TRUE
self.enableXMasBoom = True
self.startTimeXMasBoom = app.GetTime()
else:
print "XMAS_BOOM OFF"
self.__DayMode_Update("light")
self.enableXMasBoom = FALSE
self.enableXMasBoom = False
def __XMasTree_Enable(self, grade):
@ -2056,10 +2036,10 @@ class GameWindow(ui.ScriptWindow):
self.interface.CloseRestartDialog()
def __Console_Enable(self):
constInfo.CONSOLE_ENABLE = TRUE
self.consoleEnable = TRUE
constInfo.CONSOLE_ENABLE = True
self.consoleEnable = True
app.EnableSpecialCameraMode()
ui.EnablePaste(TRUE)
ui.EnablePaste(True)
## PrivateShop
def __PrivateShop_Open(self):
@ -2132,8 +2112,8 @@ class GameWindow(ui.ScriptWindow):
partyRequestQuestionDialog.SetText(chr.GetNameByVID(vid) + localeInfo.PARTY_DO_YOU_ACCEPT)
partyRequestQuestionDialog.SetAcceptText(localeInfo.UI_ACCEPT)
partyRequestQuestionDialog.SetCancelText(localeInfo.UI_DENY)
partyRequestQuestionDialog.SetAcceptEvent(lambda arg=TRUE: self.__AnswerPartyRequest(arg))
partyRequestQuestionDialog.SetCancelEvent(lambda arg=FALSE: self.__AnswerPartyRequest(arg))
partyRequestQuestionDialog.SetAcceptEvent(lambda arg=True: self.__AnswerPartyRequest(arg))
partyRequestQuestionDialog.SetCancelEvent(lambda arg=False: self.__AnswerPartyRequest(arg))
partyRequestQuestionDialog.Open()
partyRequestQuestionDialog.vid = vid
self.partyRequestQuestionDialog = partyRequestQuestionDialog
@ -2200,83 +2180,4 @@ class GameWindow(ui.ScriptWindow):
# END_OF_WEDDING
########Anti Exp Button by Sanii##########
def AntiExp(self, qid):
constInfo.ANTI_EXP = int(qid)
def AntiExpState(self, state):
constInfo.ANTI_EXP_STATE = int(state)
##########################################
# BONI_SWITCHER
def __BoniSwitcherChangeVisible(self):
if not self.boniSwitcherWnd[self.LastBoniSwitcherId].IsShow():
self.__HideAllBoniSwitcher()
self.boniSwitcherWnd[self.LastBoniSwitcherId].Show(FALSE)
else:
self.__HideAllBoniSwitcher()
def __BoniSwitcherShow(self, id):
lastId = self.LastBoniSwitcherId
self.LastBoniSwitcherId = id
if not self.boniSwitcherWnd[id].IsShow():
self.__HideAllBoniSwitcher()
(x, y) = self.boniSwitcherWnd[lastId].GetGlobalPosition()
self.boniSwitcherWnd[id].SetPosition(x, y)
self.boniSwitcherWnd[id].Show(FALSE)
def __BoniSwitcherHide(self, id):
if self.boniSwitcherWnd[id]:
self.boniSwitcherWnd[id].Hide()
def __HideAllBoniSwitcher(self):
for i in xrange(len(self.boniSwitcherWnd)):
self.__BoniSwitcherHide(i)
def __ResetBoniFromSwitcher(self):
constInfo.BONI_LIST_WEAPON = []
constInfo.BONI_LIST_WEAPON_ADDON = []
constInfo.BONI_LIST_ARMOR = []
constInfo.BONI_LIST_BRACELET = []
constInfo.BONI_LIST_BOOTS = []
constInfo.BONI_LIST_NECKLACE = []
constInfo.BONI_LIST_HELMET = []
constInfo.BONI_LIST_SHIELD = []
constInfo.BONI_LIST_EARRINGS = []
def __AddBoniToSwitcher(self, EquipType, boniType):
EquipType = int(EquipType)
if EquipType == 1:
constInfo.BONI_LIST_WEAPON.append(int(boniType))
constInfo.BONI_LIST_WEAPON_ADDON.append(int(boniType))
elif EquipType == 2:
constInfo.BONI_LIST_ARMOR.append(int(boniType))
elif EquipType == 3:
constInfo.BONI_LIST_BRACELET.append(int(boniType))
elif EquipType == 4:
constInfo.BONI_LIST_BOOTS.append(int(boniType))
elif EquipType == 5:
constInfo.BONI_LIST_NECKLACE.append(int(boniType))
elif EquipType == 6:
constInfo.BONI_LIST_HELMET.append(int(boniType))
elif EquipType == 7:
constInfo.BONI_LIST_SHIELD.append(int(boniType))
elif EquipType == 8:
constInfo.BONI_LIST_EARRINGS.append(int(boniType))
elif EquipType == 9:
constInfo.BONI_LIST_WEAPON_ADDON.append(int(boniType))
def __AddMaxValueToBoni(self, boniType, maxValue):
constInfo.BONI_LIST_MAX_VALUE[int(boniType)] = int(maxValue)
def __SetBoniSwitcherLoad(self):
constInfo.BONI_SWITCHER_LOAD = TRUE
def __BoniSwitcherCheckEvent(self, slotPos):
for boniSwitcher in self.boniSwitcherWnd:
if boniSwitcher.aktItemPos == int(slotPos):
return TRUE
return FALSE
# END_BONI_SWITCHER