mirror of
https://github.com/EQEmu/Server.git
synced 2026-08-29 00:18:18 +00:00
Correct DoLosChecks
This commit is contained in:
@@ -47,11 +47,22 @@ void bot_command_click_item(Client* c, const Seperator* sep)
|
||||
|
||||
sbl.erase(std::remove(sbl.begin(), sbl.end(), nullptr), sbl.end());
|
||||
|
||||
Mob* tar = c->GetTarget();
|
||||
|
||||
for (auto my_bot : sbl) {
|
||||
if (my_bot->BotPassiveCheck()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (
|
||||
tar &&
|
||||
tar != c &&
|
||||
tar->GetOwner() != c &&
|
||||
!c->DoLosChecks(tar)
|
||||
) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (RuleI(Bots, BotsClickItemsMinLvl) > my_bot->GetLevel()) {
|
||||
c->Message(Chat::White, "%s must be level %i to use clickable items.", my_bot->GetCleanName(), RuleI(Bots, BotsClickItemsMinLvl));
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user