|
沙发
楼主 |
发表于 2018-8-6 16:07:13
|
只看该作者
/**
* @filename BattleOrders.js
* @author kolton
* @desc give or receive Battle Orders buff
*/
function BattleOrders() {
this.giveBO = function (list) {
var i, unit,
failTimer = 60,
tick = getTickCount();
for (i = 0; i < list.length; i += 1) {
unit = getUnit(0, list);
if (unit) {
while (!unit.getState(32) && copyUnit(unit).x) {
if (getTickCount() - tick >= failTimer * 1000) {
showConsole();
print("c1BO timeout fail.");
qiut();
}
Precast.doPrecast(true);
delay(1000);
}
}
}
return true;
};
我直接把qiut去掉可以不 |
|