mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-20 09:38:21 +00:00
more pull tweaks
This commit is contained in:
+20
-30
@@ -2202,15 +2202,28 @@ void Bot::AI_Process()
|
|||||||
// PULLING FLAG (ACTIONABLE RANGE)
|
// PULLING FLAG (ACTIONABLE RANGE)
|
||||||
|
|
||||||
if (GetPullingFlag()) {
|
if (GetPullingFlag()) {
|
||||||
if (!IsBotNonSpellFighter() && !HOLDING && AI_HasSpells()) {
|
if (!TargetValidation(tar)) { return; }
|
||||||
SetPullingSpell(true);
|
|
||||||
|
if (atCombatRange) {
|
||||||
|
if (RuleB(Bots, AllowRangedPulling) && IsBotRanged() && ranged_timer.Check(false)) {
|
||||||
|
StopMoving(CalculateHeadingToTarget(tar->GetX(), tar->GetY()));
|
||||||
|
|
||||||
|
if (BotRangedAttack(tar) && CheckDoubleRangedAttack()) {
|
||||||
|
BotRangedAttack(tar, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
ranged_timer.Start();
|
||||||
|
|
||||||
if (AI_EngagedCastCheck()) {
|
|
||||||
SetPullingSpell(false);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
SetPullingSpell(false);
|
if (RuleB(Bots, AllowAISpellPulling) && !IsBotNonSpellFighter() && AI_HasSpells()) {
|
||||||
|
SetPullingSpell(true);
|
||||||
|
AI_EngagedCastCheck();
|
||||||
|
SetPullingSpell(false);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (RuleB(Bots, UseSpellPulling)) {
|
if (RuleB(Bots, UseSpellPulling)) {
|
||||||
@@ -2218,38 +2231,15 @@ void Bot::AI_Process()
|
|||||||
|
|
||||||
if (tar_distance <= spells[pullSpell].range) {
|
if (tar_distance <= spells[pullSpell].range) {
|
||||||
StopMoving();
|
StopMoving();
|
||||||
|
SetPullingSpell(true);
|
||||||
if (!TargetValidation(tar)) { return; }
|
|
||||||
|
|
||||||
CastSpell(pullSpell, tar->GetID());
|
CastSpell(pullSpell, tar->GetID());
|
||||||
SetPullingSpell(false);
|
SetPullingSpell(false);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
if (atCombatRange) {
|
|
||||||
if (RuleB(Bots, AllowRangedPulling) && IsBotRanged() && ranged_timer.Check(false)) {
|
|
||||||
StopMoving(CalculateHeadingToTarget(tar->GetX(), tar->GetY()));
|
|
||||||
|
|
||||||
if (BotRangedAttack(tar) && CheckDoubleRangedAttack()) {
|
return;
|
||||||
BotRangedAttack(tar, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
ranged_timer.Start();
|
|
||||||
SetPullingSpell(false);
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
else if (RuleB(Bots, AllowAISpellPulling) && !IsBotNonSpellFighter() && !HOLDING && AI_HasSpells() && AI_EngagedCastCheck()) {
|
|
||||||
SetPullingSpell(false);
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ENGAGED AT COMBAT RANGE
|
// ENGAGED AT COMBAT RANGE
|
||||||
|
|||||||
@@ -15,6 +15,12 @@ void bot_command_pull(Client *c, const Seperator *sep)
|
|||||||
|
|
||||||
std::string arg1 = sep->arg[1];
|
std::string arg1 = sep->arg[1];
|
||||||
int ab_arg = 1;
|
int ab_arg = 1;
|
||||||
|
std::string actionableArg = sep->arg[ab_arg];
|
||||||
|
|
||||||
|
if (actionableArg.empty()) {
|
||||||
|
actionableArg = "spawned";
|
||||||
|
}
|
||||||
|
|
||||||
std::string class_race_arg = sep->arg[ab_arg];
|
std::string class_race_arg = sep->arg[ab_arg];
|
||||||
bool class_race_check = false;
|
bool class_race_check = false;
|
||||||
|
|
||||||
@@ -24,7 +30,7 @@ void bot_command_pull(Client *c, const Seperator *sep)
|
|||||||
|
|
||||||
std::list<Bot*> sbl;
|
std::list<Bot*> sbl;
|
||||||
|
|
||||||
if (ActionableBots::PopulateSBL(c, sep->arg[ab_arg], sbl, ab_mask, !class_race_check ? sep->arg[ab_arg + 1] : nullptr, class_race_check ? atoi(sep->arg[ab_arg + 1]) : 0) == ActionableBots::ABT_None) {
|
if (ActionableBots::PopulateSBL(c, actionableArg, sbl, ab_mask, !class_race_check ? sep->arg[ab_arg + 1] : nullptr, class_race_check ? atoi(sep->arg[ab_arg + 1]) : 0) == ActionableBots::ABT_None) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user