Added game files from TMP4
This commit is contained in:
@ -25,25 +25,26 @@ import uiPlayerGauge
|
||||
import uiCharacter
|
||||
import uiTarget
|
||||
import consoleModule
|
||||
import interfaceModule
|
||||
|
||||
# interface module<6C><65> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>...
|
||||
import interfaceModule
|
||||
import uiTaskBar
|
||||
import uiInventory
|
||||
|
||||
###################################
|
||||
|
||||
LEAVE_BUTTON_FOR_POTAL = FALSE
|
||||
NOT_NEED_DELETE_CODE = FALSE
|
||||
ENABLE_ENGNUM_DELETE_CODE = FALSE
|
||||
LEAVE_BUTTON_FOR_POTAL = False
|
||||
NOT_NEED_DELETE_CODE = False
|
||||
ENABLE_ENGNUM_DELETE_CODE = False
|
||||
|
||||
if localeInfo.IsJAPAN():
|
||||
NOT_NEED_DELETE_CODE = TRUE
|
||||
NOT_NEED_DELETE_CODE = True
|
||||
elif localeInfo.IsHONGKONG():
|
||||
ENABLE_ENGNUM_DELETE_CODE = TRUE
|
||||
ENABLE_ENGNUM_DELETE_CODE = True
|
||||
elif localeInfo.IsNEWCIBN() or localeInfo.IsCIBN10():
|
||||
ENABLE_ENGNUM_DELETE_CODE = TRUE
|
||||
ENABLE_ENGNUM_DELETE_CODE = True
|
||||
elif localeInfo.IsEUROPE():
|
||||
ENABLE_ENGNUM_DELETE_CODE = TRUE
|
||||
|
||||
ENABLE_ENGNUM_DELETE_CODE = True
|
||||
|
||||
###################################
|
||||
|
||||
@ -61,7 +62,7 @@ class SelectCharacterWindow(ui.Window):
|
||||
net.EMPIRE_B : localeInfo.EMPIRE_B,
|
||||
net.EMPIRE_C : localeInfo.EMPIRE_C
|
||||
}
|
||||
|
||||
|
||||
class CharacterRenderer(ui.Window):
|
||||
def OnRender(self):
|
||||
grp.ClearDepthBuffer()
|
||||
@ -98,7 +99,7 @@ class SelectCharacterWindow(ui.Window):
|
||||
self.stream=stream
|
||||
self.slot = self.stream.GetCharacterSlot()
|
||||
|
||||
self.openLoadingFlag = FALSE
|
||||
self.openLoadingFlag = False
|
||||
self.startIndex = -1
|
||||
self.startReservingTime = 0
|
||||
|
||||
@ -119,9 +120,9 @@ class SelectCharacterWindow(ui.Window):
|
||||
self.destGauge = [0.0, 0.0, 0.0, 0.0]
|
||||
|
||||
self.dlgBoard = 0
|
||||
self.changeNameFlag = FALSE
|
||||
self.changeNameFlag = False
|
||||
self.nameInputBoard = None
|
||||
self.sendedChangeNamePacket = FALSE
|
||||
self.sendedChangeNamePacket = False
|
||||
|
||||
self.startIndex = -1
|
||||
self.isLoad = 0
|
||||
@ -132,6 +133,7 @@ class SelectCharacterWindow(ui.Window):
|
||||
|
||||
def Open(self):
|
||||
if not self.__LoadBoardDialog(uiScriptLocale.LOCALE_UISCRIPT_PATH + "selectcharacterwindow.py"):
|
||||
import dbg
|
||||
dbg.TraceError("SelectCharacterWindow.Open - __LoadScript Error")
|
||||
return
|
||||
|
||||
@ -342,9 +344,14 @@ class SelectCharacterWindow(ui.Window):
|
||||
self.chrRenderer = self.CharacterRenderer()
|
||||
self.chrRenderer.SetParent(self.backGround)
|
||||
self.chrRenderer.Show()
|
||||
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
def SameLoginDisconnect(self):
|
||||
self.stream.popupWindow.Close()
|
||||
self.stream.popupWindow.Open(localeInfo.LOGIN_FAILURE_SAMELOGIN, self.ExitSelect, localeInfo.UI_OK)
|
||||
#self.stream.popupWindow.Open(localeInfo.LOGIN_FAILURE_ALREAY, app.Exit, localeInfo.UI_OK)
|
||||
|
||||
def MakeCharacter(self, index, id, name, race, form, hair):
|
||||
if 0 == id:
|
||||
return
|
||||
@ -402,7 +409,7 @@ class SelectCharacterWindow(ui.Window):
|
||||
|
||||
for i in xrange(self.SLOT_COUNT):
|
||||
|
||||
if FALSE == chr.HasInstance(i):
|
||||
if False == chr.HasInstance(i):
|
||||
continue
|
||||
|
||||
chr.SelectInstance(i)
|
||||
@ -429,7 +436,7 @@ class SelectCharacterWindow(ui.Window):
|
||||
|
||||
def OnChangeName(self, id, name):
|
||||
self.SelectSlot(id)
|
||||
self.sendedChangeNamePacket = FALSE
|
||||
self.sendedChangeNamePacket = False
|
||||
self.PopupMessage(localeInfo.SELECT_CHANGED_NAME)
|
||||
|
||||
def AcceptInputName(self):
|
||||
@ -437,17 +444,17 @@ class SelectCharacterWindow(ui.Window):
|
||||
if not changeName:
|
||||
return
|
||||
|
||||
self.sendedChangeNamePacket = TRUE
|
||||
self.sendedChangeNamePacket = True
|
||||
net.SendChangeNamePacket(self.nameInputBoard.slot, changeName)
|
||||
return self.CancelInputName()
|
||||
|
||||
def CancelInputName(self):
|
||||
self.nameInputBoard.Close()
|
||||
self.nameInputBoard = None
|
||||
return TRUE
|
||||
return True
|
||||
|
||||
def OnCreateFailure(self, type):
|
||||
self.sendedChangeNamePacket = FALSE
|
||||
self.sendedChangeNamePacket = False
|
||||
if 0 == type:
|
||||
self.PopupMessage(localeInfo.SELECT_CHANGE_FAILURE_STRANGE_NAME)
|
||||
elif 1 == type:
|
||||
@ -531,11 +538,11 @@ class SelectCharacterWindow(ui.Window):
|
||||
self.PopupMessage(localeInfo.SELECT_DELEING)
|
||||
|
||||
self.CancelInputPrivateCode()
|
||||
return TRUE
|
||||
return True
|
||||
|
||||
def CancelInputPrivateCode(self):
|
||||
self.privateInputBoard = None
|
||||
return TRUE
|
||||
return True
|
||||
|
||||
def OnDeleteSuccess(self, slot):
|
||||
self.PopupMessage(localeInfo.SELECT_DELETED)
|
||||
@ -628,14 +635,24 @@ class SelectCharacterWindow(ui.Window):
|
||||
else:
|
||||
self.GuildName.SetText(localeInfo.SELECT_NOT_JOIN_GUILD)
|
||||
|
||||
# statesSummary = float(valueHTH + valueINT + valueSTR + valueDEX)
|
||||
# if statesSummary > 0.0:
|
||||
# self.destGauge = [
|
||||
# float(valueHTH) / statesSummary,
|
||||
# float(valueINT) / statesSummary,
|
||||
# float(valueSTR) / statesSummary,
|
||||
# float(valueDEX) / statesSummary
|
||||
# ]
|
||||
|
||||
|
||||
statesSummary = float(valueHTH + valueINT + valueSTR + valueDEX)
|
||||
if statesSummary > 0.0:
|
||||
self.destGauge = [
|
||||
float(valueHTH) / statesSummary,
|
||||
float(valueINT) / statesSummary,
|
||||
float(valueSTR) / statesSummary,
|
||||
float(valueDEX) / statesSummary
|
||||
]
|
||||
self.destGauge =[
|
||||
float(valueHTH) / 90,
|
||||
float(valueINT) / 90,
|
||||
float(valueSTR) / 90,
|
||||
float(valueDEX) / 90
|
||||
]
|
||||
|
||||
else:
|
||||
|
||||
@ -667,6 +684,8 @@ class SelectCharacterWindow(ui.Window):
|
||||
self.SelectSlot(1)
|
||||
if 4 == key:
|
||||
self.SelectSlot(2)
|
||||
if 5 == key:
|
||||
self.SelectSlot(3)
|
||||
|
||||
if 28 == key:
|
||||
|
||||
@ -684,7 +703,7 @@ class SelectCharacterWindow(ui.Window):
|
||||
self.slot = (self.GetSlotIndex() + 1) % self.SLOT_COUNT
|
||||
self.SelectSlot(self.slot)
|
||||
|
||||
return TRUE
|
||||
return True
|
||||
|
||||
def OnUpdate(self):
|
||||
chr.Update()
|
||||
@ -701,7 +720,7 @@ class SelectCharacterWindow(ui.Window):
|
||||
|
||||
for i in xrange(self.SLOT_COUNT):
|
||||
|
||||
if FALSE == chr.HasInstance(i):
|
||||
if False == chr.HasInstance(i):
|
||||
continue
|
||||
|
||||
chr.SelectInstance(i)
|
||||
@ -730,10 +749,10 @@ class SelectCharacterWindow(ui.Window):
|
||||
## Temporary
|
||||
## BackGroundLoading<6E><67> <20><><EFBFBD><EFBFBD> <20>ɶ<EFBFBD><C9B6><EFBFBD><EFBFBD><EFBFBD> <20>ӽ÷<D3BD>..
|
||||
if app.GetTime() - self.startReservingTime > 3.0:
|
||||
if FALSE == self.openLoadingFlag:
|
||||
if False == self.openLoadingFlag:
|
||||
chrSlot=self.stream.GetCharacterSlot()
|
||||
net.DirectEnter(chrSlot)
|
||||
self.openLoadingFlag = TRUE
|
||||
self.openLoadingFlag = True
|
||||
|
||||
playTime=net.GetAccountCharacterSlotDataInteger(self.slot, net.ACCOUNT_CHARACTER_SLOT_PLAYTIME)
|
||||
|
||||
@ -756,5 +775,5 @@ class SelectCharacterWindow(ui.Window):
|
||||
|
||||
def OnPressExitKey(self):
|
||||
self.ExitSelect()
|
||||
return TRUE
|
||||
return True
|
||||
|
||||
|
Reference in New Issue
Block a user