• 0
Saejin

resolu Shaman féminin

Question

Version des Files / Type d’Émulateur : 2019

Domaine ( Base de Données, Client, Core, Sources... ) : Client

Niveau : Débutant, Intermédiaire ou Avancé ? Débutant

 

1. Description du dysfonctionnement / Question :

Bonjour,

 

Côté client, plus précisément à la création d'un nouveau personnage, je constate que :

 

la shaman féminin n'est pas disponible, lorsque je sélectionne le masculin et que je clique sur "changer de sexe"

Le shaman masculin n'est pas disponible, lorsque je sélectionne le masculin et que je clique sur "changer de sexe"

 

Quelqu'un pourrait rafraichir ma mémoire la dessus, où dois-je aller dans le client pour corriger ce soucis ?

 

Merci d'avance à tous

 

 

Edited by Saejin

Share this post


Link to post
Share on other sites

8 answers to this question

Recommended Posts

  • 0

Salut !

Je n'ai pas de solution à te donner mais quand je vois les multiples soucis de tes fameuses "files achetées", je commence à croire qu'elles ne sont pas vraiment de "qualité".

Tu devrais exposer tes syserr et éventuellement tes précédentes modif'. Il me semble que c'est sur le template d'une demande AQS tout ça.

Edited by Valithis²
  • Like 1

Share this post


Link to post
Share on other sites
  • 0

Bonjour et merci d'avoir répondu,

 

Tout est vierge côté client, enfin je l'ai acheté comme ça, avec l'interface déjà d'installer.

Il n'y a aucun syserr malheureusement

 

Je l'aurais laisser mais c'est embêtant de revenir sur une autre race pour sélectionner le sexe opposé et revenir sur le shaman

 

 

Merci d'avance

Share this post


Link to post
Share on other sites
  • 0

Cet interface est connu ?

Je te conseillerai de consulter l'introcreate.py (un nom de ce genre dans ton pack root), ce sera ton point de départ.

Share this post


Link to post
Share on other sites
  • 0

Bonjour et merci d'avoir répondu,

 

Voici ce que je trouve dans ce fichier "introcreate.py" :

import chr
import grp
import ginwork_app
import ginwork_net
import snd
import wndMgr
import event
import systemSetting
import localeInfo

import ui
import networkModule
import math
import snd
import musicInfo
import playerSettingModule
import uiScriptLocale
import uiToolTip

LOCALE_PATH = "uiscript/"+uiScriptLocale.CODEPAGE+"_"

MAN			= 0
WOMAN		= 1
SHAPE0		= 0
SHAPE1		= 1
PAGE_COUNT	= 2
SLOT_COUNT	= 4
BASE_CHR_ID	= 3
CHARTYPE	= 1
g_bSHAPE	= 0

class CreateCharacterWindow(ui.Window):

	START_STAT =	(  ## CON INT STR DEX
						[ 4, 3, 6, 3 ], ## Warrior
						[ 3, 3, 4, 6 ], ## Assassin
						[ 3, 5, 5, 3 ], ## Sura
						[ 4, 6, 3, 3 ], ## Shaman
						[ 4, 3, 6, 3 ], ## Warrior
						[ 3, 3, 4, 6 ], ## Assassin
						[ 3, 5, 5, 3 ], ## Sura
						[ 4, 6, 3, 3 ], ## Shaman
					)
	
	HAIR_DATA = (		
		[ 1, 2, 3, 4, 5, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, ], ## Warrior
		[ 1, 2, 3, 4, 5, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, ], ## Assassin
		[ 1, 2, 3, 4, 5, 3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, 3009, 3010, 3011, ], ## Sura
		[ 1, 2, 3, 4, 5, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008, 4009, 4010, 4011, ], ## Shaman
	)

	class CharacterRenderer(ui.Window):
		def OnRender(self):
			grp.ClearDepthBuffer()
			grp.SetGameRenderState()
			grp.PushState()
			grp.SetOmniLight()

			screenWidth = wndMgr.GetScreenWidth()
			screenHeight = wndMgr.GetScreenHeight()
			newScreenWidth = float(screenWidth - 20)
			newScreenHeight = float(screenHeight)

			grp.SetViewport(20.0/screenWidth, 0.0, newScreenWidth/screenWidth, newScreenHeight/screenHeight)

			ginwork_app.SetCenterPosition(0.0, 0.0, 0.0)
			ginwork_app.SetCamera(1550.0, 15.0, 180.0, 95.0)
			grp.SetPerspective(13.0, newScreenWidth/newScreenHeight, 1000.0, 3000.0)

			(x, y) = ginwork_app.GetCursorPosition()
			grp.SetCursorPosition(x, y)

			chr.Deform()
			chr.Render()

			grp.RestoreViewport()
			grp.PopState()
			grp.SetInterfaceRenderState()

	def __init__(self, stream):
		print "NEW CREATE WINDOW ----------------------------------------------------------------------------"
		ui.Window.__init__(self)
		ginwork_net.SetPhaseWindow(ginwork_net.PHASE_WINDOW_CREATE, self)

		self.stream=stream

	def __del__(self):
		print "---------------------------------------------------------------------------- DELETE CREATE WINDOW"

		ginwork_net.SetPhaseWindow(ginwork_net.PHASE_WINDOW_CREATE, 0)
		ui.Window.__del__(self)

	def Open(self):
		print "OPEN CREATE WINDOW ----------------------------------------------------------------------------"

		playerSettingModule.LoadGameData("INIT")

		self.reservingRaceIndex = -1
		self.reservingShapeIndex = -1
		self.hairIndex = 0
		self.reservingStartTime = 0
		self.stat = [0, 0, 0, 0]
	
		self.gender = 0
		self.slot = -1
		self.shapeList = [
			[0, 0, 0, 0],
			[0, 0, 0, 0]]

		try:
			dlgBoard = ui.ScriptWindow()
			pythonScriptLoader = ui.PythonScriptLoader()
			pythonScriptLoader.LoadScriptFile(dlgBoard, uiScriptLocale.LOCALE_UISCRIPT_PATH + "createcharacterwindow.py")

		except:
			import exception
			exception.Abort("CreateCharacterWindow.Open.LoadObject")

		try:
			getChild = dlgBoard.GetChild

			self.btnCreate = getChild("create_button")
			self.btnCancel = getChild("return_button")
			self.btnLeft = getChild("left_button")
			self.btnRight = getChild("right_button")

			self.genderButtonList = []
			self.genderButtonList.append(getChild("sex_male"))
			self.genderButtonList.append(getChild("sex_famale"))

			self.shapeButtonList = []
			self.shapeButtonList.append(getChild("shape_1"))
			self.shapeButtonList.append(getChild("shape_2"))

			self.editCharacterName = getChild("character_name_value")

			self.backGround = getChild("BackGround")
			self.Platform = getChild("base_platform_char")

		except:
			import exception
			exception.Abort("CreateCharacterWindow.Open.BindObject")
		
		self.btnCreate.SetEvent(ui.__mem_func__(self.CreateCharacter))
		self.btnCancel.SetEvent(ui.__mem_func__(self.CancelCreate))
		self.btnLeft.SetEvent(ui.__mem_func__(self.__DecreaseSlotIndex))
		self.btnRight.SetEvent(ui.__mem_func__(self.__IncreaseSlotIndex))

		self.genderButtonList[0].SetEvent(ui.__mem_func__(self.__SelectGender), MAN)
		self.genderButtonList[1].SetEvent(ui.__mem_func__(self.__SelectGender), WOMAN)

		self.shapeButtonList[0].SetEvent(ui.__mem_func__(self.__SelectShape), SHAPE0)
		self.shapeButtonList[1].SetEvent(ui.__mem_func__(self.__SelectShape), SHAPE1)
		self.editCharacterName.SetReturnEvent(ui.__mem_func__(self.CreateCharacter))
		self.editCharacterName.SetEscapeEvent(ui.__mem_func__(self.CancelCreate))
		self.dlgBoard = dlgBoard

		self.chrRenderer = self.CharacterRenderer()
		self.chrRenderer.SetParent(self.Platform)
		self.chrRenderer.Show()

		self.editCharacterName.SetText("")

		self.EnableWindow()
		self.__SelectSlot(0)

		ginwork_app.SetCamera(500.0, 10.0, 180.0, 95.0)

		self.dlgBoard.Show()
		self.Show()
		
		self.SelectWarriorM()
		self.genderButtonList[0].Down()

		if musicInfo.createMusic != "":
			snd.SetMusicVolume(systemSetting.GetMusicVolume())
			snd.FadeInMusic("BGM/"+musicInfo.createMusic)

		ginwork_app.ShowCursor()


	def Close(self):
		print "---------------------------------------------------------------------------- CLOSE CREATE WINDOW"

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

		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()

		ginwork_app.HideCursor()
		event.Destroy()

	def EnableWindow(self):
		self.reservingRaceIndex = -1
		self.reservingShapeIndex = -1
 		self.btnCreate.Enable()
		self.btnCancel.Enable()
		self.btnLeft.Enable()
		self.btnRight.Enable()

		self.editCharacterName.SetFocus()
		self.editCharacterName.Enable()

		for page in xrange(PAGE_COUNT):
			for slot in xrange(SLOT_COUNT):
				chr_id = self.__GetSlotChrID(page, slot)
				chr.SelectInstance(chr_id)
				chr.BlendLoopMotion(chr.MOTION_INTRO_WAIT, 0.1)

	def DisableWindow(self):
		self.btnCreate.Disable()
		self.btnCancel.Disable()
		self.btnLeft.Disable()
		self.btnRight.Disable()
		self.editCharacterName.Disable()

		self.btnCreate.SetUp()
		
	def SelectWarriorM(self):
		self.RefreshShape()
		for id in xrange(BASE_CHR_ID + SLOT_COUNT * PAGE_COUNT):
			chr.DeleteInstance(id)

		self.ResetStat()

		self.shapeButtonList[0].SetUp()
		self.shapeButtonList[1].SetUp()
		self.genderButtonList[0].SetPosition((wndMgr.GetScreenWidth() - 51)/2 + (170+55), wndMgr.GetScreenHeight() - 83)
		self.genderButtonList[1].Show()
		self.reservingShapeSelection = 0
		chr.SelectInstance(self.__GetSlotChrID(0, 0))
		chr.SelectInstance(self.__GetSlotChrID(0, 1))
		chr.SelectInstance(self.__GetSlotChrID(0, 2))
		chr.SelectInstance(self.__GetSlotChrID(0, 3))
		chr.Hide()
		chr.SelectInstance(self.__GetSlotChrID(1, 0))
		chr.SelectInstance(self.__GetSlotChrID(1, 1))
		chr.SelectInstance(self.__GetSlotChrID(1, 2))
		chr.SelectInstance(self.__GetSlotChrID(1, 3))
		chr.Hide()

		self.__MakeCharacter(0, 0, playerSettingModule.RACE_WARRIOR_M)
		chr.SelectInstance(self.__GetSlotChrID(0, 0))
		chr.Show()

	def SelectWarriorF(self):
		self.RefreshShape()
		for id in xrange(BASE_CHR_ID + SLOT_COUNT * PAGE_COUNT):
			chr.DeleteInstance(id)

		self.ResetStat()
		
		self.shapeButtonList[0].SetUp()
		self.shapeButtonList[1].SetUp()
		self.genderButtonList[0].SetPosition((wndMgr.GetScreenWidth() - 51)/2 + (170+55), wndMgr.GetScreenHeight() - 83)
		self.genderButtonList[1].Show()
		self.reservingShapeSelection = 0
		chr.SelectInstance(self.__GetSlotChrID(0, 0))
		chr.SelectInstance(self.__GetSlotChrID(0, 1))
		chr.SelectInstance(self.__GetSlotChrID(0, 2))
		chr.SelectInstance(self.__GetSlotChrID(0, 3))
		chr.Hide()
		chr.SelectInstance(self.__GetSlotChrID(1, 0))
		chr.SelectInstance(self.__GetSlotChrID(1, 1))
		chr.SelectInstance(self.__GetSlotChrID(1, 2))
		chr.SelectInstance(self.__GetSlotChrID(1, 3))
		chr.Hide()

		self.__MakeCharacter(1, 0, playerSettingModule.RACE_WARRIOR_W)
		chr.SelectInstance(self.__GetSlotChrID(1, 0))
		chr.Show()

	def SelectAssassinM(self):
		self.RefreshShape()
		for id in xrange(BASE_CHR_ID + SLOT_COUNT * PAGE_COUNT):
			chr.DeleteInstance(id)

		self.ResetStat()

		self.shapeButtonList[0].SetUp()
		self.shapeButtonList[1].SetUp()
		self.genderButtonList[0].SetPosition((wndMgr.GetScreenWidth() - 51)/2 + (170+55), wndMgr.GetScreenHeight() - 83)
		self.genderButtonList[1].Show()
		self.reservingShapeSelection = 0
		chr.SelectInstance(self.__GetSlotChrID(0, 0))
		chr.SelectInstance(self.__GetSlotChrID(0, 1))
		chr.SelectInstance(self.__GetSlotChrID(0, 2))
		chr.SelectInstance(self.__GetSlotChrID(0, 3))
		chr.Hide()
		chr.SelectInstance(self.__GetSlotChrID(1, 0))
		chr.SelectInstance(self.__GetSlotChrID(1, 1))
		chr.SelectInstance(self.__GetSlotChrID(1, 2))
		chr.SelectInstance(self.__GetSlotChrID(1, 3))
		chr.Hide()

		self.__MakeCharacter(0, 1, playerSettingModule.RACE_ASSASSIN_M)
		chr.SelectInstance(self.__GetSlotChrID(0, 1))
		chr.Show()

	def SelectAssassinF(self):
		self.RefreshShape()
		for id in xrange(BASE_CHR_ID + SLOT_COUNT * PAGE_COUNT):
			chr.DeleteInstance(id)

		self.ResetStat()

		self.shapeButtonList[0].SetUp()
		self.shapeButtonList[1].SetUp()
		self.genderButtonList[0].SetPosition((wndMgr.GetScreenWidth() - 51)/2 + (170+55), wndMgr.GetScreenHeight() - 83)
		self.genderButtonList[1].Show()
		self.reservingShapeSelection = 0
		chr.SelectInstance(self.__GetSlotChrID(0, 0))
		chr.SelectInstance(self.__GetSlotChrID(0, 1))
		chr.SelectInstance(self.__GetSlotChrID(0, 2))
		chr.SelectInstance(self.__GetSlotChrID(0, 3))
		chr.Hide()
		chr.SelectInstance(self.__GetSlotChrID(1, 0))
		chr.SelectInstance(self.__GetSlotChrID(1, 1))
		chr.SelectInstance(self.__GetSlotChrID(1, 2))
		chr.SelectInstance(self.__GetSlotChrID(1, 3))
		chr.Hide()

		self.__MakeCharacter(1, 1, playerSettingModule.RACE_ASSASSIN_W)
		chr.SelectInstance(self.__GetSlotChrID(1, 1))
		chr.Show()

	def SelectSuraM(self):
		self.RefreshShape()
		for id in xrange(BASE_CHR_ID + SLOT_COUNT * PAGE_COUNT):
			chr.DeleteInstance(id)

		self.ResetStat()

		self.shapeButtonList[0].SetUp()
		self.shapeButtonList[1].SetUp()
		self.genderButtonList[0].SetPosition((wndMgr.GetScreenWidth() - 51)/2 + (170+55), wndMgr.GetScreenHeight() - 83)
		self.genderButtonList[1].Show()
		self.reservingShapeSelection = 0
		chr.SelectInstance(self.__GetSlotChrID(0, 0))
		chr.SelectInstance(self.__GetSlotChrID(0, 1))
		chr.SelectInstance(self.__GetSlotChrID(0, 2))
		chr.SelectInstance(self.__GetSlotChrID(0, 3))
		chr.Hide()
		chr.SelectInstance(self.__GetSlotChrID(1, 0))
		chr.SelectInstance(self.__GetSlotChrID(1, 1))
		chr.SelectInstance(self.__GetSlotChrID(1, 2))
		chr.SelectInstance(self.__GetSlotChrID(1, 3))
		chr.Hide()

		self.__MakeCharacter(0, 2, playerSettingModule.RACE_SURA_M)
		chr.SelectInstance(self.__GetSlotChrID(0, 2))
		chr.Show()

	def SelectSuraF(self):
		self.RefreshShape()
		for id in xrange(BASE_CHR_ID + SLOT_COUNT * PAGE_COUNT):
			chr.DeleteInstance(id)

		self.ResetStat()

		self.shapeButtonList[0].SetUp()
		self.shapeButtonList[1].SetUp()
		self.genderButtonList[0].SetPosition((wndMgr.GetScreenWidth() - 51)/2 + (170+55), wndMgr.GetScreenHeight() - 83)
		self.genderButtonList[1].Show()
		self.reservingShapeSelection = 0
		chr.SelectInstance(self.__GetSlotChrID(0, 0))
		chr.SelectInstance(self.__GetSlotChrID(0, 1))
		chr.SelectInstance(self.__GetSlotChrID(0, 2))
		chr.SelectInstance(self.__GetSlotChrID(0, 3))
		chr.Hide()
		chr.SelectInstance(self.__GetSlotChrID(1, 0))
		chr.SelectInstance(self.__GetSlotChrID(1, 1))
		chr.SelectInstance(self.__GetSlotChrID(1, 2))
		chr.SelectInstance(self.__GetSlotChrID(1, 3))
		chr.Hide()

		self.__MakeCharacter(1, 2, playerSettingModule.RACE_SURA_W)
		chr.SelectInstance(self.__GetSlotChrID(1, 2))
		chr.Show()

	def SelectShamanM(self):
		self.RefreshShape()
		for id in xrange(BASE_CHR_ID + SLOT_COUNT * PAGE_COUNT):
			chr.DeleteInstance(id)

		self.ResetStat()

		self.shapeButtonList[0].SetUp()
		self.shapeButtonList[1].SetUp()
		self.genderButtonList[0].SetPosition((wndMgr.GetScreenWidth() - 51)/2 + (170+55), wndMgr.GetScreenHeight() - 83)
		self.genderButtonList[1].Show()
		self.reservingShapeSelection = 0
		chr.SelectInstance(self.__GetSlotChrID(0, 0))
		chr.SelectInstance(self.__GetSlotChrID(0, 1))
		chr.SelectInstance(self.__GetSlotChrID(0, 2))
		chr.SelectInstance(self.__GetSlotChrID(0, 3))
		chr.Hide()
		chr.SelectInstance(self.__GetSlotChrID(1, 0))
		chr.SelectInstance(self.__GetSlotChrID(1, 1))
		chr.SelectInstance(self.__GetSlotChrID(1, 2))
		chr.SelectInstance(self.__GetSlotChrID(1, 3))
		chr.Hide()

		self.__MakeCharacter(0, 3, playerSettingModule.RACE_SHAMAN_M)
		chr.SelectInstance(self.__GetSlotChrID(0, 3))
		chr.Show()

	def SelectShamanF(self):
		self.RefreshShape()
		for id in xrange(BASE_CHR_ID + SLOT_COUNT * PAGE_COUNT):
			chr.DeleteInstance(id)

		self.ResetStat()

		self.shapeButtonList[0].SetUp()
		self.shapeButtonList[1].SetUp()
		self.genderButtonList[0].SetPosition((wndMgr.GetScreenWidth() - 51)/2 + (170+55), wndMgr.GetScreenHeight() - 83)
		self.genderButtonList[1].Show()
		self.reservingShapeSelection = 0
		chr.SelectInstance(self.__GetSlotChrID(0, 0))
		chr.SelectInstance(self.__GetSlotChrID(0, 1))
		chr.SelectInstance(self.__GetSlotChrID(0, 2))
		chr.SelectInstance(self.__GetSlotChrID(0, 3))
		chr.Hide()
		chr.SelectInstance(self.__GetSlotChrID(1, 0))
		chr.SelectInstance(self.__GetSlotChrID(1, 1))
		chr.SelectInstance(self.__GetSlotChrID(1, 2))
		chr.SelectInstance(self.__GetSlotChrID(1, 3))
		chr.Hide()

		self.__MakeCharacter(1, 3, playerSettingModule.RACE_SHAMAN_W)
		chr.SelectInstance(self.__GetSlotChrID(1, 3))
		chr.Show()

	## Manage Character
	def __GetSlotChrID(self, page, slot):
		return BASE_CHR_ID + page * SLOT_COUNT + slot

	def __MakeCharacter(self, page, slot, race, armor = 0):

		chr_id = self.__GetSlotChrID(page, slot)

		chr.CreateInstance(chr_id)
		chr.SelectInstance(chr_id)
		chr.SetVirtualID(chr_id)

		chr.SetRace(race)
		chr.SetArmor(armor)
		chr.SetHair(0)

		chr.Refresh()
		chr.SetMotionMode(chr.MOTION_MODE_GENERAL)
		chr.SetLoopMotion(chr.MOTION_INTRO_WAIT)

		chr.SetRotation(0.0)
		chr.Hide()

	def __SelectGender(self, gender):		
		global CHARTYPE
		for button in self.genderButtonList:
			button.SetUp()

		self.genderButtonList[gender].Down()

		self.gender = gender
		
		if gender == MAN:
			if CHARTYPE == 1:
				self.SelectWarriorM()
			elif CHARTYPE == 2:
				self.SelectAssassinM()
			elif CHARTYPE == 3:
				self.SelectSuraM()
			elif CHARTYPE == 4:
				self.SelectShamanM()
		else:
			if CHARTYPE == 1:
				self.SelectWarriorF()
			elif CHARTYPE == 2:
				self.SelectAssassinF()
			elif CHARTYPE == 3:
				self.SelectSuraF()
			elif CHARTYPE == 4:
				self.SelectShamanF()			

	def __SelectShape(self, shape):
		global g_bSHAPE
		self.shapeList[self.gender][self.slot] = shape

		self.RefreshShape()
		self.shapeButtonList[shape].Down()

		chr_id = self.__GetSlotChrID(self.gender, self.slot)		
		chr.SelectInstance(chr_id)		
		chr.ChangeShape(shape)		
		chr.SetMotionMode(chr.MOTION_MODE_GENERAL)
		chr.SetLoopMotion(chr.MOTION_INTRO_WAIT)
		g_bSHAPE = 1

	def GetSlotIndex(self):
		return self.slot

	def __SelectSlot(self, slot):

		if slot < 0:
			return

		if slot >= SLOT_COUNT:
			return		

		if self.slot == slot:
			return

		self.slot = slot
		self.ResetStat()

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

		chr_id = self.__GetSlotChrID(self.gender, slot)
		if chr.HasInstance(chr_id):
			chr.SelectInstance(chr_id)
			self.__SelectShape(self.shapeList[self.gender][slot])

	def CreateCharacter(self):
		global g_bSHAPE
		
		if g_bSHAPE == 0:
			self.PopupMessage("Veuillez choisir une tenue", self.EnableWindow)
			return
			
		g_bSHAPE = 0

		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 = ginwork_app.GetTime()

		for eachSlot in xrange(SLOT_COUNT):

			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 CancelCreate(self):
		self.stream.SetSelectCharacterPhase()
		
	def RefreshShape(self):
		# global g_bSHAPE
		# g_bSHAPE = 0
		for button in self.shapeButtonList:
			button.SetUp()

	def __DecreaseSlotIndex(self):
		global CHARTYPE
		if self.gender == MAN:
			if CHARTYPE == 2:
				self.SelectWarriorM()
				CHARTYPE = 1
			elif CHARTYPE == 3:
				self.SelectAssassinM()
				CHARTYPE = 2
			elif CHARTYPE == 0:
				self.SelectSuraM()
				CHARTYPE = 3
			elif CHARTYPE == 1:
				self.SelectShamanM()
				CHARTYPE = 0
		else:
			if CHARTYPE == 2:
				self.SelectWarriorF()
				CHARTYPE = 1
			elif CHARTYPE == 3:
				self.SelectAssassinF()
				CHARTYPE = 2
			elif CHARTYPE == 0:
				self.SelectSuraF()
				CHARTYPE = 3
			elif CHARTYPE == 1:
				self.SelectShamanF()
				CHARTYPE = 0	

	def __IncreaseSlotIndex(self):
		global CHARTYPE
		if self.gender == MAN:
			if CHARTYPE == 0:
				self.SelectWarriorM()
				CHARTYPE = 1
			elif CHARTYPE == 1:
				self.SelectAssassinM()
				CHARTYPE = 2
			elif CHARTYPE == 2:
				self.SelectSuraM()
				CHARTYPE = 3
			elif CHARTYPE == 3:
				self.SelectShamanM()
				CHARTYPE = 0
		else:
			if CHARTYPE == 0:
				self.SelectWarriorF()
				CHARTYPE = 1
			elif CHARTYPE == 1:
				self.SelectAssassinF()
				CHARTYPE = 2
			elif CHARTYPE == 2:
				self.SelectSuraF()
				CHARTYPE = 3
			elif CHARTYPE == 3:
				self.SelectShamanF()
				CHARTYPE = 0

	def __CheckCreateCharacter(self, name):
		if len(name) == 0:
			self.PopupMessage(localeInfo.CREATE_INPUT_NAME, self.EnableWindow)
			return FALSE

		if name.find(localeInfo.CREATE_GM_NAME)!=-1:
			self.PopupMessage(localeInfo.CREATE_ERROR_GM_NAME, self.EnableWindow)
			return FALSE

		if ginwork_net.IsInsultIn(name):
			self.PopupMessage(localeInfo.CREATE_ERROR_INSULT_NAME, self.EnableWindow)
			return FALSE

		return TRUE		

	def ResetStat(self):
		for i in xrange(4):
			self.stat[i] = self.START_STAT[self.slot][i]

	## Event
	def OnCreateSuccess(self):
		self.stream.SetSelectCharacterPhase()

	def OnCreateFailure(self, type):
		if 1 == type:
			self.PopupMessage(localeInfo.CREATE_EXIST_SAME_NAME, self.EnableWindow)
		else:
			self.PopupMessage(localeInfo.CREATE_FAILURE, self.EnableWindow)

	def OnKeyDown(self, key):

		if key == 2:
			self.__SelectSlot(0)
		if key == 3:
			self.__SelectSlot(1)
		if key == 4:
			self.__SelectSlot(2)
		if key == 5:
			self.__SelectSlot(3)
		if key == 6:
			self.__SelectSlot(4)

		if 203 == key:
			self.__DecreaseSlotIndex()
		if 205 == key:
			self.__IncreaseSlotIndex()

		if 59 == key:
			self.__SelectGender(MAN_PAGE)
		if 60 == key:
			self.__SelectGender(WOMAN_PAGE)

		return TRUE

	def OnUpdate(self):
		chr.Update()

		for page in xrange(PAGE_COUNT):
			for i in xrange(SLOT_COUNT):
				chr.SelectInstance(self.__GetSlotChrID(page, i))
		###########################################################
		if -1 != self.reservingRaceIndex:
			if ginwork_app.GetTime() - self.reservingStartTime >= 1.5:

				chrSlot=self.stream.GetCharacterSlot()
				textName = self.editCharacterName.GetText()
				raceIndex = self.reservingRaceIndex
				shapeIndex = self.reservingShapeIndex
				hairIndex = self.HAIR_DATA[chr.RaceToJob(self.reservingRaceIndex)][self.hairIndex]

				startStat = self.START_STAT[self.reservingRaceIndex]
				statCon = self.stat[0] - startStat[0]
				statInt = self.stat[1] - startStat[1]
				statStr = self.stat[2] - startStat[2]
				statDex = self.stat[3] - startStat[3]

				ginwork_net.SendCreateCharacterPacket(chrSlot, textName, raceIndex, shapeIndex, hairIndex, statCon, statInt, statStr, statDex)

				self.reservingRaceIndex = -1

		###########################################################	

	def EmptyFunc(self):
		pass

	def PopupMessage(self, msg, func=0):
		if not func:
			func=self.EmptyFunc

		self.stream.popupWindow.Close()
		self.stream.popupWindow.Open(msg, func, localeInfo.UI_OK)

	def OnPressExitKey(self):
		self.CancelCreate()
		return TRUE

	def OverInStatButton(self, stat):
		if not self.STAT_DESCRIPTION.has_key(stat):
			return

		self.toolTip.ClearToolTip()
		self.toolTip.AppendTextLine(self.STAT_DESCRIPTION[stat])
		self.toolTip.Show()

	def OverOutStatButton(self):
		self.toolTip.Hide()

if __name__ == "__main__":

	import ginwork_app
	import wndMgr
	import systemSetting
	import mouseModule
	import networkModule

	ginwork_app.SetMouseHandler(mouseModule.mouseController)
	ginwork_app.SetHairColorEnable(TRUE)
	wndMgr.SetMouseHandler(mouseModule.mouseController)
	wndMgr.SetScreenSize(systemSetting.GetWidth(), systemSetting.GetHeight())
	ginwork_app.Create(localeInfo.APP_TITLE, systemSetting.GetWidth(), systemSetting.GetHeight(), 1)
	mouseModule.mouseController.Create()

	mainStream = networkModule.MainStream()
	mainStream.Create()	

	test = CreateCharacterWindow(mainStream)
	test.Open()

	ginwork_app.Loop()

 

Ca à l'air bon donc je ne comprend vraiment pas le soucis, le fait de pas pouvoir choisir la shaman femme lorsque le shaman homme est sélectionner et vise versa, de devoir se sélectionner une autre race pour changer de sexe et revenir sur le shaman

 

Je possède l'interface Illumina 3

spacer.png

 

spacer.png

 

 

Merci d'avance

Edited by Saejin

Share this post


Link to post
Share on other sites
  • 0

re-Bonjour Saejin,

 

il semblerait que le problème vienne bien du fichier introcreate.py, plus précisément de la fonction __SelectGender.

Lors de la création d'un personnage, la variable CHARTYPE est fixée à 1, elle correspond au guerrier.
Puis elle est incrémentée de 1 lorsque l'on se déplace sur le Ninja, encore une fois pour le Sura puis... elle est mise à 0 pour le Shaman pour ensuite être à nouveau incrémentée pour le Guerrier...

Or dans la fonction __SelectGender, le cas où CHARTYPE == 0 n'est pas géré. Elle considère que le Shaman possède un CHARTYPE égal à 4, ce qui n'arrive jamais donc il se passe... rien du tout.

Je te conseille donc de corriger les deux conditions erronées de cette fonction en remplaçant elif CHARTYPE == 4: par elif CHARTYPE == 0: comme ci-dessous :

 

    def __SelectGender(self, gender):        
        global CHARTYPE
        for button in self.genderButtonList:
            button.SetUp()

        self.genderButtonList[gender].Down()

        self.gender = gender
        
        if gender == MAN:
            if CHARTYPE == 1:
                self.SelectWarriorM()
            elif CHARTYPE == 2:
                self.SelectAssassinM()
            elif CHARTYPE == 3:
                self.SelectSuraM()
            elif CHARTYPE == 0:
                self.SelectShamanM()
        else:
            if CHARTYPE == 1:
                self.SelectWarriorF()
            elif CHARTYPE == 2:
                self.SelectAssassinF()
            elif CHARTYPE == 3:
                self.SelectSuraF()
            elif CHARTYPE == 0:
                self.SelectShamanF()    

 

  • Like 1

Share this post


Link to post
Share on other sites
  • 0
Résolu - Le sujet étant résolu, il se voit verrouillé et déplacé dans le forum Résolu ou sans réponse...

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

  • Recently Browsing   0 members

    No registered users viewing this page.