mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
fix RandomBotTeleLevel
This commit is contained in:
@@ -548,8 +548,8 @@ AiPlayerbot.PvpProhibitedZoneIds = "2255,656,2361,2362,2363,976,35,2268,3425,392
|
|||||||
AiPlayerbot.RandomBotSpellIds = "54197"
|
AiPlayerbot.RandomBotSpellIds = "54197"
|
||||||
|
|
||||||
# Level diff between random bots and nearby creatures for random teleports
|
# Level diff between random bots and nearby creatures for random teleports
|
||||||
AiPlayerbot.randomBotTeleLowerLevel = 3
|
AiPlayerbot.RandomBotTeleLowerLevel = 3
|
||||||
AiPlayerbot.randomBotTeleHigerLevel = 1
|
AiPlayerbot.RandomBotTeleHigherLevel = 1
|
||||||
|
|
||||||
# ID of spell to open lootable chests
|
# ID of spell to open lootable chests
|
||||||
AiPlayerbot.OpenGoSpell = 6477
|
AiPlayerbot.OpenGoSpell = 6477
|
||||||
|
|||||||
@@ -138,7 +138,7 @@ bool PlayerbotAIConfig::Initialize()
|
|||||||
randomBotMaxLevel = sConfigMgr->GetOption<int32>("AiPlayerbot.RandomBotMaxLevel", 80);
|
randomBotMaxLevel = sConfigMgr->GetOption<int32>("AiPlayerbot.RandomBotMaxLevel", 80);
|
||||||
randomBotLoginAtStartup = sConfigMgr->GetOption<bool>("AiPlayerbot.RandomBotLoginAtStartup", true);
|
randomBotLoginAtStartup = sConfigMgr->GetOption<bool>("AiPlayerbot.RandomBotLoginAtStartup", true);
|
||||||
randomBotTeleLowerLevel = sConfigMgr->GetOption<int32>("AiPlayerbot.RandomBotTeleLowerLevel", 3);
|
randomBotTeleLowerLevel = sConfigMgr->GetOption<int32>("AiPlayerbot.RandomBotTeleLowerLevel", 3);
|
||||||
randomBotTeleHigerLevel = sConfigMgr->GetOption<int32>("AiPlayerbot.RandomBotTeleHigerLevel", 1);
|
randomBotTeleHigherLevel = sConfigMgr->GetOption<int32>("AiPlayerbot.RandomBotTeleHigherLevel", 1);
|
||||||
openGoSpell = sConfigMgr->GetOption<int32>("AiPlayerbot.OpenGoSpell", 6477);
|
openGoSpell = sConfigMgr->GetOption<int32>("AiPlayerbot.OpenGoSpell", 6477);
|
||||||
|
|
||||||
randomChangeMultiplier = sConfigMgr->GetOption<float>("AiPlayerbot.RandomChangeMultiplier", 1.0);
|
randomChangeMultiplier = sConfigMgr->GetOption<float>("AiPlayerbot.RandomChangeMultiplier", 1.0);
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ class PlayerbotAIConfig
|
|||||||
bool randomBotJoinBG;
|
bool randomBotJoinBG;
|
||||||
bool randomBotAutoJoinBG;
|
bool randomBotAutoJoinBG;
|
||||||
bool randomBotLoginAtStartup;
|
bool randomBotLoginAtStartup;
|
||||||
uint32 randomBotTeleLowerLevel, randomBotTeleHigerLevel;
|
uint32 randomBotTeleLowerLevel, randomBotTeleHigherLevel;
|
||||||
bool logInGroupOnly, logValuesPerTick;
|
bool logInGroupOnly, logValuesPerTick;
|
||||||
bool fleeingEnabled;
|
bool fleeingEnabled;
|
||||||
bool summonAtInnkeepersEnabled;
|
bool summonAtInnkeepersEnabled;
|
||||||
|
|||||||
@@ -1156,7 +1156,7 @@ void RandomPlayerbotMgr::PrepareTeleportCache()
|
|||||||
uint32 avg_level = fields[4].Get<uint32>();
|
uint32 avg_level = fields[4].Get<uint32>();
|
||||||
WorldLocation loc(mapId, x, y, z, 0);
|
WorldLocation loc(mapId, x, y, z, 0);
|
||||||
collected_locs++;
|
collected_locs++;
|
||||||
for (int32 level = (int32)avg_level - (int32)sPlayerbotAIConfig->randomBotTeleHigerLevel; level <= (int32)avg_level + (int32)sPlayerbotAIConfig->randomBotTeleLowerLevel; level++) {
|
for (int32 level = (int32)avg_level - (int32)sPlayerbotAIConfig->randomBotTeleHigherLevel; level <= (int32)avg_level + (int32)sPlayerbotAIConfig->randomBotTeleLowerLevel; level++) {
|
||||||
if (level < 1 || level > maxLevel) {
|
if (level < 1 || level > maxLevel) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user