mirror of
https://github.com/liyunfan1223/mod-playerbots.git
synced 2026-02-20 18:10:02 +01:00
Worldbuff startup fix (#951)
* - [Performance] Fixed world buff loading from config file * - [Refactoring] Changed mathod name
This commit is contained in:
parent
db33cecf36
commit
08008a3155
@ -419,14 +419,15 @@ bool PlayerbotAIConfig::Initialize()
|
|||||||
{
|
{
|
||||||
for (uint32 classId = 0; classId < MAX_CLASSES; classId++)
|
for (uint32 classId = 0; classId < MAX_CLASSES; classId++)
|
||||||
{
|
{
|
||||||
for (uint32 specId = 0; specId < MAX_SPECNO; specId++)
|
for (uint32 specId = 0; specId <= MAX_WORLDBUFF_SPECNO; specId++)
|
||||||
{
|
{
|
||||||
for (uint32 minLevel = 0; minLevel < MAX_LEVEL; minLevel++)
|
for (uint32 minLevel = 0; minLevel <= randomBotMaxLevel; minLevel++)
|
||||||
{
|
{
|
||||||
for (uint32 maxLevel = 0; maxLevel < MAX_LEVEL; maxLevel++)
|
for (uint32 maxLevel = minLevel; maxLevel <= randomBotMaxLevel; maxLevel++)
|
||||||
{
|
{
|
||||||
loadWorldBuf(factionId, classId, specId, minLevel, maxLevel);
|
loadWorldBuff(factionId, classId, specId, minLevel, maxLevel);
|
||||||
}
|
}
|
||||||
|
loadWorldBuff(factionId, classId, specId, minLevel, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -673,7 +674,7 @@ void PlayerbotAIConfig::log(std::string const fileName, char const* str, ...)
|
|||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PlayerbotAIConfig::loadWorldBuf(uint32 factionId1, uint32 classId1, uint32 specId1, uint32 minLevel1, uint32 maxLevel1)
|
void PlayerbotAIConfig::loadWorldBuff(uint32 factionId1, uint32 classId1, uint32 specId1, uint32 minLevel1, uint32 maxLevel1)
|
||||||
{
|
{
|
||||||
std::vector<uint32> buffs;
|
std::vector<uint32> buffs;
|
||||||
|
|
||||||
|
|||||||
@ -35,6 +35,7 @@ enum class HealingManaEfficiency : uint8
|
|||||||
};
|
};
|
||||||
|
|
||||||
#define MAX_SPECNO 20
|
#define MAX_SPECNO 20
|
||||||
|
#define MAX_WORLDBUFF_SPECNO 3
|
||||||
|
|
||||||
class PlayerbotAIConfig
|
class PlayerbotAIConfig
|
||||||
{
|
{
|
||||||
@ -358,7 +359,7 @@ public:
|
|||||||
}
|
}
|
||||||
void log(std::string const fileName, const char* str, ...);
|
void log(std::string const fileName, const char* str, ...);
|
||||||
|
|
||||||
void loadWorldBuf(uint32 factionId, uint32 classId, uint32 specId, uint32 minLevel, uint32 maxLevel);
|
void loadWorldBuff(uint32 factionId, uint32 classId, uint32 specId, uint32 minLevel, uint32 maxLevel);
|
||||||
static std::vector<std::vector<uint32>> ParseTempTalentsOrder(uint32 cls, std::string temp_talents_order);
|
static std::vector<std::vector<uint32>> ParseTempTalentsOrder(uint32 cls, std::string temp_talents_order);
|
||||||
static std::vector<std::vector<uint32>> ParseTempPetTalentsOrder(uint32 spec, std::string temp_talents_order);
|
static std::vector<std::vector<uint32>> ParseTempPetTalentsOrder(uint32 spec, std::string temp_talents_order);
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user