Spell casting

This commit is contained in:
Yunfan Li
2024-03-12 18:39:23 +08:00
parent 00e48c7548
commit aab51a8182
16 changed files with 50 additions and 13 deletions

View File

@@ -5,6 +5,7 @@
#include "HunterTriggers.h"
#include "GenericTriggers.h"
#include "HunterActions.h"
#include "PlayerbotAIConfig.h"
#include "Playerbots.h"
#include "ServerFacade.h"
#include "SharedDefines.h"
@@ -39,6 +40,12 @@ bool HuntersPetLowHealthTrigger::IsActive()
return pet && AI_VALUE2(uint8, "health", "pet target") < 40 && !AI_VALUE2(bool, "dead", "pet target") && !AI_VALUE2(bool, "mounted", "self target");
}
bool HuntersPetMediumHealthTrigger::IsActive()
{
Unit* pet = AI_VALUE(Unit*, "pet target");
return pet && AI_VALUE2(uint8, "health", "pet target") < sPlayerbotAIConfig->mediumHealth && !AI_VALUE2(bool, "dead", "pet target") && !AI_VALUE2(bool, "mounted", "self target");
}
bool HunterPetNotHappy::IsActive()
{
return !AI_VALUE(bool, "pet happy") && !AI_VALUE2(bool, "mounted", "self target");