mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 03:08:26 +00:00
Added bot command 'precombat' to manually set pre-combat mode rather than the 'assumption' process used before; Added rule Bot:AllowOwnerOptionAltCombat to allow admins control over its use
This commit is contained in:
+10
-7
@@ -1167,15 +1167,18 @@ bool Bot::AI_IdleCastCheck() {
|
||||
AIautocastspell_timer->Disable(); //prevent the timer from going off AGAIN while we are casting.
|
||||
|
||||
bool pre_combat = false;
|
||||
Mob* test_against = nullptr;
|
||||
Client* test_against = nullptr;
|
||||
|
||||
if (HasGroup() && GetGroup()->GetLeader() && GetGroup()->GetLeader()->IsClient())
|
||||
test_against = GetGroup()->GetLeader();
|
||||
else if (GetOwner() && GetOwner()->IsClient())
|
||||
test_against = GetOwner();
|
||||
if (HasGroup() && GetGroup()->GetLeader() && GetGroup()->GetLeader()->IsClient()) {
|
||||
test_against = GetGroup()->GetLeader()->CastToClient();
|
||||
}
|
||||
else if (GetOwner() && GetOwner()->IsClient()) {
|
||||
test_against = GetOwner()->CastToClient();
|
||||
}
|
||||
|
||||
if (test_against && test_against->GetTarget() && test_against->GetTarget()->IsNPC() && !test_against->GetTarget()->IsPet())
|
||||
pre_combat = true;
|
||||
if (test_against) {
|
||||
pre_combat = test_against->GetBotPrecombat();
|
||||
}
|
||||
|
||||
//Ok, IdleCastCheck depends of class.
|
||||
switch (GetClass()) {
|
||||
|
||||
Reference in New Issue
Block a user