mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-13 09:07:19 +00:00
[Spell] Priest prayer of mending buff owner
This commit is contained in:
@@ -18,7 +18,7 @@ bool CastRemoveShadowformAction::Execute(Event event)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
Unit* CastPowerWordShieldOnAlmostFullHealthBelow::GetTarget()
|
Unit* CastPowerWordShieldOnAlmostFullHealthBelowAction::GetTarget()
|
||||||
{
|
{
|
||||||
Group* group = bot->GetGroup();
|
Group* group = bot->GetGroup();
|
||||||
for (GroupReference* gref = group->GetFirstMember(); gref; gref = gref->next())
|
for (GroupReference* gref = group->GetFirstMember(); gref; gref = gref->next())
|
||||||
@@ -47,7 +47,7 @@ Unit* CastPowerWordShieldOnAlmostFullHealthBelow::GetTarget()
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CastPowerWordShieldOnAlmostFullHealthBelow::isUseful()
|
bool CastPowerWordShieldOnAlmostFullHealthBelowAction::isUseful()
|
||||||
{
|
{
|
||||||
Group* group = bot->GetGroup();
|
Group* group = bot->GetGroup();
|
||||||
for (GroupReference* gref = group->GetFirstMember(); gref; gref = gref->next())
|
for (GroupReference* gref = group->GetFirstMember(); gref; gref = gref->next())
|
||||||
@@ -74,4 +74,35 @@ bool CastPowerWordShieldOnAlmostFullHealthBelow::isUseful()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
Unit* CastPowerWordShieldOnNotFullAction::GetTarget()
|
||||||
|
{
|
||||||
|
Group* group = bot->GetGroup();
|
||||||
|
MinValueCalculator calc(100);
|
||||||
|
for (GroupReference* gref = group->GetFirstMember(); gref; gref = gref->next())
|
||||||
|
{
|
||||||
|
Player* player = gref->GetSource();
|
||||||
|
if (!player)
|
||||||
|
continue;
|
||||||
|
if (player->isDead() || player->IsFullHealth())
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (player->GetDistance2d(bot) > sPlayerbotAIConfig->spellDistance)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (botAI->HasAnyAuraOf(player, "weakened soul", "power word: shield", nullptr))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
calc.probe(player->GetHealthPct(), player);
|
||||||
|
}
|
||||||
|
return (Unit*)calc.param;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CastPowerWordShieldOnNotFullAction::isUseful()
|
||||||
|
{
|
||||||
|
return GetTarget();
|
||||||
}
|
}
|
||||||
@@ -52,7 +52,13 @@ HEAL_PARTY_ACTION(CastGreaterHealOnPartyAction, "greater heal", 50.0f, HealingMa
|
|||||||
HEAL_PARTY_ACTION(CastPowerWordShieldOnPartyAction, "power word: shield", 15.0f, HealingManaEfficiency::VERY_HIGH);
|
HEAL_PARTY_ACTION(CastPowerWordShieldOnPartyAction, "power word: shield", 15.0f, HealingManaEfficiency::VERY_HIGH);
|
||||||
HEAL_PARTY_ACTION(CastFlashHealOnPartyAction, "flash heal", 15.0f, HealingManaEfficiency::LOW);
|
HEAL_PARTY_ACTION(CastFlashHealOnPartyAction, "flash heal", 15.0f, HealingManaEfficiency::LOW);
|
||||||
HEAL_PARTY_ACTION(CastRenewOnPartyAction, "renew", 15.0f, HealingManaEfficiency::VERY_HIGH);
|
HEAL_PARTY_ACTION(CastRenewOnPartyAction, "renew", 15.0f, HealingManaEfficiency::VERY_HIGH);
|
||||||
HEAL_PARTY_ACTION(CastPrayerOfMendingAction, "prayer of mending", 15.0f, HealingManaEfficiency::MEDIUM);
|
// HEAL_PARTY_ACTION(CastPrayerOfMendingAction, "prayer of mending", 10.0f, HealingManaEfficiency::HIGH);
|
||||||
|
class CastPrayerOfMendingAction : public HealPartyMemberAction
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
CastPrayerOfMendingAction(PlayerbotAI* botAI) : HealPartyMemberAction(botAI, "prayer of mending", 10.0f, HealingManaEfficiency::HIGH, false) {}
|
||||||
|
};
|
||||||
|
|
||||||
HEAL_PARTY_ACTION(CastBindingHealAction, "binding heal", 15.0f, HealingManaEfficiency::MEDIUM);
|
HEAL_PARTY_ACTION(CastBindingHealAction, "binding heal", 15.0f, HealingManaEfficiency::MEDIUM);
|
||||||
HEAL_PARTY_ACTION(CastPrayerOfHealingAction, "prayer of healing", 15.0f, HealingManaEfficiency::MEDIUM);
|
HEAL_PARTY_ACTION(CastPrayerOfHealingAction, "prayer of healing", 15.0f, HealingManaEfficiency::MEDIUM);
|
||||||
// AOE_HEAL_ACTION(CastCircleOfHealingAction, "circle of healing", 15.0f, HealingManaEfficiency::HIGH);
|
// AOE_HEAL_ACTION(CastCircleOfHealingAction, "circle of healing", 15.0f, HealingManaEfficiency::HIGH);
|
||||||
@@ -169,10 +175,10 @@ public:
|
|||||||
virtual std::string const GetTargetName() { return "current target"; }
|
virtual std::string const GetTargetName() { return "current target"; }
|
||||||
};
|
};
|
||||||
|
|
||||||
class CastPowerWordShieldOnAlmostFullHealthBelow : public HealPartyMemberAction
|
class CastPowerWordShieldOnAlmostFullHealthBelowAction : public HealPartyMemberAction
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CastPowerWordShieldOnAlmostFullHealthBelow(PlayerbotAI* ai)
|
CastPowerWordShieldOnAlmostFullHealthBelowAction(PlayerbotAI* ai)
|
||||||
: HealPartyMemberAction(ai, "power word: shield", 15.0f, HealingManaEfficiency::HIGH)
|
: HealPartyMemberAction(ai, "power word: shield", 15.0f, HealingManaEfficiency::HIGH)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@@ -180,6 +186,17 @@ public:
|
|||||||
Unit* GetTarget() override;
|
Unit* GetTarget() override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class CastPowerWordShieldOnNotFullAction : public HealPartyMemberAction
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
CastPowerWordShieldOnNotFullAction(PlayerbotAI* ai)
|
||||||
|
: HealPartyMemberAction(ai, "power word: shield", 5.0f, HealingManaEfficiency::HIGH)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
bool isUseful() override;
|
||||||
|
Unit* GetTarget() override;
|
||||||
|
};
|
||||||
|
|
||||||
class CastMindSearAction : public CastSpellAction
|
class CastMindSearAction : public CastSpellAction
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|||||||
Reference in New Issue
Block a user