fix(triggers): group heal occation

This commit is contained in:
Yunfan Li
2023-07-14 13:11:53 +08:00
parent 034934a034
commit 1ccb02f3d0
2 changed files with 4 additions and 1 deletions

View File

@@ -136,7 +136,7 @@ class AoeInGroupTrigger : public Trigger {
public:
AoeInGroupTrigger(PlayerbotAI* ai, std::string name, std::string type, float ratio) :
Trigger(ai, name), ratio(ratio), type(type) {}
virtual bool IsActive();
bool IsActive() override;
protected:
float ratio;
std::string type;

View File

@@ -3,6 +3,7 @@
*/
#include "AoeHealValues.h"
#include "PlayerbotAIConfig.h"
#include "Playerbots.h"
uint8 AoeHealValue::Calculate()
@@ -18,6 +19,8 @@ uint8 AoeHealValue::Calculate()
range = sPlayerbotAIConfig->mediumHealth;
else if (qualifier == "critical")
range = sPlayerbotAIConfig->criticalHealth;
else if (qualifier == "almost full")
range = sPlayerbotAIConfig->almostFullHealth;
uint8 count = 0;
Group::MemberSlotList const& groupSlot = group->GetMemberSlots();