mirror of
https://github.com/liyunfan1223/mod-playerbots.git
synced 2026-02-21 02:20:00 +01:00
Compare commits
8 Commits
b0f3de65f5
...
c3eecc0d7c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c3eecc0d7c | ||
|
|
7ff56dfd07 | ||
|
|
873767db7c | ||
|
|
03a56405f5 | ||
|
|
6f79193d7a | ||
|
|
34ce17fb3a | ||
|
|
e525c22d85 | ||
|
|
b9dbfe9646 |
@ -159,6 +159,9 @@ AiPlayerbot.RandomBotGuildNearby = 0
|
|||||||
# Number of guilds created by randombots
|
# Number of guilds created by randombots
|
||||||
AiPlayerbot.RandomBotGuildCount = 20
|
AiPlayerbot.RandomBotGuildCount = 20
|
||||||
|
|
||||||
|
# Maximum number of members in randombot guilds (minimum is hardcoded to 10)
|
||||||
|
AiPlayerbot.RandomBotGuildSizeMax = 15
|
||||||
|
|
||||||
# Delete all randombot guilds if set to 1
|
# Delete all randombot guilds if set to 1
|
||||||
AiPlayerbot.DeleteRandomBotGuilds = 0
|
AiPlayerbot.DeleteRandomBotGuilds = 0
|
||||||
|
|
||||||
|
|||||||
@ -295,7 +295,7 @@ void AiFactory::AddDefaultCombatStrategies(Player* player, PlayerbotAI* const fa
|
|||||||
{
|
{
|
||||||
engine->addStrategiesNoInit("dps", "shadow debuff", "shadow aoe", nullptr);
|
engine->addStrategiesNoInit("dps", "shadow debuff", "shadow aoe", nullptr);
|
||||||
}
|
}
|
||||||
else if (tab == PRIEST_TAB_DISIPLINE)
|
else if (tab == PRIEST_TAB_DISCIPLINE)
|
||||||
{
|
{
|
||||||
engine->addStrategiesNoInit("heal", nullptr);
|
engine->addStrategiesNoInit("heal", nullptr);
|
||||||
}
|
}
|
||||||
@ -607,7 +607,7 @@ void AiFactory::AddDefaultNonCombatStrategies(Player* player, PlayerbotAI* const
|
|||||||
nonCombatEngine->addStrategy("dps assist", false);
|
nonCombatEngine->addStrategy("dps assist", false);
|
||||||
break;
|
break;
|
||||||
case CLASS_WARLOCK:
|
case CLASS_WARLOCK:
|
||||||
if (tab == WARLOCK_TAB_AFFLICATION)
|
if (tab == WARLOCK_TAB_AFFLICTION)
|
||||||
{
|
{
|
||||||
nonCombatEngine->addStrategiesNoInit("felhunter", "spellstone", nullptr);
|
nonCombatEngine->addStrategiesNoInit("felhunter", "spellstone", nullptr);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2085,7 +2085,7 @@ bool PlayerbotAI::IsHeal(Player* player, bool bySpec)
|
|||||||
switch (player->getClass())
|
switch (player->getClass())
|
||||||
{
|
{
|
||||||
case CLASS_PRIEST:
|
case CLASS_PRIEST:
|
||||||
if (tab == PRIEST_TAB_DISIPLINE || tab == PRIEST_TAB_HOLY)
|
if (tab == PRIEST_TAB_DISCIPLINE || tab == PRIEST_TAB_HOLY)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -276,7 +276,7 @@ enum BotRoles : uint8
|
|||||||
|
|
||||||
enum HUNTER_TABS
|
enum HUNTER_TABS
|
||||||
{
|
{
|
||||||
HUNTER_TAB_BEASTMASTER,
|
HUNTER_TAB_BEASTMASTERY,
|
||||||
HUNTER_TAB_MARKSMANSHIP,
|
HUNTER_TAB_MARKSMANSHIP,
|
||||||
HUNTER_TAB_SURVIVAL,
|
HUNTER_TAB_SURVIVAL,
|
||||||
};
|
};
|
||||||
@ -285,12 +285,12 @@ enum ROGUE_TABS
|
|||||||
{
|
{
|
||||||
ROGUE_TAB_ASSASSINATION,
|
ROGUE_TAB_ASSASSINATION,
|
||||||
ROGUE_TAB_COMBAT,
|
ROGUE_TAB_COMBAT,
|
||||||
ROGUE_TAB_SUBTLETY
|
ROGUE_TAB_SUBTLETY,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum PRIEST_TABS
|
enum PRIEST_TABS
|
||||||
{
|
{
|
||||||
PRIEST_TAB_DISIPLINE,
|
PRIEST_TAB_DISCIPLINE,
|
||||||
PRIEST_TAB_HOLY,
|
PRIEST_TAB_HOLY,
|
||||||
PRIEST_TAB_SHADOW,
|
PRIEST_TAB_SHADOW,
|
||||||
};
|
};
|
||||||
@ -332,7 +332,7 @@ enum PALADIN_TABS
|
|||||||
|
|
||||||
enum WARLOCK_TABS
|
enum WARLOCK_TABS
|
||||||
{
|
{
|
||||||
WARLOCK_TAB_AFFLICATION,
|
WARLOCK_TAB_AFFLICTION,
|
||||||
WARLOCK_TAB_DEMONOLOGY,
|
WARLOCK_TAB_DEMONOLOGY,
|
||||||
WARLOCK_TAB_DESTRUCTION,
|
WARLOCK_TAB_DESTRUCTION,
|
||||||
};
|
};
|
||||||
|
|||||||
@ -509,6 +509,7 @@ bool PlayerbotAIConfig::Initialize()
|
|||||||
randomBotAccountCount = sConfigMgr->GetOption<int32>("AiPlayerbot.RandomBotAccountCount", 0);
|
randomBotAccountCount = sConfigMgr->GetOption<int32>("AiPlayerbot.RandomBotAccountCount", 0);
|
||||||
deleteRandomBotAccounts = sConfigMgr->GetOption<bool>("AiPlayerbot.DeleteRandomBotAccounts", false);
|
deleteRandomBotAccounts = sConfigMgr->GetOption<bool>("AiPlayerbot.DeleteRandomBotAccounts", false);
|
||||||
randomBotGuildCount = sConfigMgr->GetOption<int32>("AiPlayerbot.RandomBotGuildCount", 20);
|
randomBotGuildCount = sConfigMgr->GetOption<int32>("AiPlayerbot.RandomBotGuildCount", 20);
|
||||||
|
randomBotGuildSizeMax = sConfigMgr->GetOption<int32>("AiPlayerbot.RandomBotGuildSizeMax", 15);
|
||||||
deleteRandomBotGuilds = sConfigMgr->GetOption<bool>("AiPlayerbot.DeleteRandomBotGuilds", false);
|
deleteRandomBotGuilds = sConfigMgr->GetOption<bool>("AiPlayerbot.DeleteRandomBotGuilds", false);
|
||||||
|
|
||||||
guildTaskEnabled = sConfigMgr->GetOption<bool>("AiPlayerbot.EnableGuildTasks", true);
|
guildTaskEnabled = sConfigMgr->GetOption<bool>("AiPlayerbot.EnableGuildTasks", true);
|
||||||
|
|||||||
@ -267,7 +267,7 @@ public:
|
|||||||
uint32 randomBotAccountCount;
|
uint32 randomBotAccountCount;
|
||||||
bool randomBotRandomPassword;
|
bool randomBotRandomPassword;
|
||||||
bool deleteRandomBotAccounts;
|
bool deleteRandomBotAccounts;
|
||||||
uint32 randomBotGuildCount;
|
uint32 randomBotGuildCount, randomBotGuildSizeMax;
|
||||||
bool deleteRandomBotGuilds;
|
bool deleteRandomBotGuilds;
|
||||||
std::vector<uint32> randomBotGuilds;
|
std::vector<uint32> randomBotGuilds;
|
||||||
std::vector<uint32> pvpProhibitedZoneIds;
|
std::vector<uint32> pvpProhibitedZoneIds;
|
||||||
|
|||||||
@ -3992,7 +3992,7 @@ void PlayerbotFactory::InitGuild()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (guild->GetMemberSize() < urand(10, 15))
|
if (guild->GetMemberSize() < urand(10, sPlayerbotAIConfig->randomBotGuildSizeMax))
|
||||||
guild->AddMember(bot->GetGUID(), urand(GR_OFFICER, GR_INITIATE));
|
guild->AddMember(bot->GetGUID(), urand(GR_OFFICER, GR_INITIATE));
|
||||||
|
|
||||||
// add guild tabard
|
// add guild tabard
|
||||||
|
|||||||
@ -184,7 +184,7 @@ void StatsWeightCalculator::GenerateBasicWeights(Player* player)
|
|||||||
stats_weights_[STATS_TYPE_MELEE_DPS] += 0.01f;
|
stats_weights_[STATS_TYPE_MELEE_DPS] += 0.01f;
|
||||||
stats_weights_[STATS_TYPE_RANGED_DPS] += 0.01f;
|
stats_weights_[STATS_TYPE_RANGED_DPS] += 0.01f;
|
||||||
|
|
||||||
if (cls == CLASS_HUNTER && (tab == HUNTER_TAB_BEASTMASTER || tab == HUNTER_TAB_SURVIVAL))
|
if (cls == CLASS_HUNTER && (tab == HUNTER_TAB_BEASTMASTERY || tab == HUNTER_TAB_SURVIVAL))
|
||||||
{
|
{
|
||||||
stats_weights_[STATS_TYPE_AGILITY] += 2.5f;
|
stats_weights_[STATS_TYPE_AGILITY] += 2.5f;
|
||||||
stats_weights_[STATS_TYPE_ATTACK_POWER] += 1.0f;
|
stats_weights_[STATS_TYPE_ATTACK_POWER] += 1.0f;
|
||||||
|
|||||||
@ -152,13 +152,9 @@ bool CheckMountStateAction::Execute(Event /*event*/)
|
|||||||
|
|
||||||
bool inBattleground = bot->InBattleground();
|
bool inBattleground = bot->InBattleground();
|
||||||
|
|
||||||
// If there is a master and bot not in BG
|
// If there is a master and bot not in BG, follow master's mount state regardless of group leader
|
||||||
if (master && !inBattleground)
|
if (master && !inBattleground)
|
||||||
{
|
{
|
||||||
Group* group = bot->GetGroup();
|
|
||||||
if (!group || group->GetLeaderGUID() != master->GetGUID())
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if (ShouldFollowMasterMountState(master, noAttackers, shouldMount))
|
if (ShouldFollowMasterMountState(master, noAttackers, shouldMount))
|
||||||
return Mount();
|
return Mount();
|
||||||
|
|
||||||
|
|||||||
@ -30,7 +30,7 @@ class PullPowerSparkAction : public CastSpellAction
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
PullPowerSparkAction(PlayerbotAI* botAI, std::string const name = "pull power spark")
|
PullPowerSparkAction(PlayerbotAI* botAI, std::string const name = "pull power spark")
|
||||||
: CastSpellAction(botAI, "death grip") {}
|
: CastSpellAction(botAI, name) {}
|
||||||
bool Execute(Event event) override;
|
bool Execute(Event event) override;
|
||||||
bool isPossible() override;
|
bool isPossible() override;
|
||||||
bool isUseful() override;
|
bool isUseful() override;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user