mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
Frost mage test triggers
This commit is contained in:
@@ -29,3 +29,27 @@ bool FingersOfFrostSingleTrigger::IsActive()
|
|||||||
Aura *aura = botAI->GetAura(getName(), GetTarget(), false, true, -1);
|
Aura *aura = botAI->GetAura(getName(), GetTarget(), false, true, -1);
|
||||||
return (aura && aura->GetCharges() == 1);
|
return (aura && aura->GetCharges() == 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool FrostNovaOnTargetTrigger::IsActive()
|
||||||
|
{
|
||||||
|
Unit* target = GetTarget();
|
||||||
|
if (!target || !target->IsAlive() || !target->IsInWorld()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
bool aura = botAI->HasAura("frostbite", target);
|
||||||
|
if (aura)
|
||||||
|
LOG_DEBUG("playerbots", ":: FROST NOVA ACTIVE");
|
||||||
|
return !botAI->HasAura("frost nova", target);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool FrostbiteOnTargetTrigger::IsActive()
|
||||||
|
{
|
||||||
|
Unit* target = GetTarget();
|
||||||
|
if (!target || !target->IsAlive() || !target->IsInWorld()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
bool aura = botAI->HasAura("frostbite", target);
|
||||||
|
if (aura)
|
||||||
|
LOG_DEBUG("playerbots", ":: FROSTBITE ACTIVE");
|
||||||
|
return botAI->HasAura("frostbite", target);
|
||||||
|
}
|
||||||
|
|||||||
@@ -179,13 +179,15 @@ class MirrorImageTrigger : public BoostTrigger
|
|||||||
class FrostNovaOnTargetTrigger : public DebuffTrigger
|
class FrostNovaOnTargetTrigger : public DebuffTrigger
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
FrostNovaOnTargetTrigger(PlayerbotAI* botAI) : DebuffTrigger(botAI, "frost nova", 1, false, 2.0f) {}
|
FrostNovaOnTargetTrigger(PlayerbotAI* botAI) : DebuffTrigger(botAI, "frost nova", 1, false) {}
|
||||||
|
bool IsActive() override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class FrostbiteOnTargetTrigger : public DebuffTrigger
|
class FrostbiteOnTargetTrigger : public DebuffTrigger
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
FrostbiteOnTargetTrigger(PlayerbotAI* botAI) : DebuffTrigger(botAI, "frostbite", 1, false, 2.0f) {}
|
FrostbiteOnTargetTrigger(PlayerbotAI* botAI) : DebuffTrigger(botAI, "frostbite", 1, false) {}
|
||||||
|
bool IsActive() override;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user