mirror of
https://github.com/liyunfan1223/mod-playerbots.git
synced 2026-06-20 15:39:25 +02:00
Guild fixes
This commit is contained in:
parent
4bcf8fd2c4
commit
fd5910e4b6
@ -85,6 +85,7 @@ public:
|
|||||||
void InitKeyring();
|
void InitKeyring();
|
||||||
void InitReputation();
|
void InitReputation();
|
||||||
void InitAttunementQuests();
|
void InitAttunementQuests();
|
||||||
|
void InitGuild();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void Prepare();
|
void Prepare();
|
||||||
@ -117,7 +118,6 @@ private:
|
|||||||
void InitInventoryEquip();
|
void InitInventoryEquip();
|
||||||
void InitInventorySkill();
|
void InitInventorySkill();
|
||||||
Item* StoreItem(uint32 itemId, uint32 count);
|
Item* StoreItem(uint32 itemId, uint32 count);
|
||||||
void InitGuild();
|
|
||||||
void InitArenaTeam();
|
void InitArenaTeam();
|
||||||
void InitImmersive();
|
void InitImmersive();
|
||||||
static void AddPrevQuests(uint32 questId, std::list<uint32>& questIds);
|
static void AddPrevQuests(uint32 questId, std::list<uint32>& questIds);
|
||||||
|
|||||||
@ -2532,6 +2532,13 @@ void RandomPlayerbotMgr::OnBotLoginInternal(Player* const bot)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Run guild recovery/assignment at login to handle empty guild tables after restart.
|
||||||
|
if (sPlayerbotAIConfig.randomBotGuildCount > 0)
|
||||||
|
{
|
||||||
|
PlayerbotFactory factory(bot, bot->GetLevel());
|
||||||
|
factory.InitGuild();
|
||||||
|
}
|
||||||
|
|
||||||
if (sPlayerbotAIConfig.randomBotFixedLevel)
|
if (sPlayerbotAIConfig.randomBotFixedLevel)
|
||||||
{
|
{
|
||||||
bot->SetPlayerFlag(PLAYER_FLAGS_NO_XP_GAIN);
|
bot->SetPlayerFlag(PLAYER_FLAGS_NO_XP_GAIN);
|
||||||
|
|||||||
@ -150,13 +150,10 @@ void PlayerbotGuildMgr::OnGuildUpdate(Guild* guild)
|
|||||||
|
|
||||||
void PlayerbotGuildMgr::ResetGuildCache()
|
void PlayerbotGuildMgr::ResetGuildCache()
|
||||||
{
|
{
|
||||||
for (auto it = _guildCache.begin(); it != _guildCache.end();)
|
_guildCache.clear();
|
||||||
{
|
|
||||||
GuildCache& cached = it->second;
|
for (auto& nameEntry : _guildNames)
|
||||||
cached.memberCount = 0;
|
nameEntry.second = true;
|
||||||
cached.faction = 2;
|
|
||||||
cached.status = 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void PlayerbotGuildMgr::LoadGuildNames()
|
void PlayerbotGuildMgr::LoadGuildNames()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user