diff --git a/src/PlayerbotFactory.cpp b/src/PlayerbotFactory.cpp index 5b574013..d5ab30cb 100644 --- a/src/PlayerbotFactory.cpp +++ b/src/PlayerbotFactory.cpp @@ -2006,14 +2006,14 @@ void PlayerbotFactory::InitMounts() break; case RACE_NIGHTELF: slow = { 10789, 8394, 10793 }; - fast = { 18766, 18767, 18902 }; + fast = { 24252, 63637, 22723 }; break; case RACE_UNDEAD_PLAYER: slow = { 17463, 17464, 17462 }; - fast = { 17465, 23246 }; + fast = { 17465, 23246, 66846 }; break; case RACE_TAUREN: - slow = { 18990, 18989 }; + slow = { 18990, 18989, 64657 }; fast = { 23249, 23248, 23247 }; break; case RACE_GNOME: @@ -2021,7 +2021,7 @@ void PlayerbotFactory::InitMounts() fast = { 23225, 23223, 23222 }; break; case RACE_TROLL: - slow = { 8588, 10796, 8592, 472 }; + slow = { 10796, 10799, 8395, 472 }; fast = { 23241, 23242, 23243 }; break; case RACE_DRAENEI: @@ -2412,15 +2412,15 @@ void PlayerbotFactory::InitInventoryEquip() void PlayerbotFactory::InitGuild() { + if (bot->GetGuildId()) + return; + bot->SaveToDB(false, false); // add guild tabard if (bot->GetGuildId() && !bot->HasItemCount(5976, 1)) StoreItem(5976, 1); - if (bot->GetGuildId()) - return; - if (sPlayerbotAIConfig->randomBotGuilds.empty()) RandomPlayerbotFactory::CreateRandomGuilds(); @@ -2576,6 +2576,9 @@ void PlayerbotFactory::InitArenaTeam() ObjectGuid capt = arenateam->GetCaptain(); Player* botcaptain = ObjectAccessor::FindPlayer(capt); + if ((bot && bot->GetArenaTeamId(arenateam->GetSlot())) || sCharacterCache->GetCharacterArenaTeamIdByGuid(bot->GetGUID(), arenateam->GetSlot()) != 0) + return; + if (botcaptain && botcaptain->GetTeamId() == bot->GetTeamId()) //need? { arenateam->AddMember(bot->GetGUID()); diff --git a/src/RandomPlayerbotFactory.cpp b/src/RandomPlayerbotFactory.cpp index d961b290..585669ab 100644 --- a/src/RandomPlayerbotFactory.cpp +++ b/src/RandomPlayerbotFactory.cpp @@ -497,6 +497,9 @@ void RandomPlayerbotFactory::CreateRandomGuilds() if (guildName.empty()) continue; + if (sGuildMgr->GetGuildByName(guildName)) + continue; + if (availableLeaders.empty()) { LOG_ERROR("playerbots", "No leaders for random guilds available"); @@ -508,14 +511,17 @@ void RandomPlayerbotFactory::CreateRandomGuilds() Player* player = ObjectAccessor::FindPlayer(leader); if (!player) { - LOG_ERROR("playerbots", "Cannot find player for leader {}", player->GetName().c_str()); + LOG_ERROR("playerbots", "ObjectAccessor Cannot find player to set leader for guild {} . Skipped...", guildName.c_str()); continue; } + if (player->GetGuildId()) + continue; + Guild* guild = new Guild(); if (!guild->Create(player, guildName)) { - LOG_ERROR("playerbots", "Error creating guild {}", guildName.c_str()); + LOG_ERROR("playerbots", "Error creating guild [ {} ] with leader [ {} ]", guildName.c_str(), player->GetName().c_str()); delete guild; continue; } diff --git a/src/RandomPlayerbotMgr.cpp b/src/RandomPlayerbotMgr.cpp index 642b0fa2..451a7ec3 100644 --- a/src/RandomPlayerbotMgr.cpp +++ b/src/RandomPlayerbotMgr.cpp @@ -918,7 +918,7 @@ bool RandomPlayerbotMgr::ProcessBot(Player* player) uint32 teleport = GetEventValue(bot, "teleport"); if (!teleport) { - LOG_INFO("players", "Bot #%d <%s>: sent to grind", bot, player->GetName()); + LOG_INFO("players", "Bot #{} <{}>: sent to grind", bot, player->GetName()); RandomTeleportForLevel(player); Refresh(player); SetEventValue(bot, "teleport", 1, sPlayerbotAIConfig->maxRandomBotInWorldTime);