private void DirectLearnTalentCommand(PoolObjHandle <ActorRoot> hero, uint talentID, sbyte talentLevelIndex) { FrameCommand <LearnTalentCommand> cmd = FrameCommandFactory.CreateFrameCommand <LearnTalentCommand>(); Player ownerPlayer = ActorHelper.GetOwnerPlayer(ref hero); cmd.playerID = ownerPlayer.PlayerId; cmd.cmdData.TalentLevelIndex = talentLevelIndex; cmd.cmdData.TalentID = talentID; cmd.cmdData.HeroObjID = hero.handle.ObjID; hero.handle.ActorControl.CmdCommonLearnTalent(cmd); }
public void Validate(HeroKDA kdaData) { if (kdaData != null) { this.kdaData = kdaData; } if (this.kdaData != null) { this.icon.SetSprite(string.Format("{0}{1}", CUIUtility.s_Sprite_Dynamic_Icon_Dir, CSkinInfo.GetHeroSkinPic((uint)this.kdaData.HeroId, 0)), Singleton <CBattleSystem> .instance.FormScript, true, false, false); Player ownerPlayer = ActorHelper.GetOwnerPlayer(ref this.kdaData.actorHero); this.playerName.text = ownerPlayer.Name; this.heroName.text = this.kdaData.actorHero.handle.TheStaticData.TheResInfo.Name; this.level.text = this.kdaData.actorHero.handle.ValueComponent.actorSoulLevel.ToString(); this.killNum.text = this.kdaData.numKill.ToString(); this.deadNum.text = this.kdaData.numDead.ToString(); this.killMon.text = (this.kdaData.numKillMonster + this.kdaData.numKillSoldier).ToString(); this.killMon.text = this.kdaData.TotalCoin.ToString(); this.assistNum.text = this.kdaData.numAssist.ToString(); int num = 0; for (int i = 0; i < 6; i++) { ushort equipID = this.kdaData.Equips[i].m_equipID; if (equipID != 0) { CUICommonSystem.SetEquipIcon(equipID, this.equipList[num++].gameObject, Singleton <CBattleSystem> .instance.FormScript); } } for (int j = num; j < 6; j++) { this.equipList[j].gameObject.GetComponent <Image>().SetSprite(string.Format("{0}EquipmentSpace", CUIUtility.s_Sprite_Dynamic_Talent_Dir), Singleton <CBattleSystem> .instance.FormScript, true, false, false); } if (ownerPlayer == Singleton <GamePlayerCenter> .GetInstance().GetHostPlayer()) { this.playerName.color = CUIUtility.s_Text_Color_Self; this.mineBg.CustomSetActive(true); } else { if (ownerPlayer.PlayerCamp == COM_PLAYERCAMP.COM_PLAYERCAMP_1) { this.playerName.color = CUIUtility.s_Text_Color_Camp_1; } else { this.playerName.color = CUIUtility.s_Text_Color_Camp_2; } this.mineBg.CustomSetActive(false); } } }
public void Validate(HeroKDA kdaData) { if (kdaData != null) { this.kdaData = kdaData; } if (this.kdaData == null) { return; } this.icon.SetSprite(string.Format("{0}{1}", CUIUtility.s_Sprite_Dynamic_Icon_Dir, CSkinInfo.GetHeroSkinPic((uint)this.kdaData.HeroId, 0u)), Singleton <CBattleSystem> .get_instance().FormScript, true, false, false, false); Player ownerPlayer = ActorHelper.GetOwnerPlayer(ref this.kdaData.actorHero); this.playerName.text = ownerPlayer.Name; this.heroName.text = this.kdaData.actorHero.get_handle().TheStaticData.TheResInfo.Name; this.level.text = this.kdaData.actorHero.get_handle().ValueComponent.actorSoulLevel.ToString(); this.killNum.text = this.kdaData.numKill.ToString(); this.deadNum.text = this.kdaData.numDead.ToString(); this.killMon.text = (this.kdaData.numKillMonster + this.kdaData.numKillSoldier).ToString(); this.killMon.text = this.kdaData.TotalCoin.ToString(); this.assistNum.text = this.kdaData.numAssist.ToString(); int num = 0; for (int i = 0; i < 6; i++) { ushort equipID = this.kdaData.Equips[i].m_equipID; if (equipID != 0) { CUICommonSystem.SetEquipIcon(equipID, this.equipList[num++].gameObject, Singleton <CBattleSystem> .get_instance().FormScript); } } for (int j = num; j < 6; j++) { this.equipList[j].gameObject.GetComponent <Image>().SetSprite(string.Format("{0}BattleSettle_EquipmentSpaceNew", CUIUtility.s_Sprite_Dynamic_Talent_Dir), Singleton <CBattleSystem> .get_instance().FormScript, true, false, false, false); } SLevelContext curLvelContext = Singleton <BattleLogic> .GetInstance().GetCurLvelContext(); if (curLvelContext != null && curLvelContext.m_bEnableOrnamentSlot && curLvelContext.m_bEnableShopHorizonTab) { ushort horizonEquipId = this.kdaData.actorHero.get_handle().EquipComponent.m_horizonEquipId; if (horizonEquipId == 0) { this.horizonEquipImg.SetSprite(string.Format("{0}BattleSettle_EquipmentSpaceNew", CUIUtility.s_Sprite_Dynamic_Talent_Dir), Singleton <CBattleSystem> .get_instance().FormScript, true, false, false, false); } else { CUICommonSystem.SetEquipIcon(horizonEquipId, this.horizonEquipImg.gameObject, Singleton <CBattleSystem> .get_instance().FormScript); } } if (ownerPlayer == Singleton <GamePlayerCenter> .GetInstance().GetHostPlayer()) { this.playerName.color = CUIUtility.s_Text_Color_Self; this.mineBg.CustomSetActive(true); } else { if (ownerPlayer.PlayerCamp == 1) { this.playerName.color = CUIUtility.s_Text_Color_Camp_1; } else { this.playerName.color = CUIUtility.s_Text_Color_Camp_2; } this.mineBg.CustomSetActive(false); } }