-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathtargetselector.py
More file actions
33 lines (26 loc) · 1.05 KB
/
targetselector.py
File metadata and controls
33 lines (26 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
from object_manager import ObjectManager
from wow_object import WowObject
from typing import Optional
class TargetSelector:
"""Manages target selection logic."""
def __init__(self, om: ObjectManager):
"""Initializes the TargetSelector.
Args:
om: The ObjectManager instance.
"""
self.om = om
def get_selected_target(self) -> Optional[WowObject]:
"""Returns the currently selected target based on some logic.
Currently, just returns the ObjectManager's current target.
Future logic could include focus target, mouseover, nearest enemy, etc.
Returns:
The selected WowObject target, or None if no valid target.
"""
# Basic implementation: Return current target from ObjectManager
if self.om and self.om.target and self.om.target.is_valid():
return self.om.target
return None
# Add other methods as needed, e.g.:
# def set_focus_target(self, guid):
# def get_focus_target(self):
# def find_nearest_enemy(self):