#define ENABLE_TARGET_RACE #cpp #ifdef ENABLE_TARGET_RACE PyModule_AddIntConstant(poModule, "ENABLE_TARGET_RACE", true); #else PyModule_AddIntConstant(poModule, "ENABLE_TARGET_RACE", false); #endif # PythonNetworkStreamPhaseGame.cpp #arat bool CPythonNetworkStream::RecvTargetPacket() # İçinde bul altına ekle PyCallClassMemberFunc(m_apoPhaseWnd[PHASE_WINDOW_GAME], "CloseTargetBoard", Py_BuildValue("()")); #ifdef ENABLE_TARGET_RACE PyCallClassMemberFunc(m_apoPhaseWnd[PHASE_WINDOW_GAME], "BINARY_GetTargetRace", Py_BuildValue("(i)", pInstTarget->GetRace())); #endif #Py. if app.ENABLE_TARGET_RACE: import playerSettingModule # Arat Üzerine ekle BUTTON_NAME_LIST = ( if app.ENABLE_TARGET_RACE: FACE_IMAGE_DICT = { playerSettingModule.RACE_WARRIOR_M : "icon/face/warrior_m.tga", playerSettingModule.RACE_WARRIOR_W : "icon/face/warrior_w.tga", playerSettingModule.RACE_ASSASSIN_M : "icon/face/assassin_m.tga", playerSettingModule.RACE_ASSASSIN_W : "icon/face/assassin_w.tga", playerSettingModule.RACE_SURA_M : "icon/face/sura_m.tga", playerSettingModule.RACE_SURA_W : "icon/face/sura_w.tga", playerSettingModule.RACE_SHAMAN_M : "icon/face/shaman_m.tga", playerSettingModule.RACE_SHAMAN_W : "icon/face/shaman_w.tga", } FACE_BOX = "d:/ymir work/ui/game/windows/box_face2.sub" # Arat Üzerine ekle self.buttonDict = {} if app.ENABLE_TARGET_RACE: CharacterIcon = ui.ExpandedImageBox() CharacterIcon.SetParent(self) CharacterIcon.SetPosition(0,0) CharacterIcon.SetWindowHorizontalAlignLeft() Box = ui.ExpandedImageBox() Box.SetParent(self) Box.SetPosition(0,0) Box.Hide() Box.SetWindowHorizontalAlignLeft() # Arat Üzerine ekle self.nameString = 0 if app.ENABLE_TARGET_RACE: self.CharacterIcon = CharacterIcon self.Box = Box self.race = 0 # Arat Altına ekle def __Initialize(self): if app.ENABLE_TARGET_RACE: self.race = 0 # Arat Altına ekle self.showingButtonList = None # if app.ENABLE_TARGET_RACE: self.CharacterIcon = None self.Box = None # Arat Üzerine ekle self.SetSize(250, 40) # if app.ENABLE_TARGET_RACE: self.CharacterIcon.Hide() self.Box.Hide() # Arat Altına ekle def SetTargetVID(self, vid): self.vid = vid ### if app.ENABLE_TARGET_RACE: def SetTargetRace(self, race): self.race = race def GetTargetRace(self): return self.race if 0 <= self.race <= 7 else 0 # Arat Altına ekle def RefreshButton(self): self.HideAllButton() ### if app.ENABLE_TARGET_RACE: self.CharacterIcon.LoadImage(self.FACE_IMAGE_DICT[int(self.GetTargetRace())]) self.CharacterIcon.SetPosition(-50, -5) self.CharacterIcon.Hide() self.Box.LoadImage(self.FACE_BOX) self.Box.SetPosition(-50, -5) self.Box.Hide() ### # Arat Üzerine ekle exchangeButton = self.buttonDict[localeInfo.TARGET_BUTTON_EXCHANGE] ### if app.ENABLE_TARGET_RACE: self.CharacterIcon.Hide() self.Box.Hide() # Arat Altına ekle else: if distance < self.EXCHANGE_LIMIT_RANGE: self.RefreshButton() ## else: if app.ENABLE_TARGET_RACE: if chr.GetInstanceType(self.vid) == chr.INSTANCE_TYPE_PLAYER: chImageCode = int(self.GetTargetRace()) if chImageCode != -1: self.CharacterIcon.LoadImage(self.FACE_IMAGE_DICT[chImageCode]) self.CharacterIcon.SetPosition(-50, -5) self.CharacterIcon.Show() self.Box.LoadImage(self.FACE_BOX) self.Box.SetPosition(-50, -5) self.Box.Show() else: self.Box.Hide() self.CharacterIcon.Hide()