public override void OnUse() { base.OnUse(); this.isBoss = false; this.nOutCombatHpRecoveryTick = 0; this.lifeTime = 0; this.BornTime = 0; this.cfgInfo = null; this.originalPos = VInt3.zero; this.originalMeshScale = Vector3.one; this.HostActor = default(PoolObjHandle <ActorRoot>); this.spawnSkillSlot = SkillSlotType.SLOT_SKILL_VALID; this.bCopyedHeroInfo = false; this.DistanceTestCount = 0; this.endurance = 0; this.isEnduranceDown = false; this.Pursuit = null; }
public void DoSpawn(PursuitInfo pursuitInfo) { SpawnPoint.DoSpawn(base.gameObject, (VInt3)base.gameObject.transform.position, (VInt3)base.gameObject.transform.forward, this.bSequentialMeta, this.TheActorsMeta, this.m_rangePolygon, this.m_rangeDeadPoint, pursuitInfo, this.InitBuffDemand, this.InitRandPassSkillRule, ref this.m_spawnedList); IEnumerator enumerator = this.m_spawnPointList.GetEnumerator(); while (enumerator.MoveNext()) { SpawnPoint spawnPoint = enumerator.get_Current() as SpawnPoint; if (spawnPoint) { spawnPoint.DoSpawn(pursuitInfo); } } this.m_spawnPointOver = this.m_spawnPointList.get_Count() + 1; if (this.onAllSpawned != null) { this.onAllSpawned(this); } }
public override void OnUse() { base.OnUse(); this.isBoss = false; this.nOutCombatHpRecoveryTick = 0; this.lifeTime = 0; this.BornTime = 0; this.cfgInfo = null; this.originalPos = VInt3.zero; this.originalMeshScale = Vector3.one; this.HostActor = default(PoolObjHandle <ActorRoot>); this.spawnSkillSlot = SkillSlotType.SLOT_SKILL_VALID; this.bCopyedHeroInfo = false; this.drageToHostWhenTooFarAway = true; this.suicideWhenHostDead = true; this.useHostValueProperty = false; this.DistanceTestCount = 0; this.endurance = 0; this.isEnduranceDown = false; this.Pursuit = null; this.dukeMustUseSkillHpRate = 0; }
public static void DoSpawn(GameObject inGameObj, VInt3 bornPos, VInt3 bornDir, bool bInSeqMeta, ActorMeta[] inActorMetaList, GeoPolygon inPolygon, GameObject inDeadPoint, PursuitInfo pursuitInfo, int[] inBuffDemand, int inRandPassSkillRule, ref List <PoolObjHandle <ActorRoot> > inSpawnedList) { if (inGameObj == null || inActorMetaList == null || inActorMetaList.Length == 0 || inSpawnedList == null) { return; } List <ActorMeta> list = new List <ActorMeta>(); if (bInSeqMeta) { list.AddRange(inActorMetaList); } else if (inActorMetaList.Length > 0) { int nMax = inActorMetaList.Length; int num = (int)FrameRandom.Random((uint)nMax); list.Add(inActorMetaList[num]); } List <ActorMeta> .Enumerator enumerator = list.GetEnumerator(); while (enumerator.MoveNext()) { ActorMeta current = enumerator.get_Current(); if (current.ConfigId > 0 && current.ActorType != ActorTypeDef.Invalid) { PoolObjHandle <ActorRoot> poolObjHandle = default(PoolObjHandle <ActorRoot>); if (!Singleton <GameObjMgr> .GetInstance().TryGetFromCache(ref poolObjHandle, ref current)) { poolObjHandle = Singleton <GameObjMgr> .GetInstance().SpawnActorEx(null, ref current, bornPos, bornDir, false, true); if (poolObjHandle) { poolObjHandle.get_handle().InitActor(); poolObjHandle.get_handle().PrepareFight(); Singleton <GameObjMgr> .get_instance().AddActor(poolObjHandle); poolObjHandle.get_handle().StartFight(); } } else { poolObjHandle.get_handle().ReactiveActor(bornPos, bornDir); } if (poolObjHandle) { poolObjHandle.get_handle().ObjLinker.Invincible = current.Invincible; poolObjHandle.get_handle().ObjLinker.CanMovable = !current.NotMovable; poolObjHandle.get_handle().BornPos = bornPos; if (inPolygon != null && inDeadPoint != null) { poolObjHandle.get_handle().ActorControl.m_rangePolygon = inPolygon; poolObjHandle.get_handle().ActorControl.m_deadPointGo = inDeadPoint; } if (pursuitInfo != null && pursuitInfo.IsVaild()) { MonsterWrapper monsterWrapper = poolObjHandle.get_handle().ActorControl as MonsterWrapper; if (monsterWrapper != null) { monsterWrapper.Pursuit = pursuitInfo; } } inSpawnedList.Add(poolObjHandle); if (inBuffDemand != null) { for (int i = 0; i < inBuffDemand.Length; i++) { int inBuffID = inBuffDemand[i]; BufConsumer bufConsumer = new BufConsumer(inBuffID, poolObjHandle, poolObjHandle); bufConsumer.Use(); } } if (inRandPassSkillRule > 0 && poolObjHandle.get_handle().SkillControl != null) { poolObjHandle.get_handle().SkillControl.InitRandomSkill(inRandPassSkillRule); } } } } }