cast time strategy & relieve memory leak

This commit is contained in:
Yunfan Li
2023-10-13 23:29:48 +08:00
parent 687aba146a
commit 5d3ab08d30
2 changed files with 12 additions and 3 deletions

View File

@@ -40,11 +40,11 @@ float CastTimeMultiplier::GetValue(Action* action)
Unit* target = action->GetTarget();
if (!target || !target->IsAlive() || !target->IsInWorld()) {
return false;
return 1.0f;
}
if (castTime > (1000 * target->GetHealth() / AI_VALUE(float, "expected group dps"))) {
return 0.0f;
return 0.1f;
}
}
// if (castTime >= 3000)