public override void OnInitProps() { base.OnInitProps(); CurrentTableInfo = GameTable.HeroInfoTableAsset.Lookup(IDInTable); if (CurrentTableInfo == null) { return; } if (0 == Props.GetProperty_Int32(ENProperty.vocationid)) { Props.SetProperty_Int32(ENProperty.vocationid, 1); } //显示玩家名称 AddPlayerName(); HP = CurrentTableInfo.FHPMax; MaxHP = CurrentTableInfo.FHPMax; MoveSpeed = CurrentTableInfo.MoveSpeed; MovebackSpeed = CurrentTableInfo.MovebackSpeed; AnimationSpeed = CurrentTableInfo.AnimationSpeed; AttackAnimSpeed = 1; Props.SetProperty_Int32(ENProperty.islive, 1); Props.SetProperty_Float(ENProperty.phyattack, (int)CurrentTableInfo.FPhyAttack); Props.SetProperty_Float(ENProperty.phydefend, (int)CurrentTableInfo.FPhyDefend); Props.SetProperty_Float(ENProperty.magattack, (int)CurrentTableInfo.FMagAttack); Props.SetProperty_Float(ENProperty.magdefend, (int)CurrentTableInfo.FMagDefend); Props.SetProperty_Float(ENProperty.avoid, (int)CurrentTableInfo.FAvoid); Props.SetProperty_Float(ENProperty.hit, (int)CurrentTableInfo.HitRate); Props.SetProperty_Float(ENProperty.crit, (int)CurrentTableInfo.CritRate); Props.SetProperty_Float(ENProperty.critParam, (int)CurrentTableInfo.CritParam); Props.SetProperty_Float(ENProperty.stamina, (float)CurrentTableInfo.StaminaMax); Props.SetProperty_Float(ENProperty.maxStamina, (float)CurrentTableInfo.StaminaMax); Props.SetProperty_Float(ENProperty.FResist, (float)CurrentTableInfo.FResist); Props.SetProperty_Float(ENProperty.AnitInterfere, (float)CurrentTableInfo.AnitInterfereRate); Props.SetProperty_Float(ENProperty.AnitInterrupt, (float)CurrentTableInfo.AnitInterruptRate); Props.SetProperty_Float(ENProperty.AnitRepel, (float)CurrentTableInfo.AnitRepelRate); Props.SetProperty_Float(ENProperty.AnitLauncher, (float)CurrentTableInfo.AnitLauncherRate); Props.SetProperty_Float(ENProperty.WoundParam, CurrentTableInfo.WoundParam); Props.SetProperty_Int32(ENProperty.WeaponID, CurrentTableInfo.WeaponId); Props.SetProperty_Float(ENProperty.ModelScale, CurrentTableInfo.ModelScale); CSItem card = CardBag.Singleton.GetCardByGuid(GUID); if (card == null) { if (Type == ActorType.enFollow) { card = Team.Singleton.Comrade; } } if (card != null) { MaxHP = card.GetHp(); HP = MaxHP; Level = card.Level; Props.SetProperty_Float(ENProperty.phyattack, card.GetPhyAttack()); Props.SetProperty_Float(ENProperty.magattack, card.GetMagAttack()); Props.SetProperty_Float(ENProperty.phydefend, card.GetPhyDefend()); Props.SetProperty_Float(ENProperty.magdefend, card.GetMagDefend()); PropertyCustomValue value = Props.GetProperty_Custom(ENProperty.SkillIDList); if (value == null) { Debug.LogWarning("ENProperty.SkillIDList is null"); return; } PropertyValueIntListView skillIDList = value as PropertyValueIntListView; if (skillIDList == null) { Debug.LogWarning("ENProperty.SkillIDList cast fail"); return; } for (int i = 0; i < card.SkillItemInfoList.Length; ++i) { skillIDList.m_list[i] = card.SkillItemInfoList[i].m_skillID; } Props.SetProperty_Custom(ENProperty.SkillIDList, skillIDList); } }