mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
spell modification
This commit is contained in:
@@ -212,6 +212,9 @@ void PlayerbotAI::UpdateAI(uint32 elapsed, bool minimal)
|
||||
// }
|
||||
return;
|
||||
}
|
||||
if (!GetMaster() || !GetMaster()->IsInWorld() || !GetMaster()->GetSession() || GetMaster()->GetSession()->isLogingOut()) {
|
||||
return;
|
||||
}
|
||||
// if (bot->HasUnitMovementFlag(MOVEMENTFLAG_FALLING)) {
|
||||
// bot->Say("Falling!", LANG_UNIVERSAL);
|
||||
// }
|
||||
@@ -959,7 +962,7 @@ void PlayerbotAI::DoNextAction(bool min)
|
||||
SetNextCheckDelay(sPlayerbotAIConfig->globalCoolDown);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (bot->HasUnitState(UNIT_STATE_IN_FLIGHT))
|
||||
{
|
||||
SetNextCheckDelay(sPlayerbotAIConfig->passiveDelay);
|
||||
|
||||
@@ -144,6 +144,7 @@ NextAction** BearTankDruidStrategy::getDefaultActions()
|
||||
new NextAction("faerie fire (feral)", ACTION_NORMAL + 4),
|
||||
new NextAction("lacerate", ACTION_NORMAL + 3),
|
||||
new NextAction("maul", ACTION_NORMAL + 2),
|
||||
new NextAction("enrage", ACTION_NORMAL + 1),
|
||||
new NextAction("melee", ACTION_NORMAL),
|
||||
nullptr);
|
||||
}
|
||||
@@ -151,12 +152,12 @@ NextAction** BearTankDruidStrategy::getDefaultActions()
|
||||
void BearTankDruidStrategy::InitTriggers(std::vector<TriggerNode*> &triggers)
|
||||
{
|
||||
FeralDruidStrategy::InitTriggers(triggers);
|
||||
|
||||
triggers.push_back(new TriggerNode("enemy out of melee", NextAction::array(0, new NextAction("feral charge - bear", ACTION_MOVE + 8), nullptr)));
|
||||
triggers.push_back(new TriggerNode("thorns", NextAction::array(0, new NextAction("thorns", ACTION_HIGH + 9), nullptr)));
|
||||
triggers.push_back(new TriggerNode("bear form", NextAction::array(0, new NextAction("dire bear form", ACTION_HIGH + 8), nullptr)));
|
||||
triggers.push_back(new TriggerNode("faerie fire (feral)", NextAction::array(0, new NextAction("faerie fire (feral)", ACTION_HIGH + 7), nullptr)));
|
||||
triggers.push_back(new TriggerNode("lose aggro", NextAction::array(0, new NextAction("growl", ACTION_HIGH + 8), nullptr)));
|
||||
triggers.push_back(new TriggerNode( "medium aoe", NextAction::array(0, new NextAction("demoralizing roar", ACTION_HIGH + 6), new NextAction("swipe (bear)", ACTION_HIGH + 6), nullptr)));
|
||||
triggers.push_back(new TriggerNode("medium aoe", NextAction::array(0, new NextAction("demoralizing roar", ACTION_HIGH + 6), new NextAction("swipe (bear)", ACTION_HIGH + 6), nullptr)));
|
||||
triggers.push_back(new TriggerNode("light aoe", NextAction::array(0, new NextAction("swipe (bear)", ACTION_HIGH + 5), nullptr)));
|
||||
triggers.push_back(new TriggerNode("bash", NextAction::array(0, new NextAction("bash", ACTION_INTERRUPT + 2), nullptr)));
|
||||
triggers.push_back(new TriggerNode("bash on enemy healer", NextAction::array(0, new NextAction("bash on enemy healer", ACTION_INTERRUPT + 1), nullptr)));
|
||||
|
||||
@@ -279,4 +279,11 @@ class CastMoonfireOnAttackerAction : public CastDebuffSpellOnAttackerAction
|
||||
public:
|
||||
CastMoonfireOnAttackerAction(PlayerbotAI* ai) : CastDebuffSpellOnAttackerAction(ai, "moonfire") {}
|
||||
};
|
||||
|
||||
class CastEnrageAction : public CastBuffSpellAction
|
||||
{
|
||||
public:
|
||||
CastEnrageAction(PlayerbotAI* ai) : CastBuffSpellAction(ai, "enrage") {}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -214,6 +214,7 @@ class DruidAiObjectContextInternal : public NamedObjectContext<Action>
|
||||
creators["remove curse on party"] = &DruidAiObjectContextInternal::remove_curse_on_party;
|
||||
creators["insect swarm on attacker"] = &DruidAiObjectContextInternal::insect_swarm_on_attacker;
|
||||
creators["moonfire on attacker"] = &DruidAiObjectContextInternal::moonfire_on_attacker;
|
||||
creators["enrage"] = &DruidAiObjectContextInternal::enrage;
|
||||
}
|
||||
|
||||
private:
|
||||
@@ -292,6 +293,7 @@ class DruidAiObjectContextInternal : public NamedObjectContext<Action>
|
||||
static Action* remove_curse_on_party(PlayerbotAI *ai) { return new CastDruidRemoveCurseOnPartyAction(ai); }
|
||||
static Action* insect_swarm_on_attacker(PlayerbotAI* ai) { return new CastInsectSwarmOnAttackerAction(ai); }
|
||||
static Action* moonfire_on_attacker(PlayerbotAI* ai) { return new CastMoonfireOnAttackerAction(ai); }
|
||||
static Action* enrage(PlayerbotAI* ai) { return new CastEnrageAction(ai); }
|
||||
};
|
||||
|
||||
DruidAiObjectContext::DruidAiObjectContext(PlayerbotAI* botAI) : AiObjectContext(botAI)
|
||||
|
||||
@@ -77,10 +77,10 @@ class MoonfireTrigger : public DebuffTrigger
|
||||
bool IsActive() override;
|
||||
};
|
||||
|
||||
class FaerieFireTrigger : public DebuffOnBossTrigger
|
||||
class FaerieFireTrigger : public DebuffTrigger
|
||||
{
|
||||
public:
|
||||
FaerieFireTrigger(PlayerbotAI* botAI) : DebuffOnBossTrigger(botAI, "faerie fire") { }
|
||||
FaerieFireTrigger(PlayerbotAI* botAI) : DebuffTrigger(botAI, "faerie fire", 1, false, 25.0f) { }
|
||||
};
|
||||
|
||||
class FaerieFireFeralTrigger : public DebuffTrigger
|
||||
|
||||
@@ -96,7 +96,7 @@ void FeralDruidStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
GenericDruidStrategy::InitTriggers(triggers);
|
||||
|
||||
triggers.push_back(new TriggerNode("not facing target", NextAction::array(0, new NextAction("set facing", ACTION_NORMAL + 7), nullptr)));
|
||||
// triggers.push_back(new TriggerNode("not facing target", NextAction::array(0, new NextAction("set facing", ACTION_NORMAL + 7), nullptr)));
|
||||
triggers.push_back(new TriggerNode("enemy out of melee", NextAction::array(0, new NextAction("reach melee", ACTION_NORMAL + 8), nullptr)));
|
||||
triggers.push_back(new TriggerNode("enemy too close for melee", NextAction::array(0, new NextAction("move out of enemy contact", ACTION_NORMAL + 8), nullptr)));
|
||||
triggers.push_back(new TriggerNode("critical health", NextAction::array(0, new NextAction("survival instincts", ACTION_EMERGENCY + 1), nullptr)));
|
||||
|
||||
@@ -50,7 +50,7 @@ void DpsHunterStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
triggers.push_back(new TriggerNode("low mana", NextAction::array(0, new NextAction("viper sting", 23.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("hunter's mark", NextAction::array(0, new NextAction("hunter's mark", 11.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("concussive shot on snare target", NextAction::array(0, new NextAction("concussive shot", 20.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("no pet", NextAction::array(0, new NextAction("call pet", 21.0f), NULL)));
|
||||
// triggers.push_back(new TriggerNode("no pet", NextAction::array(0, new NextAction("call pet", 21.0f), NULL)));
|
||||
triggers.push_back(new TriggerNode("hunters pet low health", NextAction::array(0, new NextAction("mend pet", 21.0f), NULL)));
|
||||
/*triggers.push_back(new TriggerNode("has aggro", NextAction::array(0, new NextAction("concussive shot", 20.0f), nullptr)));*/
|
||||
}
|
||||
|
||||
@@ -67,10 +67,10 @@ class BlackArrowTrigger : public DebuffTrigger
|
||||
BlackArrowTrigger(PlayerbotAI* botAI) : DebuffTrigger(botAI, "black arrow", 1, true) { }
|
||||
};
|
||||
|
||||
class HuntersMarkTrigger : public DebuffOnBossTrigger
|
||||
class HuntersMarkTrigger : public DebuffTrigger
|
||||
{
|
||||
public:
|
||||
HuntersMarkTrigger(PlayerbotAI* botAI) : DebuffOnBossTrigger(botAI, "hunter's mark") { }
|
||||
HuntersMarkTrigger(PlayerbotAI* botAI) : DebuffTrigger(botAI, "hunter's mark", 1, false, 25.0f) { }
|
||||
};
|
||||
|
||||
class FreezingTrapTrigger : public HasCcTargetTrigger
|
||||
|
||||
@@ -105,7 +105,7 @@ void DpsPaladinStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
// triggers.push_back(new TriggerNode("repentance on enemy healer", NextAction::array(0, new NextAction("repentance on enemy healer", ACTION_INTERRUPT + 2), nullptr)));
|
||||
// triggers.push_back(new TriggerNode("repentance on snare target", NextAction::array(0, new NextAction("repentance on snare target", ACTION_INTERRUPT + 2), nullptr)));
|
||||
// triggers.push_back(new TriggerNode("repentance", NextAction::array(0, new NextAction("repentance", ACTION_INTERRUPT + 2), nullptr)));
|
||||
// triggers.push_back(new TriggerNode("medium aoe", NextAction::array(0, new NextAction("divine storm", ACTION_HIGH + 1), new NextAction("consecration", ACTION_HIGH + 1), nullptr)));
|
||||
triggers.push_back(new TriggerNode("medium aoe", NextAction::array(0, new NextAction("consecration", ACTION_HIGH + 3), nullptr)));
|
||||
triggers.push_back(new TriggerNode("art of war", NextAction::array(0, new NextAction("exorcism", ACTION_HIGH + 2), nullptr)));
|
||||
triggers.push_back(new TriggerNode("target critical health", NextAction::array(0, new NextAction("hammer of wrath", ACTION_HIGH), nullptr)));
|
||||
// triggers.push_back(new TriggerNode(
|
||||
|
||||
@@ -82,7 +82,10 @@ void TankPaladinStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
new NextAction("avenger's shield", ACTION_HIGH + 6), nullptr)));
|
||||
// triggers.push_back(new TriggerNode("avenger's shield", NextAction::array(0, new NextAction("avenger's shield", ACTION_HIGH + 7), nullptr)));
|
||||
triggers.push_back(new TriggerNode("lose aggro", NextAction::array(0, new NextAction("hand of reckoning", ACTION_HIGH + 7), nullptr)));
|
||||
triggers.push_back(new TriggerNode("holy shield", NextAction::array(0, new NextAction("holy shield", ACTION_HIGH + 4), nullptr)));
|
||||
// triggers.push_back(new TriggerNode("almost full health", NextAction::array(0, new NextAction("holy shield", ACTION_HIGH + 4), nullptr)));
|
||||
triggers.push_back(new TriggerNode("medium health", NextAction::array(0, new NextAction("holy shield", ACTION_HIGH + 4), nullptr)));
|
||||
triggers.push_back(new TriggerNode("low health", NextAction::array(0, new NextAction("holy shield", ACTION_HIGH + 4), nullptr)));
|
||||
triggers.push_back(new TriggerNode("critical health", NextAction::array(0, new NextAction("holy shield", ACTION_HIGH + 4), nullptr)));
|
||||
// triggers.push_back(new TriggerNode("blessing", NextAction::array(0, new NextAction("blessing of sanctuary", ACTION_HIGH + 9), nullptr)));
|
||||
triggers.push_back(new TriggerNode("target critical health", NextAction::array(0, new NextAction("hammer of wrath", ACTION_CRITICAL_HEAL), nullptr)));
|
||||
triggers.push_back(new TriggerNode(
|
||||
|
||||
@@ -295,10 +295,10 @@ class CastFlameShockAction : public CastDebuffSpellAction
|
||||
CastFlameShockAction(PlayerbotAI* botAI) : CastDebuffSpellAction(botAI, "flame shock", true) { }
|
||||
};
|
||||
|
||||
class CastEarthShockAction : public CastDebuffSpellAction
|
||||
class CastEarthShockAction : public CastSpellAction
|
||||
{
|
||||
public:
|
||||
CastEarthShockAction(PlayerbotAI* botAI) : CastDebuffSpellAction(botAI, "earth shock", true) { }
|
||||
CastEarthShockAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "earth shock") { }
|
||||
};
|
||||
|
||||
class CastFrostShockAction : public CastSnareSpellAction
|
||||
|
||||
Reference in New Issue
Block a user