private string GetMeshName(ref PoolObjHandle <ActorRoot> actor) { ActorMeta actorMeta = default(ActorMeta); ActorMeta actorMeta2 = actorMeta; actorMeta2.ConfigId = actor.handle.TheActorMeta.ConfigId; actorMeta2.ActorCamp = actor.handle.TheActorMeta.ActorCamp; actorMeta2.PlayerId = actor.handle.TheActorMeta.PlayerId; actorMeta = actorMeta2; ActorStaticData actorStaticData = default(ActorStaticData); IGameActorDataProvider actorDataProvider = Singleton <ActorDataCenter> .instance.GetActorDataProvider(GameActorDataProviderType.StaticBattleDataProvider); actorDataProvider.GetActorStaticData(ref actorMeta, ref actorStaticData); if (!string.IsNullOrEmpty(actorStaticData.TheResInfo.ResPath)) { CActorInfo actorInfo = CActorInfo.GetActorInfo(actorStaticData.TheResInfo.ResPath, enResourceType.BattleScene); if (actorInfo != null) { string artPrefabName = actorInfo.GetArtPrefabName((int)actorMeta.SkinID, -1); if (!string.IsNullOrEmpty(artPrefabName)) { return(artPrefabName); } } } return(string.Empty); }
private void AddActionsFromSoldier(DictionaryView <string, Action> actions, uint soldierID) { ResMonsterCfgInfo dataCfgInfoByCurLevelDiff = MonsterDataHelper.GetDataCfgInfoByCurLevelDiff((int)soldierID); if (dataCfgInfoByCurLevelDiff == null) { return; } string path = StringHelper.UTF8BytesToString(ref dataCfgInfoByCurLevelDiff.szCharacterInfo); CActorInfo actorInfo = CActorInfo.GetActorInfo(path, enResourceType.BattleScene); if (actorInfo == null) { return; } this.AddBehaviorTree(actorInfo); string artPrefabName = actorInfo.GetArtPrefabName(0, -1); if (!this.prefabDict.ContainsKey(artPrefabName)) { this.prefabDict.Add(artPrefabName, false); } if (dataCfgInfoByCurLevelDiff.SkillIDs != null && dataCfgInfoByCurLevelDiff.SkillIDs.Length > 0) { for (int i = 0; i < dataCfgInfoByCurLevelDiff.SkillIDs.Length; i++) { int skillID = dataCfgInfoByCurLevelDiff.SkillIDs[i]; this.AddActionsFromSkill(actions, skillID); } } }
public void AddPreloadActor(ref List <ActorPreloadTab> list, ref ActorMeta actorMeta, float spawnCnt, int ownerSkinID = 0) { for (int i = 0; i < list.Count; i++) { ActorPreloadTab tab = list[i]; if (tab.theActor.ConfigId != actorMeta.ConfigId) { continue; } if (actorMeta.ActorType == ActorTypeDef.Actor_Type_Hero) { if (this.GetActorMarkID(actorMeta) == tab.MarkID) { goto Label_0085; } continue; } if ((actorMeta.ActorType == ActorTypeDef.Actor_Type_Monster) && (spawnCnt > 0f)) { tab.spawnCnt += spawnCnt; list[i] = tab; } Label_0085: retCnt++; return; } ActorStaticData actorData = new ActorStaticData(); IGameActorDataProvider actorDataProvider = Singleton <ActorDataCenter> .instance.GetActorDataProvider(GameActorDataProviderType.StaticBattleDataProvider); actorDataProvider.GetActorStaticData(ref actorMeta, ref actorData); ActorServerData data2 = new ActorServerData(); Singleton <ActorDataCenter> .instance.GetActorDataProvider(GameActorDataProviderType.ServerDataProvider).GetActorServerData(ref actorMeta, ref data2); CActorInfo actorInfo = CActorInfo.GetActorInfo(actorData.TheResInfo.ResPath, enResourceType.BattleScene); if (actorInfo != null) { ActorPreloadTab loadInfo = new ActorPreloadTab { theActor = actorMeta }; loadInfo.modelPrefab.assetPath = actorInfo.GetArtPrefabName((ownerSkinID == 0) ? ((int)data2.SkinId) : ownerSkinID, -1); loadInfo.modelPrefab.nInstantiate = 1; loadInfo.spawnCnt = spawnCnt; loadInfo.MarkID = this.GetActorMarkID(actorMeta); loadInfo.ageActions = new List <AssetLoadBase>(); loadInfo.parPrefabs = new List <AssetLoadBase>(); loadInfo.mesPrefabs = new List <AssetLoadBase>(); loadInfo.spritePrefabs = new List <AssetLoadBase>(); loadInfo.soundBanks = new List <AssetLoadBase>(); loadInfo.behaviorXml = new List <AssetLoadBase>(); ActorStaticSkillData skillData = new ActorStaticSkillData(); for (int j = 0; j < 7; j++) { actorDataProvider.GetActorStaticSkillData(ref actorMeta, (ActorSkillSlot)j, ref skillData); if (skillData.SkillId != 0) { this.AnalyseSkill(ref loadInfo, skillData.SkillId); this.AnalysePassiveSkill(ref loadInfo, skillData.PassiveSkillId); } } if (actorMeta.ActorType == ActorTypeDef.Actor_Type_Hero) { ResTalentHero dataByKey = GameDataMgr.talentHero.GetDataByKey((uint)actorMeta.ConfigId); if (dataByKey != null) { this.AnalyseHeroTalent(ref loadInfo, dataByKey); } } else if (actorMeta.ActorType == ActorTypeDef.Actor_Type_Monster) { ActorStaticData data4 = new ActorStaticData(); Singleton <ActorDataCenter> .instance.GetActorDataProvider(GameActorDataProviderType.StaticBattleDataProvider).GetActorStaticData(ref actorMeta, ref data4); int randomPassiveSkillRule = data4.TheBaseAttribute.RandomPassiveSkillRule; if ((randomPassiveSkillRule > 0) && !this.randomSkillCheckerSet.ContainsKey(randomPassiveSkillRule)) { this.randomSkillCheckerSet.Add(randomPassiveSkillRule, true); ResRandomSkillPassiveRule rule = GameDataMgr.randomSkillPassiveDatabin.GetDataByKey(randomPassiveSkillRule); if ((rule.astRandomSkillPassiveID1 != null) && (rule.astRandomSkillPassiveID1.Length > 0)) { for (int k = 0; k < rule.astRandomSkillPassiveID1.Length; k++) { this.AnalysePassiveSkill(ref loadInfo, rule.astRandomSkillPassiveID1[k].iParam); } } if ((rule.astRandomSkillPassiveID2 != null) && (rule.astRandomSkillPassiveID2.Length > 0)) { for (int m = 0; m < rule.astRandomSkillPassiveID2.Length; m++) { this.AnalysePassiveSkill(ref loadInfo, rule.astRandomSkillPassiveID2[m].iParam); } } } } if (!string.IsNullOrEmpty(actorInfo.deadAgePath)) { AssetLoadBase item = new AssetLoadBase { assetPath = actorInfo.deadAgePath }; loadInfo.ageActions.Add(item); } if (!string.IsNullOrEmpty(actorInfo.BtResourcePath) && !this.behaviorXmlSet.ContainsKey(actorInfo.BtResourcePath)) { AssetLoadBase base3 = new AssetLoadBase { assetPath = actorInfo.BtResourcePath }; loadInfo.behaviorXml.Add(base3); this.behaviorXmlSet.Add(actorInfo.BtResourcePath, true); } loadInfo.soundBanks = new List <AssetLoadBase>(); this.AnalyseSoundBanks(ref loadInfo, ref actorInfo, ref data2); list.Add(loadInfo); if (actorMeta.ActorType == ActorTypeDef.Actor_Type_Hero) { this.CheckCallMonsterSkill(actorInfo, ref list, ref actorMeta, (int)data2.SkinId); } } }
private void EnterSpawnEye(Action _action, Track _track) { if (this.bUseSkin) { string resourceName = SkinResourceHelper.GetResourceName(_action, this.prefabName, this.bUseSkinAdvance); } else { string resourceName = this.prefabName; } VInt3 vInt = VInt3.zero; VInt3 forward = VInt3.forward; SkillUseContext refParamObject = _action.refParams.GetRefParamObject <SkillUseContext>("SkillContext"); COM_PLAYERCAMP cOM_PLAYERCAMP = (refParamObject == null || !refParamObject.Originator) ? 0 : refParamObject.Originator.get_handle().TheActorMeta.ActorCamp; GameObject gameObject = _action.GetGameObject(this.parentId); PoolObjHandle <ActorRoot> actorHandle = _action.GetActorHandle(this.parentId); PoolObjHandle <ActorRoot> actorHandle2 = _action.GetActorHandle(this.objectSpaceId); if (actorHandle2) { ActorRoot handle = actorHandle2.get_handle(); if (this.superTranslation) { VInt3 zero = VInt3.zero; _action.refParams.GetRefParam("_BulletPos", ref zero); vInt = IntMath.Transform(zero, handle.forward, handle.location); } else if (this.modifyTranslation) { vInt = IntMath.Transform(this.translation, handle.forward, handle.location); } if (this.modifyDirection) { forward = actorHandle2.get_handle().forward; } } else if (this.bTargetPosition) { vInt = this.translation + this.targetPosition; if (this.modifyDirection && refParamObject != null && refParamObject.Originator) { forward = refParamObject.Originator.get_handle().forward; } } else { if (this.modifyTranslation) { vInt = this.translation; } if (this.modifyDirection && this.direction.x != 0 && this.direction.y != 0) { forward = this.direction; forward.NormalizeTo(1000); } } if (this.targetId >= 0) { _action.ExpandGameObject(this.targetId); GameObject gameObject2 = _action.GetGameObject(this.targetId); if (this.recreateExisting && gameObject2 != null) { if (this.applyActionSpeedToAnimation) { _action.RemoveTempObject(Action.PlaySpeedAffectedType.ePSAT_Anim, gameObject2); } if (this.applyActionSpeedToParticle) { _action.RemoveTempObject(Action.PlaySpeedAffectedType.ePSAT_Fx, gameObject2); } ActorHelper.DetachActorRoot(gameObject2); ActionManager.DestroyGameObject(gameObject2); _action.SetGameObject(this.targetId, null); } GameObject gameObject3 = null; if (!(gameObject2 == null)) { return; } ActorStaticData actorStaticData = default(ActorStaticData); IGameActorDataProvider actorDataProvider = Singleton <ActorDataCenter> .get_instance().GetActorDataProvider(GameActorDataProviderType.StaticBattleDataProvider); ActorMeta actorMeta = default(ActorMeta); ActorMeta actorMeta2 = actorMeta; actorMeta2.ActorType = ActorTypeDef.Actor_Type_EYE; actorMeta2.ActorCamp = cOM_PLAYERCAMP; actorMeta2.ConfigId = this.EyeCfgIdByMonster; actorMeta2.EnCId = this.EyeCfgIdByMonster; actorMeta = actorMeta2; actorDataProvider.GetActorStaticData(ref actorMeta, ref actorStaticData); CActorInfo exists = null; if (!string.IsNullOrEmpty(actorStaticData.TheResInfo.ResPath)) { CActorInfo actorInfo = CActorInfo.GetActorInfo(actorStaticData.TheResInfo.ResPath, 0); if (actorInfo != null) { exists = (CActorInfo)Object.Instantiate(actorInfo); } } PoolObjHandle <ActorRoot> poolObjHandle = default(PoolObjHandle <ActorRoot>); if (exists) { if (refParamObject.Originator && !PathfindingUtility.IsValidTarget(refParamObject.Originator.get_handle(), vInt) && !Singleton <GameFowManager> .get_instance().m_pFieldObj.FindNearestNotBrickFromWorldLocNonFow(ref vInt, refParamObject.Originator.get_handle())) { vInt = refParamObject.Originator.get_handle().location; } poolObjHandle = Singleton <GameObjMgr> .get_instance().SpawnActorEx(null, ref actorMeta, vInt, forward, false, true); if (poolObjHandle) { this.actorRoot = poolObjHandle; gameObject3 = poolObjHandle.get_handle().gameObject; poolObjHandle.get_handle().InitActor(); this.CreateEye(); poolObjHandle.get_handle().PrepareFight(); poolObjHandle.get_handle().StartFight(); } } if (!poolObjHandle) { return; } if (!gameObject3) { throw new Exception("Age:SpawnObjectDuration Spawn Exception"); } gameObject3.transform.localScale = Vector3.one; if (GameSettings.DynamicParticleLOD) { bool flag = true; int particleLOD = GameSettings.ParticleLOD; if (refParamObject != null && refParamObject.Originator && refParamObject.Originator.get_handle().TheActorMeta.PlayerId == Singleton <GamePlayerCenter> .GetInstance().GetHostPlayer().PlayerId) { flag = false; } if (!flag && particleLOD > 1) { GameSettings.ParticleLOD = 1; } MonoSingleton <SceneMgr> .GetInstance().m_dynamicLOD = flag; } this.actorRoot.get_handle().location = vInt; this.actorRoot.get_handle().forward = forward; if (this.actorRoot.get_handle().shape != null) { this.actorRoot.get_handle().shape.ConditionalUpdateShape(); } if (this.actorRoot.get_handle().TheActorMeta.ActorType == ActorTypeDef.Actor_Type_EYE) { this.actorRoot.get_handle().TheActorMeta.ConfigId = this.EyeCfgIdByMonster; } if (refParamObject != null) { refParamObject.EffectPos = this.actorRoot.get_handle().location; if (this.actorRoot.get_handle().TheActorMeta.ActorType == ActorTypeDef.Actor_Type_EYE) { DebugHelper.Assert(this.actorRoot.get_handle().TheActorMeta.ActorCamp == cOM_PLAYERCAMP); this.actorRoot.get_handle().TheActorMeta.ActorCamp = cOM_PLAYERCAMP; } } SpawnEyeEventParam spawnEyeEventParam = new SpawnEyeEventParam(refParamObject.Originator, vInt); Singleton <GameSkillEventSys> .GetInstance().SendEvent <SpawnEyeEventParam>(GameSkillEventDef.Event_SpawnEye, refParamObject.Originator, ref spawnEyeEventParam, GameSkillEventChannel.Channel_HostCtrlActor); } }
private void EnterSpawnEye(AGE.Action _action, Track _track) { string prefabName; if (this.bUseSkin) { prefabName = SkinResourceHelper.GetResourceName(_action, this.prefabName, this.bUseSkinAdvance); } else { prefabName = this.prefabName; } VInt3 zero = VInt3.zero; VInt3 forward = VInt3.forward; SkillUseContext refParamObject = _action.refParams.GetRefParamObject <SkillUseContext>("SkillContext"); COM_PLAYERCAMP com_playercamp = ((refParamObject == null) || (refParamObject.Originator == 0)) ? COM_PLAYERCAMP.COM_PLAYERCAMP_MID : refParamObject.Originator.handle.TheActorMeta.ActorCamp; GameObject gameObject = _action.GetGameObject(this.parentId); PoolObjHandle <ActorRoot> actorHandle = _action.GetActorHandle(this.parentId); PoolObjHandle <ActorRoot> handle2 = _action.GetActorHandle(this.objectSpaceId); if (handle2 != 0) { ActorRoot handle = handle2.handle; if (this.superTranslation) { VInt3 num3 = VInt3.zero; _action.refParams.GetRefParam("_BulletPos", ref num3); zero = IntMath.Transform(num3, handle.forward, handle.location); } else if (this.modifyTranslation) { zero = IntMath.Transform(this.translation, handle.forward, handle.location); } if (this.modifyDirection) { forward = handle2.handle.forward; } } else if (this.bTargetPosition) { zero = this.translation + this.targetPosition; if ((this.modifyDirection && (refParamObject != null)) && (refParamObject.Originator != 0)) { forward = refParamObject.Originator.handle.forward; } } else { if (this.modifyTranslation) { zero = this.translation; } if ((this.modifyDirection && (this.direction.x != 0)) && (this.direction.y != 0)) { forward = this.direction; forward.NormalizeTo(0x3e8); } } if (this.targetId >= 0) { _action.ExpandGameObject(this.targetId); GameObject obj3 = _action.GetGameObject(this.targetId); if (this.recreateExisting && (obj3 != null)) { if (this.applyActionSpeedToAnimation) { _action.RemoveTempObject(AGE.Action.PlaySpeedAffectedType.ePSAT_Anim, obj3); } if (this.applyActionSpeedToParticle) { _action.RemoveTempObject(AGE.Action.PlaySpeedAffectedType.ePSAT_Fx, obj3); } ActorHelper.DetachActorRoot(obj3); ActionManager.DestroyGameObject(obj3); _action.SetGameObject(this.targetId, null); } GameObject obj4 = null; if (obj3 == null) { ActorStaticData actorData = new ActorStaticData(); IGameActorDataProvider actorDataProvider = Singleton <ActorDataCenter> .instance.GetActorDataProvider(GameActorDataProviderType.StaticBattleDataProvider); ActorMeta actorMeta = new ActorMeta { ActorType = ActorTypeDef.Actor_Type_EYE, ActorCamp = com_playercamp, ConfigId = this.EyeCfgIdByMonster, EnCId = this.EyeCfgIdByMonster }; actorDataProvider.GetActorStaticData(ref actorMeta, ref actorData); CActorInfo info = null; if (!string.IsNullOrEmpty(actorData.TheResInfo.ResPath)) { CActorInfo actorInfo = CActorInfo.GetActorInfo(actorData.TheResInfo.ResPath, enResourceType.BattleScene); if (actorInfo != null) { info = (CActorInfo)UnityEngine.Object.Instantiate(actorInfo); } } PoolObjHandle <ActorRoot> handle3 = new PoolObjHandle <ActorRoot>(); if (info != null) { if ((refParamObject.Originator != 0) && !PathfindingUtility.IsValidTarget(refParamObject.Originator.handle, zero)) { zero = refParamObject.Originator.handle.location; } handle3 = Singleton <GameObjMgr> .instance.SpawnActorEx(null, ref actorMeta, zero, forward, false, true); if (handle3 != 0) { this.actorRoot = handle3; obj4 = handle3.handle.gameObject; handle3.handle.InitActor(); this.CreateEye(); handle3.handle.PrepareFight(); handle3.handle.StartFight(); } } if (handle3 != 0) { if (obj4 == null) { throw new Exception("Age:SpawnObjectDuration Spawn Exception"); } obj4.transform.localScale = Vector3.one; if (GameSettings.DynamicParticleLOD) { bool flag = true; int particleLOD = GameSettings.ParticleLOD; if (((refParamObject != null) && (refParamObject.Originator != 0)) && (refParamObject.Originator.handle.TheActorMeta.PlayerId == Singleton <GamePlayerCenter> .GetInstance().GetHostPlayer().PlayerId)) { flag = false; } if (!flag && (particleLOD > 1)) { GameSettings.ParticleLOD = 1; } MonoSingleton <SceneMgr> .GetInstance().m_dynamicLOD = flag; } this.actorRoot.handle.location = zero; this.actorRoot.handle.forward = forward; if (this.actorRoot.handle.shape != null) { this.actorRoot.handle.shape.ConditionalUpdateShape(); } if (this.actorRoot.handle.TheActorMeta.ActorType == ActorTypeDef.Actor_Type_EYE) { this.actorRoot.handle.TheActorMeta.ConfigId = this.EyeCfgIdByMonster; } if (refParamObject != null) { refParamObject.EffectPos = this.actorRoot.handle.location; if (this.actorRoot.handle.TheActorMeta.ActorType == ActorTypeDef.Actor_Type_EYE) { DebugHelper.Assert(this.actorRoot.handle.TheActorMeta.ActorCamp == com_playercamp); this.actorRoot.handle.TheActorMeta.ActorCamp = com_playercamp; } } } } } }
public void AddPreloadActor(ref List <ActorPreloadTab> list, ref ActorMeta actorMeta, float spawnCnt, int ownerSkinID = 0) { ActorStaticData inStaticData = default(ActorStaticData); IGameActorDataProvider actorDataProvider = Singleton <ActorDataCenter> .instance.GetActorDataProvider(GameActorDataProviderType.StaticBattleDataProvider); actorDataProvider.GetActorStaticData(ref actorMeta, ref inStaticData); ActorServerData actorServerData = default(ActorServerData); IGameActorDataProvider actorDataProvider2 = Singleton <ActorDataCenter> .instance.GetActorDataProvider(GameActorDataProviderType.ServerDataProvider); actorDataProvider2.GetActorServerData(ref actorMeta, ref actorServerData); CActorInfo actorInfo = CActorInfo.GetActorInfo(inStaticData.TheResInfo.ResPath, enResourceType.BattleScene); if (actorInfo == null) { return; } for (int i = 0; i < list.get_Count(); i++) { ActorPreloadTab actorPreloadTab = list.get_Item(i); if (actorPreloadTab.theActor.ActorType == actorMeta.ActorType && actorPreloadTab.theActor.ConfigId == actorMeta.ConfigId) { if (actorMeta.ActorType == ActorTypeDef.Actor_Type_Hero || actorMeta.ActorType == ActorTypeDef.Actor_Type_Call) { int actorMarkID = this.GetActorMarkID(actorMeta); if (actorMarkID != actorPreloadTab.MarkID) { goto IL_13B; } uint skillID = 0u; if (actorDataProvider2.GetActorServerCommonSkillData(ref actorMeta, out skillID)) { this.AnalyseSkill(ref actorPreloadTab, (int)skillID); } } else if (actorMeta.ActorType == ActorTypeDef.Actor_Type_Monster && spawnCnt > 0f) { actorPreloadTab.spawnCnt += spawnCnt; list.set_Item(i, actorPreloadTab); } LoaderHelper.retCnt++; return; } IL_13B :; } ActorPreloadTab actorPreloadTab2 = new ActorPreloadTab(); actorPreloadTab2.theActor = actorMeta; actorPreloadTab2.modelPrefab.assetPath = actorInfo.GetArtPrefabName((ownerSkinID != 0) ? ownerSkinID : ((int)actorServerData.SkinId), -1); actorPreloadTab2.modelPrefab.nInstantiate = 1; actorPreloadTab2.spawnCnt = spawnCnt; actorPreloadTab2.MarkID = this.GetActorMarkID(actorMeta); actorPreloadTab2.ageActions = new List <AssetLoadBase>(); actorPreloadTab2.parPrefabs = new List <AssetLoadBase>(); actorPreloadTab2.mesPrefabs = new List <AssetLoadBase>(); if (actorServerData.SkinId != 0u) { actorInfo.PreLoadAdvanceSkin(actorPreloadTab2.mesPrefabs, actorServerData.SkinId, -1); } actorPreloadTab2.spritePrefabs = new List <AssetLoadBase>(); actorPreloadTab2.soundBanks = new List <AssetLoadBase>(); actorPreloadTab2.behaviorXml = new List <AssetLoadBase>(); ActorStaticSkillData actorStaticSkillData = default(ActorStaticSkillData); for (int j = 0; j < 8; j++) { actorDataProvider.GetActorStaticSkillData(ref actorMeta, (ActorSkillSlot)j, ref actorStaticSkillData); this.AnalyseSkill(ref actorPreloadTab2, actorStaticSkillData.SkillId); this.AnalysePassiveSkill(ref actorPreloadTab2, actorStaticSkillData.PassiveSkillId); } if (actorMeta.ActorType == ActorTypeDef.Actor_Type_Hero || actorMeta.ActorType == ActorTypeDef.Actor_Type_Call) { int skillID2; int skillID3; int skillID4; int passiveSkillID; this.GetMapSkills(out skillID2, out skillID3, out skillID4, out passiveSkillID); this.AnalyseSkill(ref actorPreloadTab2, skillID2); this.AnalyseSkill(ref actorPreloadTab2, skillID3); this.AnalyseSkill(ref actorPreloadTab2, skillID4); this.AnalysePassiveSkill(ref actorPreloadTab2, passiveSkillID); uint skillID5 = 0u; if (actorDataProvider2.GetActorServerCommonSkillData(ref actorMeta, out skillID5)) { this.AnalyseSkill(ref actorPreloadTab2, (int)skillID5); } this.AnalyseHeroBornAndReviveAge(ref actorPreloadTab2, actorMeta.ConfigId); ResHeroCfgInfo dataByKey = GameDataMgr.heroDatabin.GetDataByKey((uint)actorMeta.ConfigId); if (dataByKey != null) { this.AnalysePassiveSkill(ref actorPreloadTab2, dataByKey.iPassiveID1); this.AnalysePassiveSkill(ref actorPreloadTab2, dataByKey.iPassiveID2); } } else if (actorMeta.ActorType == ActorTypeDef.Actor_Type_Monster) { ActorStaticData actorStaticData = default(ActorStaticData); IGameActorDataProvider actorDataProvider3 = Singleton <ActorDataCenter> .instance.GetActorDataProvider(GameActorDataProviderType.StaticBattleDataProvider); actorDataProvider3.GetActorStaticData(ref actorMeta, ref actorStaticData); int randomPassiveSkillRule = actorStaticData.TheBaseAttribute.RandomPassiveSkillRule; if (randomPassiveSkillRule > 0 && !this.randomSkillCheckerSet.ContainsKey(randomPassiveSkillRule)) { this.randomSkillCheckerSet.Add(randomPassiveSkillRule, true); ResRandomSkillPassiveRule dataByKey2 = GameDataMgr.randomSkillPassiveDatabin.GetDataByKey((long)randomPassiveSkillRule); if (dataByKey2.astRandomSkillPassiveID1 != null && dataByKey2.astRandomSkillPassiveID1.Length > 0) { for (int k = 0; k < dataByKey2.astRandomSkillPassiveID1.Length; k++) { this.AnalysePassiveSkill(ref actorPreloadTab2, dataByKey2.astRandomSkillPassiveID1[k].iParam); } } if (dataByKey2.astRandomSkillPassiveID2 != null && dataByKey2.astRandomSkillPassiveID2.Length > 0) { for (int l = 0; l < dataByKey2.astRandomSkillPassiveID2.Length; l++) { this.AnalysePassiveSkill(ref actorPreloadTab2, dataByKey2.astRandomSkillPassiveID2[l].iParam); } } } ResMonsterCfgInfo dataCfgInfoByCurLevelDiff = MonsterDataHelper.GetDataCfgInfoByCurLevelDiff(actorMeta.ConfigId); if (dataCfgInfoByCurLevelDiff != null && dataCfgInfoByCurLevelDiff.iBufDropID != 0 && dataCfgInfoByCurLevelDiff.iBufDropRate > 0) { ShenFuSystem.PreLoadShenfuResource(dataCfgInfoByCurLevelDiff.iBufDropID, ref actorPreloadTab2, this); } if (actorStaticData.TheMonsterOnlyInfo.SoldierType == 8 && dataCfgInfoByCurLevelDiff != null) { ListView <Assets.Scripts.GameLogic.SoldierWave> listView = new ListView <Assets.Scripts.GameLogic.SoldierWave>(); int iKillByCamp1ChangeSoldierWave = dataCfgInfoByCurLevelDiff.iKillByCamp1ChangeSoldierWave; int iKillByCamp2ChangeSoldierWave = dataCfgInfoByCurLevelDiff.iKillByCamp2ChangeSoldierWave; listView.AddRange(SoldierRegion.GetWavesForPreLoad(iKillByCamp1ChangeSoldierWave)); listView.AddRange(SoldierRegion.GetWavesForPreLoad(iKillByCamp2ChangeSoldierWave)); for (int m = 0; m < listView.Count; m++) { Assets.Scripts.GameLogic.SoldierWave soldierWave = listView[m]; if (soldierWave != null && soldierWave.WaveInfo != null && soldierWave.WaveInfo.astNormalSoldierInfo != null && soldierWave.WaveInfo.astNormalSoldierInfo.Length > 0) { for (int n = 0; n < soldierWave.WaveInfo.astNormalSoldierInfo.Length; n++) { ResSoldierTypeInfo resSoldierTypeInfo = soldierWave.WaveInfo.astNormalSoldierInfo[n]; if (resSoldierTypeInfo.dwSoldierID == 0u) { break; } ActorMeta actorMeta2 = default(ActorMeta); ActorMeta actorMeta3 = actorMeta2; actorMeta3.ActorType = ActorTypeDef.Actor_Type_Monster; actorMeta3.ConfigId = (int)resSoldierTypeInfo.dwSoldierID; actorMeta2 = actorMeta3; this.AddPreloadActor(ref list, ref actorMeta2, resSoldierTypeInfo.dwSoldierNum * 2f, 0); } } } } } if (!string.IsNullOrEmpty(actorInfo.deadAgePath)) { actorPreloadTab2.ageActions.Add(new AssetLoadBase { assetPath = actorInfo.deadAgePath }); } if (!string.IsNullOrEmpty(actorInfo.BtResourcePath) && !this.behaviorXmlSet.ContainsKey(actorInfo.BtResourcePath)) { actorPreloadTab2.behaviorXml.Add(new AssetLoadBase { assetPath = actorInfo.BtResourcePath }); this.behaviorXmlSet.Add(actorInfo.BtResourcePath, true); } actorPreloadTab2.soundBanks = new List <AssetLoadBase>(); this.AnalyseSoundBanks(ref actorPreloadTab2, ref actorInfo, ref actorServerData); list.Add(actorPreloadTab2); if (actorMeta.ActorType == ActorTypeDef.Actor_Type_Hero) { this.CheckCallMonsterSkill(actorInfo, ref list, ref actorMeta, (int)actorServerData.SkinId); } else if (actorMeta.ActorType == ActorTypeDef.Actor_Type_Organ) { this.CheckOrganSoldierWave(ref list, ref actorMeta, inStaticData); } }