|
发表于 2015-10-5 19:53:55
|
显示全部楼层
- function FHGetRangeRadianHPUnit_NoLessThan(jl,Degrees,HPlevel,spellName)
- --jl 范围,距离
- --Degrees 面向角度
- --HPlevel 血量
- --spellName 技能
- for i = 1, #FHenemiesTable do
- local thisUnit = FHenemiesTable[i].unit
- if FHObjectDistance("player",thisUnit) < jl
- and FHgetFacing(thisUnit,Degrees) == true
- and FHINSight(thisUnit) == true then
- local name, rank, icon, castTime, minRange, maxRange, spellId = GetSpellInfo(spellName)
- local UnitHPLevel = UnitHealth(thisUnit)/UnitHealthMax(thisUnit)*100
- local UnitHPLevel2 = UnitHealth("target")/UnitHealthMax("target")*100
- local Facing = ObjectFacing("player");
- local Oldtaget = UnitGUID("target");
- if amLongTimeCCed(thisUnit) == false
- and UnitAffectingCombat(thisUnit) == true
- and UnitHPLevel >= HPlevel --生命值大于等于设置值
- and not UnitIsUnit("target",thisUnit)
- and not UnitIsDeadOrGhost(thisUnit)
- and amSpellCooldown(spellId) == 0
- and amcd
- and UnitHPLevel2 > HPlevel then
- AutoFaceTarget2(thisUnit);
- amrun(spellName,thisUnit);
- return true;
- end
- end
- end
- return false;
- end
复制代码
|
|