mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
Replaced tabs with spaces
This commit is contained in:
@@ -2934,9 +2934,9 @@ bool PlayerbotAI::HasAura(uint32 spellId, Unit const* unit)
|
||||
return unit->HasAura(spellId);
|
||||
// for (uint8 effect = EFFECT_0; effect <= EFFECT_2; effect++)
|
||||
// {
|
||||
// AuraEffect const* aurEff = unit->GetAuraEffect(spellId, effect);
|
||||
// if (IsRealAura(bot, aurEff, unit))
|
||||
// return true;
|
||||
// AuraEffect const* aurEff = unit->GetAuraEffect(spellId, effect);
|
||||
// if (IsRealAura(bot, aurEff, unit))
|
||||
// return true;
|
||||
// }
|
||||
|
||||
// return false;
|
||||
|
||||
@@ -219,9 +219,9 @@ bool PlayerbotAIConfig::Initialize()
|
||||
"531,532,534,544,548,550,564,565,580,249,533,603,615,616,624,631,649,724"),
|
||||
restrictedHealerDPSMaps);
|
||||
|
||||
//////////////////////////// ICC
|
||||
//////////////////////////// ICC
|
||||
|
||||
EnableICCBuffs = sConfigMgr->GetOption<bool>("AiPlayerbot.EnableICCBuffs", true);
|
||||
EnableICCBuffs = sConfigMgr->GetOption<bool>("AiPlayerbot.EnableICCBuffs", true);
|
||||
|
||||
//////////////////////////// CHAT
|
||||
enableBroadcasts = sConfigMgr->GetOption<bool>("AiPlayerbot.EnableBroadcasts", true);
|
||||
|
||||
@@ -475,7 +475,7 @@ void PlayerbotHolder::OnBotLogin(Player* const bot)
|
||||
}
|
||||
|
||||
Player* master = botAI->GetMaster();
|
||||
if (master)
|
||||
if (master)
|
||||
{
|
||||
ObjectGuid masterGuid = master->GetGUID();
|
||||
if (master->GetGroup() && !master->GetGroup()->IsLeader(masterGuid))
|
||||
@@ -499,7 +499,7 @@ void PlayerbotHolder::OnBotLogin(Player* const bot)
|
||||
}
|
||||
}
|
||||
|
||||
// Don't disband alt groups when master goes away
|
||||
// Don't disband alt groups when master goes away
|
||||
// Controlled by config
|
||||
if (sPlayerbotAIConfig->KeepAltsInGroup())
|
||||
{
|
||||
@@ -1130,18 +1130,18 @@ std::vector<std::string> PlayerbotHolder::HandlePlayerbotCommand(char const* arg
|
||||
int8 gender = -1; // -1 = gender will be random
|
||||
if (genderArg)
|
||||
{
|
||||
std::string g = genderArg;
|
||||
std::transform(g.begin(), g.end(), g.begin(), ::tolower);
|
||||
std::string g = genderArg;
|
||||
std::transform(g.begin(), g.end(), g.begin(), ::tolower);
|
||||
|
||||
if (g == "male" || g == "0")
|
||||
gender = GENDER_MALE; // 0
|
||||
else if (g == "female" || g == "1")
|
||||
gender = GENDER_FEMALE; // 1
|
||||
else
|
||||
{
|
||||
messages.push_back("Unknown gender : " + g + " (male/female/0/1)");
|
||||
return messages;
|
||||
}
|
||||
if (g == "male" || g == "0")
|
||||
gender = GENDER_MALE; // 0
|
||||
else if (g == "female" || g == "1")
|
||||
gender = GENDER_FEMALE; // 1
|
||||
else
|
||||
{
|
||||
messages.push_back("Unknown gender : " + g + " (male/female/0/1)");
|
||||
return messages;
|
||||
}
|
||||
} //end
|
||||
|
||||
if (claz == 6 && master->GetLevel() < sWorld->getIntConfig(CONFIG_START_HEROIC_PLAYER_LEVEL))
|
||||
@@ -1155,7 +1155,7 @@ std::vector<std::string> PlayerbotHolder::HandlePlayerbotCommand(char const* arg
|
||||
{
|
||||
// If the user requested a specific gender, skip any character that doesn't match.
|
||||
if (gender != -1 && GetOfflinePlayerGender(guid) != gender)
|
||||
continue;
|
||||
continue;
|
||||
if (botLoading.find(guid) != botLoading.end())
|
||||
continue;
|
||||
if (ObjectAccessor::FindConnectedPlayer(guid))
|
||||
|
||||
@@ -717,14 +717,14 @@ uint32 RandomPlayerbotMgr::AddRandomBots()
|
||||
|
||||
if (currentBots.size() < maxAllowedBotCount)
|
||||
{
|
||||
// Calculate how many bots to add
|
||||
// Calculate how many bots to add
|
||||
maxAllowedBotCount -= currentBots.size();
|
||||
maxAllowedBotCount = std::min(sPlayerbotAIConfig->randomBotsPerInterval, maxAllowedBotCount);
|
||||
|
||||
// Single RNG instance for all shuffling
|
||||
// Single RNG instance for all shuffling
|
||||
std::mt19937 rng(std::chrono::steady_clock::now().time_since_epoch().count());
|
||||
|
||||
// Only need to track the Alliance count, as it's in Phase 1
|
||||
// Only need to track the Alliance count, as it's in Phase 1
|
||||
uint32 totalRatio = sPlayerbotAIConfig->randomBotAllianceRatio + sPlayerbotAIConfig->randomBotHordeRatio;
|
||||
uint32 allowedAllianceCount = maxAllowedBotCount * (sPlayerbotAIConfig->randomBotAllianceRatio) / totalRatio;
|
||||
|
||||
@@ -877,17 +877,17 @@ uint32 RandomPlayerbotMgr::AddRandomBots()
|
||||
LOG_ERROR("playerbots",
|
||||
"Can't log-in all the requested bots. Try increasing RandomBotAccountCount in your conf file.\n"
|
||||
"{} more accounts needed.", moreAccountsNeeded);
|
||||
missingBotsTimer = 0; // Reset timer so error is not spammed every tick
|
||||
missingBotsTimer = 0; // Reset timer so error is not spammed every tick
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
missingBotsTimer = 0; // Reset timer if logins for this interval were successful
|
||||
missingBotsTimer = 0; // Reset timer if logins for this interval were successful
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
missingBotsTimer = 0; // Reset timer if there's enough bots
|
||||
missingBotsTimer = 0; // Reset timer if there's enough bots
|
||||
}
|
||||
|
||||
return currentBots.size();
|
||||
|
||||
@@ -2299,7 +2299,7 @@ void TravelNodeMap::printNodeStore()
|
||||
}
|
||||
}
|
||||
|
||||
sPlayerbotAIConfig->log(nodeStore, " }");
|
||||
sPlayerbotAIConfig->log(nodeStore, " }");
|
||||
sPlayerbotAIConfig->log(nodeStore, "};");
|
||||
|
||||
printf("\r [Done] \r\x3D");
|
||||
|
||||
@@ -26,18 +26,18 @@ enum StrategyType : uint32
|
||||
|
||||
// enum ActionPriority
|
||||
// {
|
||||
// ACTION_IDLE = 0,
|
||||
// ACTION_DEFAULT = 5,
|
||||
// ACTION_NORMAL = 10,
|
||||
// ACTION_HIGH = 20,
|
||||
// ACTION_MOVE = 30,
|
||||
// ACTION_INTERRUPT = 40,
|
||||
// ACTION_DISPEL = 50,
|
||||
// ACTION_RAID = 60,
|
||||
// ACTION_LIGHT_HEAL = 10,
|
||||
// ACTION_MEDIUM_HEAL = 20,
|
||||
// ACTION_CRITICAL_HEAL = 30,
|
||||
// ACTION_EMERGENCY = 90
|
||||
// ACTION_IDLE = 0,
|
||||
// ACTION_DEFAULT = 5,
|
||||
// ACTION_NORMAL = 10,
|
||||
// ACTION_HIGH = 20,
|
||||
// ACTION_MOVE = 30,
|
||||
// ACTION_INTERRUPT = 40,
|
||||
// ACTION_DISPEL = 50,
|
||||
// ACTION_RAID = 60,
|
||||
// ACTION_LIGHT_HEAL = 10,
|
||||
// ACTION_MEDIUM_HEAL = 20,
|
||||
// ACTION_CRITICAL_HEAL = 30,
|
||||
// ACTION_EMERGENCY = 90
|
||||
// };
|
||||
|
||||
static float ACTION_IDLE = 0.0f;
|
||||
|
||||
@@ -193,8 +193,8 @@ public:
|
||||
creators["calc"] = &ChatActionContext::calc;
|
||||
creators["wipe"] = &ChatActionContext::wipe;
|
||||
creators["tame"] = &ChatActionContext::tame;
|
||||
creators["glyphs"] = &ChatActionContext::glyphs; // Added for custom Glyphs
|
||||
creators["glyph equip"] = &ChatActionContext::glyph_equip; // Added for custom Glyphs
|
||||
creators["glyphs"] = &ChatActionContext::glyphs; // Added for custom Glyphs
|
||||
creators["glyph equip"] = &ChatActionContext::glyph_equip; // Added for custom Glyphs
|
||||
creators["pet"] = &ChatActionContext::pet;
|
||||
creators["pet attack"] = &ChatActionContext::pet_attack;
|
||||
creators["roll"] = &ChatActionContext::roll_action;
|
||||
@@ -305,8 +305,8 @@ private:
|
||||
static Action* calc(PlayerbotAI* ai) { return new TellCalculateItemAction(ai); }
|
||||
static Action* wipe(PlayerbotAI* ai) { return new WipeAction(ai); }
|
||||
static Action* tame(PlayerbotAI* botAI) { return new TameAction(botAI); }
|
||||
static Action* glyphs(PlayerbotAI* botAI) { return new TellGlyphsAction(botAI); } // Added for custom Glyphs
|
||||
static Action* glyph_equip(PlayerbotAI* ai) { return new EquipGlyphsAction(ai); } // Added for custom Glyphs
|
||||
static Action* glyphs(PlayerbotAI* botAI) { return new TellGlyphsAction(botAI); } // Added for custom Glyphs
|
||||
static Action* glyph_equip(PlayerbotAI* ai) { return new EquipGlyphsAction(ai); } // Added for custom Glyphs
|
||||
static Action* pet(PlayerbotAI* botAI) { return new PetAction(botAI); }
|
||||
static Action* pet_attack(PlayerbotAI* botAI) { return new PetAction(botAI, "attack"); }
|
||||
static Action* roll_action(PlayerbotAI* botAI) { return new RollAction(botAI); }
|
||||
|
||||
@@ -151,9 +151,9 @@ bool EquipGlyphsAction::Execute(Event event)
|
||||
|
||||
botAI->TellMaster("Glyphs updated.");
|
||||
|
||||
// Flag for custom glyphs
|
||||
// Flag for custom glyphs
|
||||
botAI->GetAiObjectContext()->GetValue<bool>("custom_glyphs")->Set(true);
|
||||
LOG_INFO("playerbots", "Custom Glyph Flag set to ON");
|
||||
|
||||
LOG_INFO("playerbots", "Custom Glyph Flag set to ON");
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace ai::buff
|
||||
// Mage
|
||||
if (name == "arcane intellect") return "arcane intellect,arcane brilliance";
|
||||
// Priest
|
||||
if (name == "power word: fortitude") return "power word: fortitude,prayer of fortitude";
|
||||
if (name == "power word: fortitude") return "power word: fortitude,prayer of fortitude";
|
||||
return name;
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ namespace ai::buff
|
||||
return false;
|
||||
|
||||
if (SpellInfo const* info = sSpellMgr->GetSpellInfo(spellId))
|
||||
{ for (int i = 0; i < MAX_SPELL_REAGENTS; ++i)
|
||||
{ for (int i = 0; i < MAX_SPELL_REAGENTS; ++i)
|
||||
{
|
||||
if (info->Reagent[i] > 0)
|
||||
{
|
||||
@@ -83,7 +83,7 @@ namespace ai::buff
|
||||
bool announceOnMissing,
|
||||
std::function<void(std::string const&)> announce)
|
||||
{
|
||||
std::string castName = baseName; Group* g = bot->GetGroup();
|
||||
std::string castName = baseName; Group* g = bot->GetGroup();
|
||||
if (!g || g->GetMembersCount() < static_cast<uint32>(sPlayerbotAIConfig->minBotsForGreaterBuff))
|
||||
return castName; // Group too small: stay in solo mode
|
||||
|
||||
|
||||
@@ -237,8 +237,8 @@ bool BuffOnPartyAction::Execute(Event event)
|
||||
{
|
||||
std::string castName = spell; // default = mono
|
||||
|
||||
auto SendGroupRP = ai::chat::MakeGroupAnnouncer(bot);
|
||||
castName = ai::buff::UpgradeToGroupIfAppropriate(bot, botAI, castName, /*announceOnMissing=*/true, SendGroupRP);
|
||||
auto SendGroupRP = ai::chat::MakeGroupAnnouncer(bot);
|
||||
castName = ai::buff::UpgradeToGroupIfAppropriate(bot, botAI, castName, /*announceOnMissing=*/true, SendGroupRP);
|
||||
|
||||
return botAI->CastSpell(castName, GetTarget());
|
||||
}
|
||||
|
||||
@@ -30,8 +30,8 @@ bool PartyCommandAction::Execute(Event event)
|
||||
Player* master = GetMaster();
|
||||
if (master && member == master->GetName())
|
||||
return Leave(bot);
|
||||
|
||||
botAI->Reset();
|
||||
|
||||
botAI->Reset();
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -64,8 +64,8 @@ bool UninviteAction::Execute(Event event)
|
||||
if (bot->GetGUID() == guid)
|
||||
return Leave(bot);
|
||||
}
|
||||
|
||||
botAI->Reset();
|
||||
|
||||
botAI->Reset();
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -162,8 +162,8 @@ bool LeaveFarAwayAction::isUseful()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
botAI->Reset();
|
||||
|
||||
botAI->Reset();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ uint32 LfgJoinAction::GetRoles()
|
||||
|
||||
default:
|
||||
return PLAYER_ROLE_DAMAGE;
|
||||
break;
|
||||
break;
|
||||
}
|
||||
|
||||
return PLAYER_ROLE_DAMAGE;
|
||||
@@ -317,8 +317,8 @@ bool LfgJoinAction::isUseful()
|
||||
|
||||
if (bot->GetLevel() < 15)
|
||||
return false;
|
||||
|
||||
// don't use if active player master
|
||||
|
||||
// don't use if active player master
|
||||
if (GET_PLAYERBOT_AI(bot)->IsRealPlayer())
|
||||
return false;
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ bool UseMeetingStoneAction::Execute(Event event)
|
||||
|
||||
GameObjectTemplate const* goInfo = gameObject->GetGOInfo();
|
||||
if (!goInfo || goInfo->entry != 179944)
|
||||
return false;
|
||||
return false;
|
||||
|
||||
return Teleport(master, bot);
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ public:
|
||||
// creators["icy clutch"] = &icy_clutch;
|
||||
creators["horn of winter"] = &horn_of_winter;
|
||||
creators["killing machine"] = &killing_machine; // buff
|
||||
// creators["deathchill"] = &deathchill; //boost
|
||||
// creators["deathchill"] = &deathchill; //boost
|
||||
creators["icebound fortitude"] = &icebound_fortitude;
|
||||
// creators["mind freeze"] = &mind_freeze; interrupt
|
||||
// creators["empower rune weapon"] = &empower_rune_weapon; boost
|
||||
@@ -193,8 +193,8 @@ void GenericDKStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
new NextAction("pestilence", ACTION_NORMAL + 4),
|
||||
new NextAction("blood boil", ACTION_NORMAL + 3), nullptr)));
|
||||
// triggers.push_back(new TriggerNode("light aoe", NextAction::array(0,
|
||||
// new NextAction("pestilence", ACTION_NORMAL + 4),
|
||||
// nullptr)));
|
||||
// new NextAction("pestilence", ACTION_NORMAL + 4),
|
||||
// nullptr)));
|
||||
triggers.push_back(
|
||||
new TriggerNode("pestilence glyph", NextAction::array(0, new NextAction("pestilence", ACTION_HIGH + 9), NULL)));
|
||||
}
|
||||
|
||||
@@ -93,13 +93,13 @@ void ChatCommandHandlerStrategy::InitTriggers(std::vector<TriggerNode*>& trigger
|
||||
triggers.push_back(
|
||||
new TriggerNode("disperse", NextAction::array(0, new NextAction("disperse set", relevance), NULL)));
|
||||
triggers.push_back(
|
||||
new TriggerNode("open items", NextAction::array(0, new NextAction("open items", relevance), nullptr)));
|
||||
new TriggerNode("open items", NextAction::array(0, new NextAction("open items", relevance), nullptr)));
|
||||
triggers.push_back(
|
||||
new TriggerNode("qi", NextAction::array(0, new NextAction("query item usage", relevance), nullptr)));
|
||||
triggers.push_back(
|
||||
new TriggerNode("unlock items", NextAction::array(0, new NextAction("unlock items", relevance), nullptr)));
|
||||
new TriggerNode("unlock items", NextAction::array(0, new NextAction("unlock items", relevance), nullptr)));
|
||||
triggers.push_back(
|
||||
new TriggerNode("unlock traded item", NextAction::array(0, new NextAction("unlock traded item", relevance), nullptr)));
|
||||
new TriggerNode("unlock traded item", NextAction::array(0, new NextAction("unlock traded item", relevance), nullptr)));
|
||||
triggers.push_back(
|
||||
new TriggerNode("wipe", NextAction::array(0, new NextAction("wipe", relevance), nullptr)));
|
||||
triggers.push_back(new TriggerNode("tame", NextAction::array(0, new NextAction("tame", relevance), nullptr)));
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
#include "Config.h"
|
||||
#include "Group.h"
|
||||
#include "ObjectAccessor.h"
|
||||
|
||||
|
||||
using ai::buff::MakeAuraQualifierForBuff;
|
||||
using ai::buff::UpgradeToGroupIfAppropriate;
|
||||
|
||||
@@ -164,7 +164,7 @@ inline std::string const GetActualBlessingOfSanctuary(Unit* target, Player* bot)
|
||||
Value<Unit*>* CastBlessingOnPartyAction::GetTargetValue()
|
||||
{
|
||||
|
||||
return context->GetValue<Unit*>("party member without aura", MakeAuraQualifierForBuff(spell));
|
||||
return context->GetValue<Unit*>("party member without aura", MakeAuraQualifierForBuff(spell));
|
||||
}
|
||||
|
||||
bool CastBlessingOfMightAction::Execute(Event event)
|
||||
@@ -173,7 +173,7 @@ bool CastBlessingOfMightAction::Execute(Event event)
|
||||
if (!target)
|
||||
return false;
|
||||
|
||||
std::string castName = GetActualBlessingOfMight(target);
|
||||
std::string castName = GetActualBlessingOfMight(target);
|
||||
auto RP = ai::chat::MakeGroupAnnouncer(bot);
|
||||
|
||||
castName = ai::buff::UpgradeToGroupIfAppropriate(bot, botAI, castName, /*announceOnMissing=*/true, RP);
|
||||
@@ -182,7 +182,7 @@ bool CastBlessingOfMightAction::Execute(Event event)
|
||||
|
||||
Value<Unit*>* CastBlessingOfMightOnPartyAction::GetTargetValue()
|
||||
{
|
||||
return context->GetValue<Unit*>(
|
||||
return context->GetValue<Unit*>(
|
||||
"party member without aura",
|
||||
"blessing of might,greater blessing of might,blessing of wisdom,greater blessing of wisdom,blessing of sanctuary,greater blessing of sanctuary"
|
||||
);
|
||||
@@ -207,7 +207,7 @@ bool CastBlessingOfWisdomAction::Execute(Event event)
|
||||
if (!target)
|
||||
return false;
|
||||
|
||||
std::string castName = GetActualBlessingOfWisdom(target);
|
||||
std::string castName = GetActualBlessingOfWisdom(target);
|
||||
auto RP = ai::chat::MakeGroupAnnouncer(bot);
|
||||
|
||||
castName = ai::buff::UpgradeToGroupIfAppropriate(bot, botAI, castName, /*announceOnMissing=*/true, RP);
|
||||
@@ -216,7 +216,7 @@ bool CastBlessingOfWisdomAction::Execute(Event event)
|
||||
|
||||
Value<Unit*>* CastBlessingOfWisdomOnPartyAction::GetTargetValue()
|
||||
{
|
||||
return context->GetValue<Unit*>(
|
||||
return context->GetValue<Unit*>(
|
||||
"party member without aura",
|
||||
"blessing of wisdom,greater blessing of wisdom,blessing of might,greater blessing of might,blessing of sanctuary,greater blessing of sanctuary"
|
||||
);
|
||||
@@ -253,7 +253,7 @@ bool CastBlessingOfWisdomOnPartyAction::Execute(Event event)
|
||||
|
||||
Value<Unit*>* CastBlessingOfSanctuaryOnPartyAction::GetTargetValue()
|
||||
{
|
||||
return context->GetValue<Unit*>(
|
||||
return context->GetValue<Unit*>(
|
||||
"party member without aura",
|
||||
"blessing of sanctuary,greater blessing of sanctuary"
|
||||
);
|
||||
@@ -407,7 +407,7 @@ bool CastBlessingOfKingsOnPartyAction::Execute(Event event)
|
||||
Player* targetPlayer = target->ToPlayer();
|
||||
if (targetPlayer && !g->IsMember(targetPlayer->GetGUID()))
|
||||
return false;
|
||||
|
||||
|
||||
const bool hasBmana = botAI->HasStrategy("bmana", BOT_STATE_NON_COMBAT);
|
||||
const bool hasBstats = botAI->HasStrategy("bstats", BOT_STATE_NON_COMBAT);
|
||||
|
||||
@@ -422,7 +422,7 @@ bool CastBlessingOfKingsOnPartyAction::Execute(Event event)
|
||||
|
||||
if (targetPlayer)
|
||||
{
|
||||
const bool isTank = IsTankRole(targetPlayer);
|
||||
const bool isTank = IsTankRole(targetPlayer);
|
||||
const bool hasSanctFromMe =
|
||||
target->HasAura(SPELL_BLESSING_OF_SANCTUARY, bot->GetGUID()) ||
|
||||
target->HasAura(SPELL_GREATER_BLESSING_OF_SANCTUARY, bot->GetGUID());
|
||||
@@ -453,7 +453,7 @@ bool CastBlessingOfKingsOnPartyAction::Execute(Event event)
|
||||
if (allowGreater && hasBstats && targetPlayer)
|
||||
{
|
||||
switch (targetPlayer->getClass())
|
||||
{
|
||||
{
|
||||
case CLASS_WARRIOR:
|
||||
case CLASS_PALADIN:
|
||||
case CLASS_DRUID:
|
||||
@@ -470,7 +470,7 @@ bool CastBlessingOfKingsOnPartyAction::Execute(Event event)
|
||||
auto RP = ai::chat::MakeGroupAnnouncer(bot);
|
||||
castName = ai::buff::UpgradeToGroupIfAppropriate(bot, botAI, castName, /*announceOnMissing=*/true, RP);
|
||||
}
|
||||
|
||||
|
||||
return botAI->CastSpell(castName, target);
|
||||
}
|
||||
|
||||
|
||||
@@ -142,7 +142,7 @@ public:
|
||||
|
||||
std::string const getName() override { return "blessing of kings on party"; }
|
||||
Value<Unit*>* GetTargetValue() override; // added for Sanctuary priority
|
||||
bool Execute(Event event) override; // added for 2 paladins logic
|
||||
bool Execute(Event event) override; // added for 2 paladins logic
|
||||
};
|
||||
|
||||
class CastBlessingOfSanctuaryAction : public CastBuffSpellAction
|
||||
|
||||
@@ -11,7 +11,7 @@ void PaladinBuffManaStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
triggers.push_back(new TriggerNode("blessing of wisdom on party",
|
||||
NextAction::array(0, new NextAction("blessing of wisdom on party", 11.0f), NULL)));
|
||||
|
||||
|
||||
triggers.push_back(new TriggerNode("blessing of kings on party",
|
||||
NextAction::array(0, new NextAction("blessing of kings on party", 10.5f), NULL)));
|
||||
}
|
||||
@@ -85,7 +85,7 @@ void PaladinBuffThreatStrategy::InitTriggers(std::vector<TriggerNode*>& triggers
|
||||
}
|
||||
|
||||
void PaladinBuffStatsStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
{
|
||||
// First Sanctuary (prio > Kings)
|
||||
triggers.push_back(
|
||||
new TriggerNode("blessing of sanctuary on party",
|
||||
|
||||
@@ -27,8 +27,8 @@ void HealPriestStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
// NextAction::array(0, new NextAction("reach spell", ACTION_NORMAL + 9), NULL)));
|
||||
|
||||
// triggers.push_back(new TriggerNode(
|
||||
// "medium aoe heal",
|
||||
// NextAction::array(0,
|
||||
// "medium aoe heal",
|
||||
// NextAction::array(0,
|
||||
// new NextAction("circle of healing on party", ACTION_MEDIUM_HEAL + 8),
|
||||
// // new NextAction("power word: shield on almost full health below", ACTION_MEDIUM_HEAL + 7),
|
||||
// NULL)));
|
||||
|
||||
@@ -143,13 +143,13 @@ float ThaddiusGenericMultiplier::GetValue(Action* action)
|
||||
// // if (curr_phase == 2 && bot->GetPositionZ() > 312.5f && dynamic_cast<MovementAction*>(action)) {
|
||||
// if (curr_phase == 2 && (curr_timer % 20000 >= 18000 || curr_timer % 20000 <= 2000) &&
|
||||
// dynamic_cast<MovementAction*>(action)) {
|
||||
// // MotionMaster *mm = bot->GetMotionMaster();
|
||||
// // mm->Clear();
|
||||
// return 0.0f;
|
||||
// // MotionMaster *mm = bot->GetMotionMaster();
|
||||
// // mm->Clear();
|
||||
// return 0.0f;
|
||||
// }
|
||||
// thaddius phase
|
||||
// if (curr_phase == 8 && dynamic_cast<FleeAction*>(action)) {
|
||||
// return 0.0f;
|
||||
// return 0.0f;
|
||||
// }
|
||||
return 1.0f;
|
||||
}
|
||||
@@ -262,23 +262,23 @@ float FourhorsemanGenericMultiplier::GetValue(Action* action)
|
||||
|
||||
// float GothikGenericMultiplier::GetValue(Action* action)
|
||||
// {
|
||||
// Unit* boss = AI_VALUE2(Unit*, "find target", "gothik the harvester");
|
||||
// if (!boss) {
|
||||
// Unit* boss = AI_VALUE2(Unit*, "find target", "gothik the harvester");
|
||||
// if (!boss) {
|
||||
// return 1.0f;
|
||||
// }
|
||||
// BossAI* boss_ai = dynamic_cast<BossAI*>(boss->GetAI());
|
||||
// EventMap* eventMap = boss_botAI->GetEvents();
|
||||
// BossAI* boss_ai = dynamic_cast<BossAI*>(boss->GetAI());
|
||||
// EventMap* eventMap = boss_botAI->GetEvents();
|
||||
// uint32 curr_phase = eventMap->GetPhaseMask();
|
||||
// if (curr_phase == 1 && (dynamic_cast<FollowAction*>(action))) {
|
||||
// return 0.0f;
|
||||
// }
|
||||
// if (curr_phase == 1 && (dynamic_cast<AttackAction*>(action))) {
|
||||
// Unit* target = action->GetTarget();
|
||||
// if (target == boss) {
|
||||
// return 0.0f;
|
||||
// }
|
||||
// }
|
||||
// return 1.0f;
|
||||
// if (curr_phase == 1 && (dynamic_cast<FollowAction*>(action))) {
|
||||
// return 0.0f;
|
||||
// }
|
||||
// if (curr_phase == 1 && (dynamic_cast<AttackAction*>(action))) {
|
||||
// Unit* target = action->GetTarget();
|
||||
// if (target == boss) {
|
||||
// return 0.0f;
|
||||
// }
|
||||
// }
|
||||
// return 1.0f;
|
||||
// }
|
||||
|
||||
float GluthGenericMultiplier::GetValue(Action* action)
|
||||
|
||||
@@ -51,8 +51,8 @@ void GenericRogueNonCombatStrategy::InitTriggers(std::vector<TriggerNode*>& trig
|
||||
NextAction::array(0, new NextAction("use deadly poison on off hand", 19.0f), NULL)));
|
||||
|
||||
// triggers.push_back(new TriggerNode(
|
||||
// "off hand weapon no enchant",
|
||||
// NextAction::array(0, new NextAction("use instant poison", 18.0f), NULL)));
|
||||
// "off hand weapon no enchant",
|
||||
// NextAction::array(0, new NextAction("use instant poison", 18.0f), NULL)));
|
||||
|
||||
triggers.push_back(new TriggerNode("often", NextAction::array(0, new NextAction("unstealth", 30.0f), NULL)));
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ WorldLocation ArrowFormation::GetLocationInternal()
|
||||
offset += rangedLines * sPlayerbotAIConfig->followDistance;
|
||||
healers.PlaceUnits(&placer);
|
||||
healers.Move(-cos(orientation) * offset, -sin(orientation) * offset);
|
||||
|
||||
|
||||
if (!masterUnit || !botUnit)
|
||||
return Formation::NullLocation;
|
||||
|
||||
@@ -98,7 +98,7 @@ void ArrowFormation::FillSlotsExceptMaster()
|
||||
else if (member != botAI->GetMaster())
|
||||
FindSlot(member)->AddLast(new FormationUnit(index, false));
|
||||
++index;
|
||||
}
|
||||
}
|
||||
gref = gref->next();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -160,7 +160,7 @@ public:
|
||||
creators["my attacker count"] = &ValueContext::my_attacker_count;
|
||||
creators["has aggro"] = &ValueContext::has_aggro;
|
||||
creators["mounted"] = &ValueContext::mounted;
|
||||
creators["custom_glyphs"] = &ValueContext::custom_glyphs; // Added for custom glyphs
|
||||
creators["custom_glyphs"] = &ValueContext::custom_glyphs; // Added for custom glyphs
|
||||
|
||||
creators["can loot"] = &ValueContext::can_loot;
|
||||
creators["loot target"] = &ValueContext::loot_target;
|
||||
@@ -555,7 +555,7 @@ private:
|
||||
static UntypedValue* last_flee_angle(PlayerbotAI* ai) { return new LastFleeAngleValue(ai); }
|
||||
static UntypedValue* last_flee_timestamp(PlayerbotAI* ai) { return new LastFleeTimestampValue(ai); }
|
||||
static UntypedValue* recently_flee_info(PlayerbotAI* ai) { return new RecentlyFleeInfo(ai); }
|
||||
// -------------------------------------------------------
|
||||
// -------------------------------------------------------
|
||||
// Flag for cutom glyphs : true when /w bot glyph equip
|
||||
// -------------------------------------------------------
|
||||
static UntypedValue* custom_glyphs(PlayerbotAI* ai)
|
||||
|
||||
Reference in New Issue
Block a user