Skip to content

Commit

Permalink
-Druid: Restro druid now cast lifebloom when get clearcasting in wotlk
Browse files Browse the repository at this point in the history
  • Loading branch information
kadeshar authored and celguar committed Oct 18, 2023
1 parent d261c6d commit f90e83c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions playerbot/strategy/druid/DruidAiObjectContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,7 @@ namespace ai
creators["rebirth on party"] = &TriggerFactoryInternal::rebirth_on_party;
creators["innervate self"] = &TriggerFactoryInternal::innervate_self;
creators["lifebloom"] = &TriggerFactoryInternal::lifebloom;
creators["clearcasting"] = &TriggerFactoryInternal::clearcasting;
}

private:
Expand Down Expand Up @@ -395,6 +396,7 @@ namespace ai
static Trigger* rebirth_on_party(PlayerbotAI* ai) { return new RebirthOnPartyTrigger(ai); }
static Trigger* innervate_self(PlayerbotAI* ai) { return new InnervateSelfTrigger(ai); }
static Trigger* lifebloom(PlayerbotAI* ai) { return new LifebloomTankTrigger(ai); }
static Trigger* clearcasting(PlayerbotAI* ai) { return new ClearcastingTrigger(ai); }
};

class AiObjectContextInternal : public NamedObjectContext<Action>
Expand Down
6 changes: 6 additions & 0 deletions playerbot/strategy/druid/DruidTriggers.h
Original file line number Diff line number Diff line change
Expand Up @@ -407,4 +407,10 @@ namespace ai
&& !target->getAttackers().empty(); //target have attackers
}
};

class ClearcastingTrigger : public HasAuraTrigger
{
public:
ClearcastingTrigger(PlayerbotAI* ai) : HasAuraTrigger(ai, "clearcasting") {}
};
}
4 changes: 4 additions & 0 deletions playerbot/strategy/druid/RestorationDruidStrategy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -817,6 +817,10 @@ void RestorationDruidStrategy::InitCombatTriggers(std::list<TriggerNode*>& trigg
NextAction::array(0, new NextAction("regrowth on party", ACTION_CRITICAL_HEAL + 1),
new NextAction("healing touch on party", ACTION_CRITICAL_HEAL), NULL)));

triggers.push_back(new TriggerNode(
"clearcasting",
NextAction::array(0, new NextAction("lifebloom", ACTION_CRITICAL_HEAL - 1), NULL)));

triggers.push_back(new TriggerNode(
"low health",
NextAction::array(0, new NextAction("regrowth", ACTION_MEDIUM_HEAL), NULL)));
Expand Down

0 comments on commit f90e83c

Please sign in to comment.