public override void UpdateLogic(int delta) { this.actor.ActorAgent.UpdateLogic(delta); base.UpdateLogic(delta); if (base.IsBornState) { this.UpdateBornLogic(delta); } else { if (this.isEnduranceDown) { this.endurance -= delta; if (this.endurance < 0) { this.endurance = 0; } } if (this.lifeTime > 0) { this.lifeTime -= delta; if (this.lifeTime <= 0) { base.SetObjBehaviMode(ObjBehaviMode.State_Dead); } } if (this.actorSubSoliderType == 8 && this.myBehavior == ObjBehaviMode.State_AutoAI && !this.actor.SkillControl.isUsing) { List <PoolObjHandle <ActorRoot> > heroActors = Singleton <GameObjMgr> .get_instance().HeroActors; Vector3 vec = this.actor.forward.get_vec3(); long num = (long)this.cfgInfo.iPursuitR; num *= num; bool flag = false; int count = heroActors.get_Count(); for (int i = 0; i < count; i++) { VInt3 location = heroActors.get_Item(i).get_handle().location; VInt3 vInt = location - this.actor.location; Vector3 vec2 = vInt.get_vec3(); long sqrMagnitudeLong2D = vInt.get_sqrMagnitudeLong2D(); if (sqrMagnitudeLong2D < this.BaronPretectDistance || (sqrMagnitudeLong2D < num && Vector3.Dot(vec, vec2) > 0f)) { flag = true; break; } } if (!flag) { base.SetObjBehaviMode(ObjBehaviMode.State_Idle); } } if (this.actor.ActorControl.IsDeadState || this.myBehavior != ObjBehaviMode.State_Idle) { this.nOutCombatHpRecoveryTick = 0; } else { this.nOutCombatHpRecoveryTick += delta; if (this.nOutCombatHpRecoveryTick >= 1000) { int nAddHp = this.cfgInfo.iOutCombatHPAdd * this.actor.ValueComponent.mActorValue[5].totalValue / 10000; base.ReviveHp(nAddHp); this.nOutCombatHpRecoveryTick -= 1000; } } if (this.isCalledMonster) { this.OnCheckDistance(0); } } }