Esempio n. 1
0
	def Close(self):
		if musicInfo.selectMusic != "":
			snd.FadeOutMusic("BGM/"+musicInfo.selectMusic)

		self.stream.popupWindow.Close()

		if self.dlgBoard:
			self.dlgBoard.ClearDictionary()

		self.empireName = None
		self.flagDict = {}
		self.dlgBoard = None
		self.btnStart = None
		self.btnCreate = None
		self.btnDelete = None
		self.backGround = None

		self.dlgQuestion.ClearDictionary()
		self.dlgQuestion = None
		self.dlgQuestionText = None
		self.dlgQuestionAcceptButton = None
		self.dlgQuestionCancelButton = None
		self.privateInputBoard = None
		self.nameInputBoard = None

		chr.DeleteInstance(0)
		chr.DeleteInstance(1)
		chr.DeleteInstance(2)
		chr.DeleteInstance(3)

		self.Hide()
		self.KillFocus()

		app.HideCursor()
Esempio n. 2
0
    def IncreaseSlotIndex(self):
        slotIndex = (self.GetSlotIndex() + 1) % self.SLOT_COUNT
        #edit by chelo.

        #Eliminas todas las entidades
        chr.DeleteInstance(0)
        chr.DeleteInstance(1)
        chr.DeleteInstance(2)
        chr.DeleteInstance(3)

        #Creamos una nueva entidad.
        index = slotIndex
        id = GFHhg54GHGhh45GHGH.GetAccountCharacterSlotDataInteger(
            index, GFHhg54GHGhh45GHGH.ACCOUNT_CHARACTER_SLOT_ID)
        race = GFHhg54GHGhh45GHGH.GetAccountCharacterSlotDataInteger(
            index, GFHhg54GHGhh45GHGH.ACCOUNT_CHARACTER_SLOT_RACE)
        form = GFHhg54GHGhh45GHGH.GetAccountCharacterSlotDataInteger(
            index, GFHhg54GHGhh45GHGH.ACCOUNT_CHARACTER_SLOT_FORM)
        name = GFHhg54GHGhh45GHGH.GetAccountCharacterSlotDataString(
            index, GFHhg54GHGhh45GHGH.ACCOUNT_CHARACTER_SLOT_NAME)
        hair = GFHhg54GHGhh45GHGH.GetAccountCharacterSlotDataInteger(
            index, GFHhg54GHGhh45GHGH.ACCOUNT_CHARACTER_SLOT_HAIR)

        self.MakeCharacter(index, id, name, race, form, hair)
        self.SelectSlot(index)
Esempio n. 3
0
    def Refresh(self):
        if not self.isLoad:
            return

        # SLOT4
        indexArray = (3, 2, 1, 0)
        for index in indexArray:
            id = GFHhg54GHGhh45GHGH.GetAccountCharacterSlotDataInteger(
                index, GFHhg54GHGhh45GHGH.ACCOUNT_CHARACTER_SLOT_ID)
            race = GFHhg54GHGhh45GHGH.GetAccountCharacterSlotDataInteger(
                index, GFHhg54GHGhh45GHGH.ACCOUNT_CHARACTER_SLOT_RACE)
            form = GFHhg54GHGhh45GHGH.GetAccountCharacterSlotDataInteger(
                index, GFHhg54GHGhh45GHGH.ACCOUNT_CHARACTER_SLOT_FORM)
            name = GFHhg54GHGhh45GHGH.GetAccountCharacterSlotDataString(
                index, GFHhg54GHGhh45GHGH.ACCOUNT_CHARACTER_SLOT_NAME)
            hair = GFHhg54GHGhh45GHGH.GetAccountCharacterSlotDataInteger(
                index, GFHhg54GHGhh45GHGH.ACCOUNT_CHARACTER_SLOT_HAIR)

            if id:
                self.MakeCharacter(index, id, name, race, form, hair)
                self.SelectSlot(index)

        self.SelectSlot(self.slot)
        #Chelo , Una vez que se crean las entidades PJ se las elimina todas menos la primera.
        chr.DeleteInstance(1)
        chr.DeleteInstance(2)
        chr.DeleteInstance(3)
Esempio n. 4
0
	def Close(self):
		print "---------------------------------------------------------------------------- CLOSE CREATE WINDOW"

		self.editCharacterName.Enable()
		self.dlgBoard.ClearDictionary()
		self.stream=0
		self.shapeButtonList = []
		self.genderButtonList = []
		self.btnCreate = 0
		self.btnCancel = 0
		self.btnPrev = 0
		self.btnNext = 0
		self.btnLeft = 0
		self.btnRight = 0
		self.textBoard = 0
		self.editCharacterName = 0
		self.backGround = None

		if musicInfo.createMusic != "":
			snd.FadeOutMusic("BGM/"+musicInfo.createMusic)

		for id in self.instanceIDs:
			chr.DeleteInstance(id)

		self.dlgBoard.Hide()
		self.Hide()

		app.HideCursor()
		event.Destroy()
Esempio n. 5
0
    def __SelectSlot(self, slot):

        if slot < 0:
            return

        if slot >= SLOT_COUNT:
            return

        if self.slot == slot:
            return

        self.slot = slot

        if self.IsShow():
            snd.PlaySound("sound/ui/click.wav")

        chr_id = self.__GetSlotChrID(self.gender, slot)

        for id in xrange(BASE_CHR_ID + SLOT_COUNT * PAGE_COUNT):
            chr.DeleteInstance(id)

        chr.SelectInstance(chr_id)

        for i in xrange(len(self.char)):
            self.char[i].SetUp()

        self.char[slot].Down()

        self.__MakeCharacter(chr_id, self.characters[self.gender][slot])
        self.__SelectShape(self.shape)
        self.__SelectGender(self.gender)
Esempio n. 6
0
    def __SelectGender(self, gender):
        for button in self.genderButton:
            button.SetUp()

        self.genderButton[gender].Down()

        self.gender = gender

        if gender == MAN:
            for i in xrange(SLOT_COUNT):
                chr.SelectInstance(self.__GetSlotChrID(0, i))
                chr.Show()
            for i in xrange(SLOT_COUNT):
                chr.SelectInstance(self.__GetSlotChrID(1, i))
                chr.Hide()
        else:
            for i in xrange(SLOT_COUNT):
                chr.SelectInstance(self.__GetSlotChrID(0, i))
                chr.Hide()
            for i in xrange(SLOT_COUNT):
                chr.SelectInstance(self.__GetSlotChrID(1, i))
                chr.Show()

        for id in xrange(BASE_CHR_ID + SLOT_COUNT * PAGE_COUNT):
            chr.DeleteInstance(id)

        chr_id = self.__GetSlotChrID(self.gender, self.slot)
        self.__MakeCharacter(chr_id, self.characters[self.gender][self.slot])
        self.__SelectShape(self.shape)
Esempio n. 7
0
    def Close(self):
        if musicInfo.createMusic != "":
            snd.FadeOutMusic("BGM/" + musicInfo.createMusic)

        for id in xrange(BASE_CHR_ID + SLOT_COUNT * PAGE_COUNT):
            chr.DeleteInstance(id)

        self.dlgBoard.Hide()
        self.Hide()

        app.HideCursor()
    def OnDeleteSuccess(self, slot):
        self.PopupMessage(localeInfo.SELECT_DELETED)
        for i in xrange(len(self.RealSlot)):
            chr.DeleteInstance(i)

        self.RealSlot = []
        self.SelectSlot = M2_INIT_VALUE

        for button in self.CharacterButtonList:
            button.AppendTextLineAllClear()

        if not self.mycharacters.LoadCharacterData():
            self.stream.popupWindow.Close()
            self.stream.SetCharacterSlot(self.mycharacters.GetEmptySlot())
            self.SelectEmpire = True
    def __del__(self):
        self.MainStream = None

        for i in xrange(self.HowManyChar):
            chr.DeleteInstance(i)

        self.PriorityData = None
        self.myUnitDic = None
        self.HowManyChar = None
        self.EmptySlot = None
        self.Race = None
        self.Job = None
        self.Guild_Name = None
        self.Play_Time = None
        self.Change_Name = None
        self.Stat_Point = None
Esempio n. 10
0
	def SelectSlot(self, index):
		if index < 0:
			return
		if index >= self.SLOT_COUNT:
			return

		self.slot = index
		
		for i in range(self.SLOT_COUNT):
			chr.DeleteInstance(i)

		chr.SelectInstance(self.slot)
		
		id = net.GetAccountCharacterSlotDataInteger(self.slot, net.ACCOUNT_CHARACTER_SLOT_ID)
		if 0 != id:
			self.btnStart.Enable()
			self.btnDelete.Show()
			self.btnCreate.Hide()

			name = net.GetAccountCharacterSlotDataString(self.slot, net.ACCOUNT_CHARACTER_SLOT_NAME)
			level = net.GetAccountCharacterSlotDataInteger(self.slot, net.ACCOUNT_CHARACTER_SLOT_LEVEL)
			playTime = net.GetAccountCharacterSlotDataInteger(self.slot, net.ACCOUNT_CHARACTER_SLOT_PLAYTIME)
			hth = net.GetAccountCharacterSlotDataInteger(self.slot, net.ACCOUNT_CHARACTER_SLOT_HTH)
			int = net.GetAccountCharacterSlotDataInteger(self.slot, net.ACCOUNT_CHARACTER_SLOT_INT)
			str = net.GetAccountCharacterSlotDataInteger(self.slot, net.ACCOUNT_CHARACTER_SLOT_STR)
			dex = net.GetAccountCharacterSlotDataInteger(self.slot, net.ACCOUNT_CHARACTER_SLOT_DEX)
			race = net.GetAccountCharacterSlotDataInteger(self.slot, net.ACCOUNT_CHARACTER_SLOT_RACE)
			form = net.GetAccountCharacterSlotDataInteger(index, net.ACCOUNT_CHARACTER_SLOT_FORM)
			hair = net.GetAccountCharacterSlotDataInteger(index, net.ACCOUNT_CHARACTER_SLOT_HAIR)
			
			self.changeNameFlag = net.GetAccountCharacterSlotDataInteger(self.slot, net.ACCOUNT_CHARACTER_SLOT_CHANGE_NAME_FLAG)
			
			self.MakeCharacter(self.slot, id, name, race, form, hair)

			self.charName.SetText("%s" % name)
			self.empireName.SetText("Imperiul %s" % {1:"Shinsoo", 2:"Chunjo", 3:"Jinno"}.get(net.GetEmpireID(), "None"))
	
			if net.GetAccountCharacterSlotDataString(self.slot, net.ACCOUNT_CHARACTER_SLOT_GUILD_NAME):
				self.guildName.SetText(net.GetAccountCharacterSlotDataString(self.slot, net.ACCOUNT_CHARACTER_SLOT_GUILD_NAME))
			else:
				self.guildName.SetText(localeInfo.SELECT_NOT_JOIN_GUILD)
			self.level.SetText("%d" % level)
			self.playTime.SetText("%d" % playTime)

		else:
			self.InitCharacterBoard()
Esempio n. 11
0
	def DeleteCharacter(self, index):
		chr.DeleteInstance(index)
		self.SelectSlot(self.slot)
Esempio n. 12
0
	def Close(self):
		#print "##---------------------------------------- NEW INTRO CREATE CLOSE"
		##Init Value##
		self.ShowToolTip = None
		self.createSuccess = None
		self.MotionStart = None
		self.MotionTime = None
		self.gender = None
		self.job_id = None
		self.shape = None
		self.descIndex = None
		self.statpoint = None
		self.curGauge  = None
			
		for i in xrange(self.LEN_JOBLIST * 2 - 1):
			chr.DeleteInstance(i)
			
		self.stream = None
		self.M2STATPOINT = None
		self.M2JOBLIST = None
		self.M2_CONST_ID = None
		self.LEN_JOBLIST = None
		self.LEN_STATPOINT = None
		self.M2_INIT_VALUE = None
		self.EMPIRE_NAME = None
		self.EMPIRE_NAME_COLOR = None
		self.DESCRIPTION_FILE_NAME = None
		self.RACE_FACE_PATH = None
		self.DISC_FACE_PATH = None
		self.NameList = None
		self.JobList = None
		self.SelectBtnNameList = None
		self.SelectBtnFaceList = None
		self.genderButtonList = None
		self.shapeButtonList = None
		self.statValue = None
		self.GaugeList = None
		self.flag = None
		self.flagDict = None
		self.raceNameText = None
		
		self.textBoard = None
		self.btnPrev = None
		self.btnNext = None
		self.btnCreate = None
		self.btnCancel = None
		self.empireName = None
		self.editCharacterName = None
		self.backGround = None
		self.backGroundDict = None
		self.toolTip = None
		self.JobSex = None
		self.dlgBoard.ClearDictionary()
		
		if musicInfo.createMusic != "":
			snd.FadeOutMusic("BGM/"+musicInfo.createMusic)
	
		self.dlgBoard.Hide()
		self.Hide()

		app.HideCursor()
		event.Destroy()