mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
[Avoid aoe] Tell when avoid aoe configuration
This commit is contained in:
@@ -325,6 +325,10 @@ AiPlayerbot.SaveManaThreshold = 60
|
|||||||
# Default: 0 (disable)
|
# Default: 0 (disable)
|
||||||
AiPlayerbot.AutoAvoidAoe = 0
|
AiPlayerbot.AutoAvoidAoe = 0
|
||||||
|
|
||||||
|
# Tell which spell is avoiding (experimental)
|
||||||
|
# Default: 1 (enable)
|
||||||
|
AiPlayerbot.TellWhenAvoidAoe = 1
|
||||||
|
|
||||||
# Random bot default strategies (applied after defaults)
|
# Random bot default strategies (applied after defaults)
|
||||||
AiPlayerbot.RandomBotCombatStrategies = "+dps,+dps assist,-threat"
|
AiPlayerbot.RandomBotCombatStrategies = "+dps,+dps assist,-threat"
|
||||||
# AiPlayerbot.RandomBotNonCombatStrategies = "+grind,+loot,+rpg,+custom::say"
|
# AiPlayerbot.RandomBotNonCombatStrategies = "+grind,+loot,+rpg,+custom::say"
|
||||||
|
|||||||
@@ -92,6 +92,7 @@ bool PlayerbotAIConfig::Initialize()
|
|||||||
autoSaveMana = sConfigMgr->GetOption<bool>("AiPlayerbot.AutoSaveMana", true);
|
autoSaveMana = sConfigMgr->GetOption<bool>("AiPlayerbot.AutoSaveMana", true);
|
||||||
saveManaThreshold = sConfigMgr->GetOption<int32>("AiPlayerbot.SaveManaThreshold", 60);
|
saveManaThreshold = sConfigMgr->GetOption<int32>("AiPlayerbot.SaveManaThreshold", 60);
|
||||||
autoAvoidAoe = sConfigMgr->GetOption<bool>("AiPlayerbot.AutoAvoidAoe", false);
|
autoAvoidAoe = sConfigMgr->GetOption<bool>("AiPlayerbot.AutoAvoidAoe", false);
|
||||||
|
tellWhenAvoidAoe = sConfigMgr->GetOption<bool>("AiPlayerbot.TellWhenAvoidAoe", true);
|
||||||
|
|
||||||
randomGearLoweringChance = sConfigMgr->GetOption<float>("AiPlayerbot.RandomGearLoweringChance", 0.15f);
|
randomGearLoweringChance = sConfigMgr->GetOption<float>("AiPlayerbot.RandomGearLoweringChance", 0.15f);
|
||||||
randomBotMaxLevelChance = sConfigMgr->GetOption<float>("AiPlayerbot.RandomBotMaxLevelChance", 0.15f);
|
randomBotMaxLevelChance = sConfigMgr->GetOption<float>("AiPlayerbot.RandomBotMaxLevelChance", 0.15f);
|
||||||
|
|||||||
@@ -65,6 +65,7 @@ class PlayerbotAIConfig
|
|||||||
bool autoSaveMana;
|
bool autoSaveMana;
|
||||||
uint32 saveManaThreshold;
|
uint32 saveManaThreshold;
|
||||||
bool autoAvoidAoe;
|
bool autoAvoidAoe;
|
||||||
|
bool tellWhenAvoidAoe;
|
||||||
|
|
||||||
uint32 openGoSpell;
|
uint32 openGoSpell;
|
||||||
bool randomBotAutologin;
|
bool randomBotAutologin;
|
||||||
|
|||||||
@@ -1674,9 +1674,11 @@ bool AvoidAoeAction::FleePostion(Position pos, float radius, std::string name)
|
|||||||
}
|
}
|
||||||
if (farestDis > 0.0f) {
|
if (farestDis > 0.0f) {
|
||||||
if (MoveTo(bot->GetMapId(), bestPos.GetPositionX(), bestPos.GetPositionY(), bestPos.GetPositionZ(), false, false, true)) {
|
if (MoveTo(bot->GetMapId(), bestPos.GetPositionX(), bestPos.GetPositionY(), bestPos.GetPositionZ(), false, false, true)) {
|
||||||
std::ostringstream out;
|
if (sPlayerbotAIConfig->tellWhenAvoidAoe) {
|
||||||
out << "Avoiding spell " << name << "...";
|
std::ostringstream out;
|
||||||
bot->Say(out.str(), LANG_UNIVERSAL);
|
out << "Avoiding spell " << name << "...";
|
||||||
|
bot->Say(out.str(), LANG_UNIVERSAL);
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user