def CreateCharacter(self): if -1 != self.reservingRaceIndex: return textName = self.editCharacterName.GetText() if False == self.__CheckCreateCharacter(textName): return if musicInfo.selectMusic != "": snd.FadeLimitOutMusic("BGM/"+musicInfo.selectMusic, systemSetting.GetMusicVolume()*0.05) self.DisableWindow() chr_id = self.__GetSlotChrID(self.gender, self.slot) chr.SelectInstance(chr_id) self.reservingRaceIndex = chr.GetRace() self.reservingShapeIndex = self.shapeList[self.gender][self.slot] self.reservingStartTime = app.GetTime() for eachSlot in xrange(SLOT_COUNT[self.gender]): sel_id = self.__GetSlotChrID(self.gender, eachSlot) chr.SelectInstance(sel_id) if eachSlot == self.slot: chr.PushOnceMotion(chr.MOTION_INTRO_SELECTED) else: chr.PushOnceMotion(chr.MOTION_INTRO_NOT_SELECTED)
def StartGame(self): if self.sendedChangeNamePacket: return if self.changeNameFlag: self.OpenChangeNameDialog() return if -1 != self.startIndex: return if musicInfo.selectMusic != "": snd.FadeLimitOutMusic("BGM/" + musicInfo.selectMusic, systemSetting.GetMusicVolume() * 0.05) self.btnStart.SetUp() self.btnCreate.SetUp() self.btnDelete.SetUp() self.btnExit.SetUp() self.btnLeft.SetUp() self.btnRight.SetUp() self.btnStart.Disable() self.btnCreate.Disable() self.btnDelete.Disable() self.btnExit.Disable() self.btnLeft.Disable() self.btnRight.Disable() self.dlgQuestion.Hide() self.stream.SetCharacterSlot(self.slot) self.startIndex = self.slot self.startReservingTime = app.GetTime() for i in xrange(self.SLOT_COUNT): if FALSE == chr.HasInstance(i): continue chr.SelectInstance(i) if i == self.slot: self.slot = self.slot chr.PushOnceMotion(chr.MOTION_INTRO_SELECTED, 0.1) continue chr.PushOnceMotion(chr.MOTION_INTRO_NOT_SELECTED, 0.1)
def InputPrivateCode(self): if not self.mycharacters.GetMyCharacterCount(): return import uiCommon privateInputBoard = uiCommon.InputDialogWithDescription() privateInputBoard.SetTitle(localeInfo.INPUT_PRIVATE_CODE_DIALOG_TITLE) privateInputBoard.SetAcceptEvent( ui.__mem_func__(self.AcceptInputPrivateCode)) privateInputBoard.SetCancelEvent( ui.__mem_func__(self.CancelInputPrivateCode)) if ENABLE_ENGNUM_DELETE_CODE: pass else: privateInputBoard.SetNumberMode() privateInputBoard.SetSecretMode() privateInputBoard.SetMaxLength(7) privateInputBoard.SetBoardWidth(250) privateInputBoard.SetDescription( localeInfo.INPUT_PRIVATE_CODE_DIALOG_DESCRIPTION) privateInputBoard.Open() self.privateInputBoard = privateInputBoard self.DisableWindow() if not self.Not_SelectMotion: self.Not_SelectMotion = True chr.PushOnceMotion(chr.MOTION_INTRO_NOT_SELECTED, 0.1)
def StartGameButton(self): if not self.mycharacters.GetMyCharacterCount( ) or self.MotionTime != 0.0: return self.DisableWindow() IsChangeName = self.mycharacters.GetChangeName(self.SelectSlot) if IsChangeName: self.OpenChangeNameDialog() return chr.PushOnceMotion(chr.MOTION_INTRO_SELECTED) self.MotionStart = True self.MotionTime = app.GetTime()
def CreateCharacterButton(self): if self.job_id == self.M2_INIT_VALUE or self.MotionStart : return textName = self.editCharacterName.GetText() if False == self.CheckCreateCharacterName(textName): return self.DisableWindow() chrSlot=self.stream.GetCharacterSlot() raceIndex = self.M2_CONST_ID[self.job_id][self.gender] shapeIndex = self.shape statCon = self.M2STATPOINT[self.job_id][0] statInt = self.M2STATPOINT[self.job_id][1] statStr = self.M2STATPOINT[self.job_id][2] statDex = self.M2STATPOINT[self.job_id][3] chr.PushOnceMotion(chr.MOTION_INTRO_SELECTED) net.SendCreateCharacterPacket(chrSlot, textName, raceIndex, shapeIndex, statCon, statInt, statStr, statDex) self.MotionStart = True self.MotionTime = app.GetTime()
def __Emocion(self): chr.PushOnceMotion(chr.MOTION_DEAD, 0.1)