Skip to content

Commit

Permalink
Add manual hunter aspect and stings
Browse files Browse the repository at this point in the history
  • Loading branch information
davidonete committed Dec 5, 2023
1 parent 56ea02c commit 0cc7e39
Show file tree
Hide file tree
Showing 13 changed files with 1,557 additions and 172 deletions.
4 changes: 2 additions & 2 deletions playerbot/AiFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ void AiFactory::AddDefaultCombatStrategies(Player* player, PlayerbotAI* const fa
combatEngine->addStrategy("marksmanship");
}

combatEngine->addStrategies("dps assist", "ranged", "cc", "aoe", "buff", "boost", NULL);
combatEngine->addStrategies("dps assist", "ranged", "cc", "aoe", "buff", "boost", "aspect", "sting", NULL);
break;
}

Expand Down Expand Up @@ -670,7 +670,7 @@ void AiFactory::AddDefaultNonCombatStrategies(Player* player, PlayerbotAI* const
nonCombatEngine->addStrategy("marksmanship");
}

nonCombatEngine->addStrategies("dps assist", "cc", "aoe", "buff", "boost", NULL);
nonCombatEngine->addStrategies("dps assist", "cc", "aoe", "buff", "boost", "aspect", NULL);
break;
}

Expand Down
207 changes: 207 additions & 0 deletions playerbot/strategy/hunter/BeastMasteryHunterStrategy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,75 @@ void BeastMasteryHunterCcRaidStrategy::InitNonCombatTriggers(std::list<TriggerNo
HunterCcRaidStrategy::InitNonCombatTriggers(triggers);
}

void BeastMasteryHunterStingStrategy::InitCombatTriggers(std::list<TriggerNode*>& triggers)
{
HunterStingStrategy::InitCombatTriggers(triggers);
}

void BeastMasteryHunterStingPveStrategy::InitCombatTriggers(std::list<TriggerNode*>& triggers)
{
BeastMasteryHunterStingStrategy::InitCombatTriggers(triggers);
HunterStingPveStrategy::InitCombatTriggers(triggers);
}

void BeastMasteryHunterStingPvpStrategy::InitCombatTriggers(std::list<TriggerNode*>& triggers)
{
BeastMasteryHunterStingStrategy::InitCombatTriggers(triggers);
HunterStingPvpStrategy::InitCombatTriggers(triggers);
}

void BeastMasteryHunterStingRaidStrategy::InitCombatTriggers(std::list<TriggerNode*>& triggers)
{
BeastMasteryHunterStingStrategy::InitCombatTriggers(triggers);
HunterStingRaidStrategy::InitCombatTriggers(triggers);
}

void BeastMasteryHunterAspectStrategy::InitCombatTriggers(std::list<TriggerNode*>& triggers)
{
HunterAspectStrategy::InitCombatTriggers(triggers);
}

void BeastMasteryHunterAspectStrategy::InitNonCombatTriggers(std::list<TriggerNode*>& triggers)
{
HunterAspectStrategy::InitNonCombatTriggers(triggers);
}

void BeastMasteryHunterAspectPveStrategy::InitCombatTriggers(std::list<TriggerNode*>& triggers)
{
BeastMasteryHunterAspectStrategy::InitCombatTriggers(triggers);
HunterAspectPveStrategy::InitCombatTriggers(triggers);
}

void BeastMasteryHunterAspectPveStrategy::InitNonCombatTriggers(std::list<TriggerNode*>& triggers)
{
BeastMasteryHunterAspectStrategy::InitNonCombatTriggers(triggers);
HunterAspectPveStrategy::InitNonCombatTriggers(triggers);
}

void BeastMasteryHunterAspectPvpStrategy::InitCombatTriggers(std::list<TriggerNode*>& triggers)
{
BeastMasteryHunterAspectStrategy::InitCombatTriggers(triggers);
HunterAspectPvpStrategy::InitCombatTriggers(triggers);
}

void BeastMasteryHunterAspectPvpStrategy::InitNonCombatTriggers(std::list<TriggerNode*>& triggers)
{
BeastMasteryHunterAspectStrategy::InitNonCombatTriggers(triggers);
HunterAspectPvpStrategy::InitNonCombatTriggers(triggers);
}

void BeastMasteryHunterAspectRaidStrategy::InitCombatTriggers(std::list<TriggerNode*>& triggers)
{
BeastMasteryHunterAspectStrategy::InitCombatTriggers(triggers);
HunterAspectRaidStrategy::InitCombatTriggers(triggers);
}

void BeastMasteryHunterAspectRaidStrategy::InitNonCombatTriggers(std::list<TriggerNode*>& triggers)
{
BeastMasteryHunterAspectStrategy::InitNonCombatTriggers(triggers);
HunterAspectRaidStrategy::InitNonCombatTriggers(triggers);
}

#endif
#ifdef MANGOSBOT_ONE // TBC

Expand Down Expand Up @@ -570,6 +639,75 @@ void BeastMasteryHunterCcRaidStrategy::InitNonCombatTriggers(std::list<TriggerNo
HunterCcRaidStrategy::InitNonCombatTriggers(triggers);
}

void BeastMasteryHunterStingStrategy::InitCombatTriggers(std::list<TriggerNode*>& triggers)
{
HunterStingStrategy::InitCombatTriggers(triggers);
}

void BeastMasteryHunterStingPveStrategy::InitCombatTriggers(std::list<TriggerNode*>& triggers)
{
BeastMasteryHunterStingStrategy::InitCombatTriggers(triggers);
HunterStingPveStrategy::InitCombatTriggers(triggers);
}

void BeastMasteryHunterStingPvpStrategy::InitCombatTriggers(std::list<TriggerNode*>& triggers)
{
BeastMasteryHunterStingStrategy::InitCombatTriggers(triggers);
HunterStingPvpStrategy::InitCombatTriggers(triggers);
}

void BeastMasteryHunterStingRaidStrategy::InitCombatTriggers(std::list<TriggerNode*>& triggers)
{
BeastMasteryHunterStingStrategy::InitCombatTriggers(triggers);
HunterStingRaidStrategy::InitCombatTriggers(triggers);
}

void BeastMasteryHunterAspectStrategy::InitCombatTriggers(std::list<TriggerNode*>& triggers)
{
HunterAspectStrategy::InitCombatTriggers(triggers);
}

void BeastMasteryHunterAspectStrategy::InitNonCombatTriggers(std::list<TriggerNode*>& triggers)
{
HunterAspectStrategy::InitNonCombatTriggers(triggers);
}

void BeastMasteryHunterAspectPveStrategy::InitCombatTriggers(std::list<TriggerNode*>& triggers)
{
BeastMasteryHunterAspectStrategy::InitCombatTriggers(triggers);
HunterAspectPveStrategy::InitCombatTriggers(triggers);
}

void BeastMasteryHunterAspectPveStrategy::InitNonCombatTriggers(std::list<TriggerNode*>& triggers)
{
BeastMasteryHunterAspectStrategy::InitNonCombatTriggers(triggers);
HunterAspectPveStrategy::InitNonCombatTriggers(triggers);
}

void BeastMasteryHunterAspectPvpStrategy::InitCombatTriggers(std::list<TriggerNode*>& triggers)
{
BeastMasteryHunterAspectStrategy::InitCombatTriggers(triggers);
HunterAspectPvpStrategy::InitCombatTriggers(triggers);
}

void BeastMasteryHunterAspectPvpStrategy::InitNonCombatTriggers(std::list<TriggerNode*>& triggers)
{
BeastMasteryHunterAspectStrategy::InitNonCombatTriggers(triggers);
HunterAspectPvpStrategy::InitNonCombatTriggers(triggers);
}

void BeastMasteryHunterAspectRaidStrategy::InitCombatTriggers(std::list<TriggerNode*>& triggers)
{
BeastMasteryHunterAspectStrategy::InitCombatTriggers(triggers);
HunterAspectRaidStrategy::InitCombatTriggers(triggers);
}

void BeastMasteryHunterAspectRaidStrategy::InitNonCombatTriggers(std::list<TriggerNode*>& triggers)
{
BeastMasteryHunterAspectStrategy::InitNonCombatTriggers(triggers);
HunterAspectRaidStrategy::InitNonCombatTriggers(triggers);
}

#endif
#ifdef MANGOSBOT_TWO // WOTLK

Expand Down Expand Up @@ -853,4 +991,73 @@ void BeastMasteryHunterCcRaidStrategy::InitNonCombatTriggers(std::list<TriggerNo
HunterCcRaidStrategy::InitNonCombatTriggers(triggers);
}

void BeastMasteryHunterStingStrategy::InitCombatTriggers(std::list<TriggerNode*>& triggers)
{
HunterStingStrategy::InitCombatTriggers(triggers);
}

void BeastMasteryHunterStingPveStrategy::InitCombatTriggers(std::list<TriggerNode*>& triggers)
{
BeastMasteryHunterStingStrategy::InitCombatTriggers(triggers);
HunterStingPveStrategy::InitCombatTriggers(triggers);
}

void BeastMasteryHunterStingPvpStrategy::InitCombatTriggers(std::list<TriggerNode*>& triggers)
{
BeastMasteryHunterStingStrategy::InitCombatTriggers(triggers);
HunterStingPvpStrategy::InitCombatTriggers(triggers);
}

void BeastMasteryHunterStingRaidStrategy::InitCombatTriggers(std::list<TriggerNode*>& triggers)
{
BeastMasteryHunterStingStrategy::InitCombatTriggers(triggers);
HunterStingRaidStrategy::InitCombatTriggers(triggers);
}

void BeastMasteryHunterAspectStrategy::InitCombatTriggers(std::list<TriggerNode*>& triggers)
{
HunterAspectStrategy::InitCombatTriggers(triggers);
}

void BeastMasteryHunterAspectStrategy::InitNonCombatTriggers(std::list<TriggerNode*>& triggers)
{
HunterAspectStrategy::InitNonCombatTriggers(triggers);
}

void BeastMasteryHunterAspectPveStrategy::InitCombatTriggers(std::list<TriggerNode*>& triggers)
{
BeastMasteryHunterAspectStrategy::InitCombatTriggers(triggers);
HunterAspectPveStrategy::InitCombatTriggers(triggers);
}

void BeastMasteryHunterAspectPveStrategy::InitNonCombatTriggers(std::list<TriggerNode*>& triggers)
{
BeastMasteryHunterAspectStrategy::InitNonCombatTriggers(triggers);
HunterAspectPveStrategy::InitNonCombatTriggers(triggers);
}

void BeastMasteryHunterAspectPvpStrategy::InitCombatTriggers(std::list<TriggerNode*>& triggers)
{
BeastMasteryHunterAspectStrategy::InitCombatTriggers(triggers);
HunterAspectPvpStrategy::InitCombatTriggers(triggers);
}

void BeastMasteryHunterAspectPvpStrategy::InitNonCombatTriggers(std::list<TriggerNode*>& triggers)
{
BeastMasteryHunterAspectStrategy::InitNonCombatTriggers(triggers);
HunterAspectPvpStrategy::InitNonCombatTriggers(triggers);
}

void BeastMasteryHunterAspectRaidStrategy::InitCombatTriggers(std::list<TriggerNode*>& triggers)
{
BeastMasteryHunterAspectStrategy::InitCombatTriggers(triggers);
HunterAspectRaidStrategy::InitCombatTriggers(triggers);
}

void BeastMasteryHunterAspectRaidStrategy::InitNonCombatTriggers(std::list<TriggerNode*>& triggers)
{
BeastMasteryHunterAspectStrategy::InitNonCombatTriggers(triggers);
HunterAspectRaidStrategy::InitNonCombatTriggers(triggers);
}

#endif
82 changes: 82 additions & 0 deletions playerbot/strategy/hunter/BeastMasteryHunterStrategy.h
Original file line number Diff line number Diff line change
Expand Up @@ -233,4 +233,86 @@ namespace ai
void InitCombatTriggers(std::list<TriggerNode*>& triggers) override;
void InitNonCombatTriggers(std::list<TriggerNode*>& triggers) override;
};

class BeastMasteryHunterStingStrategy : public HunterStingStrategy
{
public:
BeastMasteryHunterStingStrategy(PlayerbotAI* ai) : HunterStingStrategy(ai) {}

protected:
virtual void InitCombatTriggers(std::list<TriggerNode*>& triggers) override;
};

class BeastMasteryHunterStingPveStrategy : public BeastMasteryHunterStingStrategy
{
public:
BeastMasteryHunterStingPveStrategy(PlayerbotAI* ai) : BeastMasteryHunterStingStrategy(ai) {}
string getName() override { return "sting beast mastery pve"; }

private:
void InitCombatTriggers(std::list<TriggerNode*>& triggers) override;
};

class BeastMasteryHunterStingPvpStrategy : public BeastMasteryHunterStingStrategy
{
public:
BeastMasteryHunterStingPvpStrategy(PlayerbotAI* ai) : BeastMasteryHunterStingStrategy(ai) {}
string getName() override { return "sting beast mastery pvp"; }

private:
void InitCombatTriggers(std::list<TriggerNode*>& triggers) override;
};

class BeastMasteryHunterStingRaidStrategy : public BeastMasteryHunterStingStrategy
{
public:
BeastMasteryHunterStingRaidStrategy(PlayerbotAI* ai) : BeastMasteryHunterStingStrategy(ai) {}
string getName() override { return "sting beast mastery raid"; }

private:
void InitCombatTriggers(std::list<TriggerNode*>& triggers) override;
};

class BeastMasteryHunterAspectStrategy : public HunterAspectStrategy
{
public:
BeastMasteryHunterAspectStrategy(PlayerbotAI* ai) : HunterAspectStrategy(ai) {}

protected:
virtual void InitCombatTriggers(std::list<TriggerNode*>& triggers) override;
virtual void InitNonCombatTriggers(std::list<TriggerNode*>& triggers) override;
};

class BeastMasteryHunterAspectPveStrategy : public BeastMasteryHunterAspectStrategy
{
public:
BeastMasteryHunterAspectPveStrategy(PlayerbotAI* ai) : BeastMasteryHunterAspectStrategy(ai) {}
string getName() override { return "aspect beast mastery pve"; }

private:
void InitCombatTriggers(std::list<TriggerNode*>& triggers) override;
void InitNonCombatTriggers(std::list<TriggerNode*>& triggers) override;
};

class BeastMasteryHunterAspectPvpStrategy : public BeastMasteryHunterAspectStrategy
{
public:
BeastMasteryHunterAspectPvpStrategy(PlayerbotAI* ai) : BeastMasteryHunterAspectStrategy(ai) {}
string getName() override { return "aspect beast mastery pvp"; }

private:
void InitCombatTriggers(std::list<TriggerNode*>& triggers) override;
void InitNonCombatTriggers(std::list<TriggerNode*>& triggers) override;
};

class BeastMasteryHunterAspectRaidStrategy : public BeastMasteryHunterAspectStrategy
{
public:
BeastMasteryHunterAspectRaidStrategy(PlayerbotAI* ai) : BeastMasteryHunterAspectStrategy(ai) {}
string getName() override { return "aspect beast mastery raid"; }

private:
void InitCombatTriggers(std::list<TriggerNode*>& triggers) override;
void InitNonCombatTriggers(std::list<TriggerNode*>& triggers) override;
};
}
5 changes: 0 additions & 5 deletions playerbot/strategy/hunter/HunterActions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@ bool CastViperStingAction::isUseful()
return CastRangedDebuffSpellAction::isUseful() && AI_VALUE2(uint8, "mana", GetTargetName()) >= 10;
}

bool CastAspectOfTheCheetahAction::isUseful()
{
return !AI_VALUE(bool, "has attackers") && !ai->HasAnyAuraOf(GetTarget(), "aspect of the cheetah", "aspect of the pack", NULL);
}

bool FeedPetAction::Execute(Event& event)
{
Pet* pet = bot->GetPet();
Expand Down
Loading

0 comments on commit 0cc7e39

Please sign in to comment.