public void SetAttackOrganMode(AttackOrganMode _mode) { this.curAttackOrganMode = _mode; if (ActorHelper.IsHostCtrlActor(ref this.Captain) && this.useOperateMode == OperateMode.DefaultMode) { Singleton <EventRouter> .GetInstance().BroadCastEvent <AttackOrganMode>(EventID.GAME_SETTING_ATTACKORGAN_MODE_CHANGE, _mode); } }
protected uint ExecuteSearchTarget(int srchR, ref bool bSearched) { PoolObjHandle <ActorRoot> poolObjHandle = this.actorPtr; MonsterWrapper monsterWrapper = poolObjHandle.handle.ActorControl as MonsterWrapper; if (monsterWrapper != null && monsterWrapper.isCalledMonster) { poolObjHandle = monsterWrapper.hostActor; } Player ownerPlayer = ActorHelper.GetOwnerPlayer(ref poolObjHandle); if (ownerPlayer == null) { return(0u); } SelectEnemyType attackTargetMode = ownerPlayer.AttackTargetMode; LastHitMode useLastHitMode = ownerPlayer.useLastHitMode; AttackOrganMode curAttackOrganMode = ownerPlayer.curAttackOrganMode; OperateMode operateMode = ownerPlayer.GetOperateMode(); uint result; if (operateMode == OperateMode.LockMode) { result = this.NormalModeCommonAttackSearchTarget(srchR, attackTargetMode, ref bSearched); } else if (this.commonAttackButtonType == CommonAttackButtonType.CommonAttackButton) { if (useLastHitMode == LastHitMode.None && curAttackOrganMode == AttackOrganMode.None) { result = this.NormalModeCommonAttackSearchTarget(srchR, attackTargetMode, ref bSearched); } else { result = this.AdvancedModeCommonAttackSearchTarget(srchR, attackTargetMode, ref bSearched); } } else if (this.commonAttackButtonType == CommonAttackButtonType.LastHitButton) { result = this.LastHitModeSearchTarget(srchR, attackTargetMode, ref bSearched); } else { result = this.AttackOrganModeSearchTarget(srchR, attackTargetMode, ref bSearched); } return(result); }