mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-19 21:48:25 +00:00
Allow bots to bypass los checks for positioning if no detrimental types allowed
This commit is contained in:
+7
-13
@@ -11329,14 +11329,14 @@ bool Bot::RequiresLoSForPositioning() {
|
||||
if (GetLevel() < GetStopMeleeLevel()) {
|
||||
return true;
|
||||
}
|
||||
else if (GetClass() == Class::Bard) {
|
||||
return false;
|
||||
}
|
||||
else if (GetClass() == Class::Cleric) { //TODO bot rewrite - add check to see if spell requires los
|
||||
return false;
|
||||
|
||||
for (uint16 i = BotSpellTypes::START; i <= BotSpellTypes::END; ++i) {
|
||||
if (BOT_SPELL_TYPES_DETRIMENTAL(i) && !GetSpellHold(i)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Bot::HasRequiredLoSForPositioning(Mob* tar) {
|
||||
@@ -11344,13 +11344,7 @@ bool Bot::HasRequiredLoSForPositioning(Mob* tar) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (GetClass() == Class::Cleric) { //add check to see if spell requires los
|
||||
return true;
|
||||
}
|
||||
else if (GetClass() == Class::Bard && GetLevel() >= GetStopMeleeLevel()) {
|
||||
return true;
|
||||
}
|
||||
if (!DoLosChecks(this, tar)) {
|
||||
if (RequiresLoSForPositioning() && !DoLosChecks(this, tar)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user