mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-16 10:20:27 +00:00
miscs: movement, coredump fix, rndbot
This commit is contained in:
@@ -205,6 +205,15 @@ bool DebuffTrigger::IsActive()
|
||||
return BuffTrigger::IsActive() && AI_VALUE2(uint8, "health", GetTargetName()) > life_bound;
|
||||
}
|
||||
|
||||
bool DebuffOnBossTrigger::IsActive()
|
||||
{
|
||||
if (!DebuffTrigger::IsActive()) {
|
||||
return false;
|
||||
}
|
||||
Creature *c = GetTarget()->ToCreature();
|
||||
return c && ((c->IsDungeonBoss()) || (c->isWorldBoss()));
|
||||
}
|
||||
|
||||
bool SpellTrigger::IsActive()
|
||||
{
|
||||
return GetTarget();
|
||||
|
||||
@@ -314,6 +314,13 @@ class DebuffTrigger : public BuffTrigger
|
||||
float life_bound;
|
||||
};
|
||||
|
||||
class DebuffOnBossTrigger : public DebuffTrigger
|
||||
{
|
||||
public:
|
||||
DebuffOnBossTrigger(PlayerbotAI* botAI, std::string const spell, int32 checkInterval = 1, bool checkIsOwner = false) : DebuffTrigger(botAI, spell, checkInterval, checkIsOwner) {}
|
||||
bool IsActive() override;
|
||||
};
|
||||
|
||||
class DebuffOnAttackerTrigger : public DebuffTrigger
|
||||
{
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user