Reduce string overhead and totem check overhead

This commit is contained in:
Yunfan Li
2024-04-11 14:37:15 +08:00
parent b474dc44bb
commit 9d69e9263b
6 changed files with 29 additions and 6 deletions

View File

@@ -39,4 +39,15 @@ class NearestTriggersValue : public NearestUnitsValue
void FindUnits(std::list<Unit*>& targets) override;
bool AcceptUnit(Unit* unit) override;
};
class NearestTotemsValue : public NearestUnitsValue
{
public:
NearestTotemsValue(PlayerbotAI* botAI, float range = 30.0f) : NearestUnitsValue(botAI, "nearest npcs", range, true) { }
protected:
void FindUnits(std::list<Unit*>& targets) override;
bool AcceptUnit(Unit* unit) override;
};
#endif