mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
PremadeSpecGlyph config (unimplemented)
This commit is contained in:
8
.github/workflows/core-build.yml
vendored
8
.github/workflows/core-build.yml
vendored
@@ -1,6 +1,6 @@
|
||||
# This starter workflow is for a CMake project running on multiple platforms. There is a different starter workflow if you just want a single platform.
|
||||
# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-single-platform.yml
|
||||
name: CMake on multiple platforms
|
||||
name: ubuntu-build
|
||||
|
||||
on:
|
||||
push:
|
||||
@@ -24,7 +24,11 @@ jobs:
|
||||
c_compiler: gcc
|
||||
cpp_compiler: g++
|
||||
build_type: Release
|
||||
|
||||
- os: ubuntu-latest
|
||||
c_compiler: gcc
|
||||
cpp_compiler: g++
|
||||
build_type: Release
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
name: ${{ matrix.os }}-${{ matrix.cpp_compiler }}
|
||||
|
||||
|
||||
@@ -172,6 +172,16 @@ bool PlayerbotAIConfig::Initialize()
|
||||
std::ostringstream os;
|
||||
os << "AiPlayerbot.PremadeSpecName." << cls << "." << spec;
|
||||
premadeSpecName[cls][spec] = sConfigMgr->GetOption<std::string>(os.str().c_str(), "", false);
|
||||
os.str("");
|
||||
os.clear();
|
||||
os << "AiPlayerbot.PremadeSpecGlyph." << cls << "." << spec;
|
||||
premadeSpecGlyph[cls][spec] = sConfigMgr->GetOption<std::string>(os.str().c_str(), "", false);
|
||||
std::vector<std::string> splitSpecGlyph = split(premadeSpecGlyph[cls][spec], ',');
|
||||
for (std::string &split : splitSpecGlyph) {
|
||||
if (split.size() != 0) {
|
||||
parsedSpecGlyph[cls][spec].push_back(atoi(split.c_str()));
|
||||
}
|
||||
}
|
||||
for (uint32 level = 0; level < MAX_LEVEL; ++level) {
|
||||
std::ostringstream os;
|
||||
os << "AiPlayerbot.PremadeSpecLink." << cls << "." << spec << "." << level;
|
||||
|
||||
@@ -97,6 +97,8 @@ class PlayerbotAIConfig
|
||||
// ClassSpecs classSpecs[MAX_CLASSES];
|
||||
|
||||
std::string premadeSpecName[MAX_CLASSES][MAX_SPECNO];
|
||||
std::string premadeSpecGlyph[MAX_CLASSES][MAX_SPECNO];
|
||||
std::vector<uint32> parsedSpecGlyph[MAX_CLASSES][MAX_SPECNO];
|
||||
std::string premadeSpecLink[MAX_CLASSES][MAX_SPECNO][MAX_LEVEL];
|
||||
std::vector<std::vector<uint32>> parsedSpecLinkOrder[MAX_CLASSES][MAX_SPECNO][MAX_LEVEL];
|
||||
uint32 randomClassSpecProb[MAX_CLASSES][MAX_SPECNO];
|
||||
|
||||
@@ -33,7 +33,7 @@ uint32 LfgJoinAction::GetRoles()
|
||||
case CLASS_DRUID:
|
||||
if (spec == 2)
|
||||
return PLAYER_ROLE_HEALER;
|
||||
else if (spec == 1 && bot->getLevel() >= 20)
|
||||
else if (spec == 1)
|
||||
return (PLAYER_ROLE_TANK | PLAYER_ROLE_DAMAGE);
|
||||
else
|
||||
return PLAYER_ROLE_DAMAGE;
|
||||
|
||||
@@ -36,7 +36,7 @@ bool LootRollAction::Execute(Event event)
|
||||
{
|
||||
case ITEM_CLASS_WEAPON:
|
||||
case ITEM_CLASS_ARMOR:
|
||||
if (usage == ITEM_USAGE_EQUIP || usage == ITEM_USAGE_REPLACE) {
|
||||
if (usage == ITEM_USAGE_EQUIP || usage == ITEM_USAGE_REPLACE || usage == ITEM_USAGE_BAD_EQUIP) {
|
||||
vote = NEED;
|
||||
}
|
||||
else if (usage != ITEM_USAGE_NONE) {
|
||||
|
||||
@@ -18,6 +18,7 @@ class ShadowPriestStrategyActionNodeFactory : public NamedObjectFactory<ActionNo
|
||||
creators["mind blast"] = &mind_blast;
|
||||
creators["dispersion"] = &dispersion;
|
||||
creators["mind flay"] = &mind_flay;
|
||||
creators["smite"] = &smite;
|
||||
}
|
||||
|
||||
private:
|
||||
@@ -32,10 +33,19 @@ class ShadowPriestStrategyActionNodeFactory : public NamedObjectFactory<ActionNo
|
||||
static ActionNode* mind_flay(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("mind flay",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ NextAction::array(0, new NextAction("smite"), nullptr),
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* smite(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("smite",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ NextAction::array(0, new NextAction("shoot"), nullptr),
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* dispersion(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("dispersion",
|
||||
|
||||
Reference in New Issue
Block a user