[Bug Fix] Fix EntityList::GetBotListByCharacterID() (#2569)

- Class ID wasn't being checked, must've been left out of commit.
This commit is contained in:
Kinglykrab 2022-11-22 17:03:43 -05:00 committed by GitHub
parent 5e6741cf17
commit dd3c76e9d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5175,7 +5175,8 @@ std::vector<Bot *> EntityList::GetBotListByCharacterID(uint32 character_id, uint
for (const auto& b : bot_list) { for (const auto& b : bot_list) {
if ( if (
b->GetOwner() && b->GetOwner() &&
b->GetBotOwnerCharacterID() == character_id b->GetBotOwnerCharacterID() == character_id &&
(!class_id || b->GetClass() == class_id)
) { ) {
client_bot_list.push_back(b); client_bot_list.push_back(b);
} }