mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
miscs
This commit is contained in:
@@ -1335,7 +1335,7 @@ void PlayerbotFactory::InitEquipment(bool incremental)
|
||||
|
||||
float bestScoreForSlot = -1;
|
||||
uint32 bestItemForSlot = 0;
|
||||
for (int attempts = 0; attempts < std::min((int)ids.size(), 25); attempts++)
|
||||
for (int attempts = 0; attempts < std::max((int)(ids.size() * 0.75), 1); attempts++)
|
||||
{
|
||||
uint32 index = urand(0, ids.size() - 1);
|
||||
uint32 newItemId = ids[index];
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include "HunterActions.h"
|
||||
#include "Playerbots.h"
|
||||
#include "ServerFacade.h"
|
||||
#include "SharedDefines.h"
|
||||
|
||||
bool HunterAspectOfTheHawkTrigger::IsActive()
|
||||
{
|
||||
@@ -77,3 +78,9 @@ bool SwitchToMeleeTrigger::IsActive()
|
||||
return botAI->HasStrategy("ranged", BOT_STATE_COMBAT) && target && (target->GetVictim() == bot &&
|
||||
sServerFacade->IsDistanceLessOrEqualThan(AI_VALUE2(float, "distance", "current target"), 8.0f));
|
||||
}
|
||||
|
||||
bool TargetRemoveEnrageTrigger::IsActive()
|
||||
{
|
||||
Unit* target = GetTarget();
|
||||
return target && (botAI->HasAuraToDispel(target, DISPEL_ENRAGE) || botAI->HasAuraToDispel(target, DISPEL_MAGIC));
|
||||
}
|
||||
@@ -160,5 +160,6 @@ class TargetRemoveEnrageTrigger : public TargetAuraDispelTrigger
|
||||
{
|
||||
public:
|
||||
TargetRemoveEnrageTrigger(PlayerbotAI* ai) : TargetAuraDispelTrigger(ai, "tranquilizing shot", DISPEL_ENRAGE) {}
|
||||
bool IsActive() override;
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -40,7 +40,7 @@ void ShadowPriestAoeStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
triggers.push_back(new TriggerNode("shadow word: pain on attacker", NextAction::array(0, new NextAction("shadow word: pain on attacker", ACTION_NORMAL + 5), nullptr)));
|
||||
triggers.push_back(new TriggerNode("vampiric touch on attacker", NextAction::array(0, new NextAction("vampiric touch on attacker", ACTION_NORMAL + 4), nullptr)));
|
||||
// triggers.push_back(new TriggerNode("medium aoe", NextAction::array(0, new NextAction("mind sear", ACTION_HIGH + 4), nullptr)));
|
||||
triggers.push_back(new TriggerNode("medium aoe", NextAction::array(0, new NextAction("mind sear", ACTION_HIGH + 4), nullptr)));
|
||||
}
|
||||
|
||||
void ShadowPriestDebuffStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
#include "HealShamanStrategy.h"
|
||||
#include "Playerbots.h"
|
||||
#include "Strategy.h"
|
||||
|
||||
class GenericShamanStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
|
||||
{
|
||||
@@ -116,7 +117,7 @@ void GenericShamanStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
|
||||
triggers.push_back(new TriggerNode("wind shear", NextAction::array(0, new NextAction("wind shear", 23.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("wind shear on enemy healer", NextAction::array(0, new NextAction("wind shear on enemy healer", 23.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("purge", NextAction::array(0, new NextAction("purge", 10.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("purge", NextAction::array(0, new NextAction("purge", ACTION_DISPEL), nullptr)));
|
||||
// triggers.push_back(new TriggerNode("party member medium health", NextAction::array(0, new NextAction("lesser healing wave on party", 25.0f), nullptr)));
|
||||
// triggers.push_back(new TriggerNode("party member low health", NextAction::array(0, new NextAction("riptide on party", 25.0f), nullptr)));
|
||||
// triggers.push_back(new TriggerNode("medium aoe heal", NextAction::array(0, new NextAction("chain heal", 27.0f), nullptr)));
|
||||
|
||||
@@ -13,7 +13,7 @@ class Unit;
|
||||
class NeedCureTrigger : public SpellTrigger
|
||||
{
|
||||
public:
|
||||
NeedCureTrigger(PlayerbotAI* botAI, std::string const spell, uint32 dispelType) : SpellTrigger(botAI, spell, 2 * 1000), dispelType(dispelType) { }
|
||||
NeedCureTrigger(PlayerbotAI* botAI, std::string const spell, uint32 dispelType) : SpellTrigger(botAI, spell, 1 * 1000), dispelType(dispelType) { }
|
||||
|
||||
std::string const GetTargetName() override { return "self target"; }
|
||||
bool IsActive() override;
|
||||
|
||||
@@ -64,7 +64,7 @@ float ExpectedGroupDpsValue::Calculate()
|
||||
gs_modifier = gs_modifier * 3 + 1;
|
||||
|
||||
if (gs_modifier < 0.5) gs_modifier = 0.5;
|
||||
if (gs_modifier > 4) gs_modifier = 3;
|
||||
if (gs_modifier > 4) gs_modifier = 4;
|
||||
|
||||
return dps_num * basic_dps * gs_modifier;
|
||||
}
|
||||
Reference in New Issue
Block a user