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 InitReputation();
|
||||
void InitAttunementQuests();
|
||||
void InitGuild();
|
||||
|
||||
private:
|
||||
void Prepare();
|
||||
@ -117,7 +118,6 @@ private:
|
||||
void InitInventoryEquip();
|
||||
void InitInventorySkill();
|
||||
Item* StoreItem(uint32 itemId, uint32 count);
|
||||
void InitGuild();
|
||||
void InitArenaTeam();
|
||||
void InitImmersive();
|
||||
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)
|
||||
{
|
||||
bot->SetPlayerFlag(PLAYER_FLAGS_NO_XP_GAIN);
|
||||
|
||||
@ -150,13 +150,10 @@ void PlayerbotGuildMgr::OnGuildUpdate(Guild* guild)
|
||||
|
||||
void PlayerbotGuildMgr::ResetGuildCache()
|
||||
{
|
||||
for (auto it = _guildCache.begin(); it != _guildCache.end();)
|
||||
{
|
||||
GuildCache& cached = it->second;
|
||||
cached.memberCount = 0;
|
||||
cached.faction = 2;
|
||||
cached.status = 0;
|
||||
}
|
||||
_guildCache.clear();
|
||||
|
||||
for (auto& nameEntry : _guildNames)
|
||||
nameEntry.second = true;
|
||||
}
|
||||
|
||||
void PlayerbotGuildMgr::LoadGuildNames()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user