miscs(triggers): spell range, fury warrior equip

This commit is contained in:
Yunfan Li
2023-06-11 21:15:02 +08:00
parent 617d0ee031
commit df43d7dff7
8 changed files with 39 additions and 28 deletions

View File

@@ -135,15 +135,15 @@ EnemyOutOfSpellRangeTrigger::EnemyOutOfSpellRangeTrigger(PlayerbotAI* botAI) : O
{
}
bool EnemyOutOfSpellRangeTrigger::IsActive()
{
Unit* target = AI_VALUE(Unit*, GetTargetName());
if (!target)
return false;
// bool EnemyOutOfSpellRangeTrigger::IsActive()
// {
// Unit* target = AI_VALUE(Unit*, GetTargetName());
// if (!target)
// return false;
float combatReach = bot->GetCombatReach() + target->GetCombatReach();
return target && (sServerFacade->GetDistance2d(bot, target) > (distance + combatReach + sPlayerbotAIConfig->contactDistance) || !bot->IsWithinLOSInMap(target));
}
// float combatReach = bot->GetCombatReach() + target->GetCombatReach();
// return target && (sServerFacade->GetDistance2d(bot, target) > (distance + combatReach + sPlayerbotAIConfig->contactDistance) || !bot->IsWithinLOSInMap(target));
// }
// bool EnemyOutOfMeleeTrigger::IsActive()
// {