27 if (_parameters.empty()) {
30 _groupId = std::stoi(_parameters);
41 const GroupMgr& mgr = entity->getZone()->getGroupMgr();
bool evaluate(const AIPtr &entity) override
Checks whether the condition evaluates to true for the given entity.
Definition: IsGroupLeader.h:37
A condition can be placed on a TreeNode to decide which node is going to get executed. In general they are stateless. If they are not, it should explicitly get noted.
Definition: ICondition.h:124
Maintains the groups a AI can be in.
Definition: GroupMgr.h:27
bool isGroupLeader(GroupId id, const AIPtr &ai) const
Definition: GroupMgr.h:270
Evaluates to true if you are the first member in a particular group.
Definition: IsGroupLeader.h:19
#define CONDITION_FACTORY(ConditionName)
A condition factory macro to ease and unify the registration at AIRegistry.
Definition: ICondition.h:55