mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
fix: targetEnemy uses faction isHostile() instead of targeting all non-player units
This commit is contained in:
parent
84d5a1125f
commit
04768f41de
1 changed files with 1 additions and 2 deletions
|
|
@ -11699,9 +11699,8 @@ void GameHandler::targetEnemy(bool reverse) {
|
|||
|
||||
for (const auto& [guid, entity] : entities) {
|
||||
if (entity->getType() == ObjectType::UNIT) {
|
||||
// Check if hostile (this is simplified - would need faction checking)
|
||||
auto unit = std::dynamic_pointer_cast<Unit>(entity);
|
||||
if (unit && guid != playerGuid) {
|
||||
if (unit && guid != playerGuid && unit->isHostile()) {
|
||||
hostiles.push_back(guid);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue