public override void OnSkill(ITriggerDoActionParam param)
        {
            TriggerParamSkillControl triggerParamSkillControl = param as TriggerParamSkillControl;

            if (!this.self.CanManualControl())
            {
                return;
            }
            Skill     skillOrAttackById = this.self.getSkillOrAttackById(triggerParamSkillControl.SkillID);
            Units     selectedTarget    = PlayerControlMgr.Instance.GetSelectedTarget();
            Units     units             = null;
            TargetTag targetTag         = skillOrAttackById.data.targetTag;

            if (!skillOrAttackById.NeedCustomTargetInCrazy())
            {
                if (selectedTarget == null || skillOrAttackById.NeedAutoLaunchToHero())
                {
                    if (selectedTarget == null && skillOrAttackById.skillIndex == 4 && units == null && targetTag == TargetTag.HeroAndMonster)
                    {
                        units = this.self;
                    }
                    else
                    {
                        units = FindTargetHelper.FindAutoSkillTarget(this.self, this.self.trans.position, TargetTag.Hero, (this.self.atk_type != 1) ? (base.GetSkillRange(skillOrAttackById) + 3f) : 6.5f, skillOrAttackById.data.targetCamp, null);
                    }
                }
                if (units == null)
                {
                    units = selectedTarget;
                }
                if (!skillOrAttackById.data.needTarget && skillOrAttackById.data.isMoveSkill)
                {
                    units = null;
                }
                else if (((units == null || units.isHero) && targetTag == TargetTag.CreepsAndMinions) || targetTag == TargetTag.Monster || targetTag == TargetTag.Minions || targetTag == TargetTag.Creeps)
                {
                    units = FindTargetHelper.FindAutoSkillTarget(this.self, this.self.trans.position, targetTag, (this.self.atk_type != 1) ? (base.GetSkillRange(skillOrAttackById) + 3f) : 6.5f, SkillTargetCamp.None, null);
                }
                else if (units == null && targetTag == TargetTag.HeroAndMonster)
                {
                    units = FindTargetHelper.FindAutoSkillTarget(this.self, this.self.trans.position, targetTag, (this.self.atk_type != 1) ? (base.GetSkillRange(skillOrAttackById) + 3f) : 6.5f, skillOrAttackById.data.targetCamp, skillOrAttackById);
                }
            }
            else
            {
                units = skillOrAttackById.CustomTargetInCrazy();
            }
            if (skillOrAttackById.needTarget)
            {
                units = base.GetSkillTarget(skillOrAttackById, units, true);
                if (units != null && !units.CanBeSelected)
                {
                    units = null;
                }
                units = skillOrAttackById.ReselectTarget(units, true);
                if (units != null)
                {
                    this.DisableAIAutoAttackMove();
                    this.targetCom.ClearMoveFlag();
                    if (units != null)
                    {
                        this.self.mCmdCacheController.EnqueueSkillCmd(triggerParamSkillControl.SkillID, units.mTransform.position, units, true, true);
                    }
                }
                else
                {
                    Singleton <SkillView> .Instance.ShowSkillWarn("需要指定一个有效目标!");

                    Singleton <TriggerManager> .Instance.SendUnitSkillStateEvent(UnitEvent.UnitSkillCmdCrazyPointer, this.self, skillOrAttackById);
                }
            }
            else
            {
                if (units != null && !units.CanBeSelected)
                {
                    units = null;
                }
                if (units == this.self)
                {
                    units = null;
                }
                Vector3 vector = this.self.mTransform.forward;
                if (units != null)
                {
                    vector = units.mTransform.position;
                    if (Vector3.Distance(vector, this.self.mTransform.position) > skillOrAttackById.distance + 3f)
                    {
                        Vector3 a = vector - this.self.mTransform.position;
                        a.Normalize();
                        vector = this.self.mTransform.position + a * skillOrAttackById.distance;
                    }
                }
                else
                {
                    vector.Normalize();
                    if (skillOrAttackById.distance == 0f)
                    {
                        vector = this.self.mTransform.position + vector;
                    }
                    else
                    {
                        vector = this.self.mTransform.position + vector * skillOrAttackById.distance;
                    }
                }
                if (skillOrAttackById.NeedResetTargetPos())
                {
                    vector = skillOrAttackById.GetExtraTargetPos(units, vector, true);
                }
                this.DisableAIAutoAttackMove();
                this.targetCom.ClearMoveFlag();
                this.self.mCmdCacheController.EnqueueSkillCmd(triggerParamSkillControl.SkillID, vector, units, true, true);
            }
        }
        public override void OnSkill(ITriggerDoActionParam param)
        {
            TriggerParamSkillControl triggerParamSkillControl = param as TriggerParamSkillControl;
            Skill     skillOrAttackById = this.self.getSkillOrAttackById(triggerParamSkillControl.SkillID);
            Units     selectedTarget    = PlayerControlMgr.Instance.GetSelectedTarget();
            Units     units             = null;
            TargetTag targetTag         = skillOrAttackById.data.targetTag;

            if (selectedTarget == null || skillOrAttackById.NeedAutoLaunchToHero())
            {
                if (selectedTarget == null && skillOrAttackById.skillIndex == 4 && units == null && targetTag == TargetTag.HeroAndMonster)
                {
                    units = this.self;
                }
                else
                {
                    units = FindTargetHelper.FindAutoSkillTarget(this.self, this.self.trans.position, TargetTag.Hero, (this.self.atk_type != 1) ? (base.GetSkillRange(skillOrAttackById) + 3f) : 6.5f, skillOrAttackById.data.targetCamp, null);
                }
            }
            if (units == null)
            {
                units = selectedTarget;
            }
            if (!skillOrAttackById.data.needTarget && skillOrAttackById.data.isMoveSkill)
            {
                units = null;
            }
            else if (((units == null || units.isHero) && targetTag == TargetTag.CreepsAndMinions) || targetTag == TargetTag.Monster || targetTag == TargetTag.Minions || targetTag == TargetTag.Creeps)
            {
                units = FindTargetHelper.FindAutoSkillTarget(this.self, this.self.trans.position, targetTag, (this.self.atk_type != 1) ? (base.GetSkillRange(skillOrAttackById) + 3f) : 6.5f, skillOrAttackById.data.targetCamp, null);
            }
            else if (units == null && targetTag == TargetTag.HeroAndMonster)
            {
                units = FindTargetHelper.FindAutoSkillTarget(this.self, this.self.trans.position, targetTag, (this.self.atk_type != 1) ? (base.GetSkillRange(skillOrAttackById) + 3f) : 6.5f, skillOrAttackById.data.targetCamp, skillOrAttackById);
            }
            this.targetCom.ClearMoveFlag();
            if (!this.self.CanManualControl())
            {
                return;
            }
            if (this.self.IsSkillCanTriggerBornPowerObj(triggerParamSkillControl.SkillID))
            {
                this.ClearReadySkill();
                this.LaunchSkill(skillOrAttackById, units, true);
                return;
            }
            if (!this.DoseSkillNeedDoubleClick(skillOrAttackById))
            {
                this.ClearReadySkill();
                this.LaunchSkill(skillOrAttackById, units, true);
                return;
            }
            if (skillOrAttackById == this.readySkill)
            {
                if (this.ReadySkillOld())
                {
                    this.readyTm = Time.realtimeSinceStartup;
                    this.ClearReadySkill();
                }
                else
                {
                    this.ClearReadySkill();
                    this.LaunchSkill(skillOrAttackById, units, true);
                }
                return;
            }
            if (this.readySkill == null && this.lastReadySkill == skillOrAttackById && Time.realtimeSinceStartup - this.readyTm < 0.5f)
            {
                this.ClearReadySkill();
                this.LaunchSkill(skillOrAttackById, units, true);
                return;
            }
            this.SetReadySkill(skillOrAttackById, units);
        }