diff --git a/src/modules/PlayerbotV2/Bot/Raid/RaidEncounterData_NAXX.cpp b/src/modules/PlayerbotV2/Bot/Raid/RaidEncounterData_NAXX.cpp index 1a841a3aee..e177d1a216 100644 --- a/src/modules/PlayerbotV2/Bot/Raid/RaidEncounterData_NAXX.cpp +++ b/src/modules/PlayerbotV2/Bot/Raid/RaidEncounterData_NAXX.cpp @@ -157,13 +157,18 @@ namespace Playerbot::Raid { // out of sight too. naxx_patchwerk 1114f and 1114g fought from that lower floor: 89 heals and shots failed for line of sight, the // main tank went up into the hall alone and the healers followed it into his reach. His walk comes back east along y -3230 to his // spawn, and he is met close to it (naxx_patchwerk 1115a: engaged at 3296,-3236 and fought at 3290-3311,-3232..-3249). The main - // tank holds him by his spawn at 3305,-3232, and the ranged and the healers stand west of him in the hall, 33 y from the tank - // (past Hateful Strike's 18 y rows above, inside 40 y of heals), the ranged on the south half, the healers on the north half. - // 1115a had them at the hall's east end, 8-12 y from his spawn: the healers walked into his reach and Hateful Strike killed them. + // tank holds him by his spawn at 3305,-3232, and the ranged stand west of him in the hall, 33 y from the tank (past Hateful Strike's + // 18 y rows above, inside 40 y of heals) on the south half. + // The healers stand at the hall's east end in its two corners, 3326,-3223 and 3326,-3241: 20 y from his spawn and 23-26 y from him + // where the main tank holds him (west of its post, he comes from the west), and off his walk, so they wait there before the pull + // (NaxxPrePullPatchwerk) instead of walking 75 y from the lower floor after it (naxx_patchwerk 1115i: 29 of 61 s walking, no heal + // for 18 s, every tank dead). 1115a had them at that end 8-12 y from his spawn: they walked into his reach and Hateful Strike + // killed them; the corners keep the 18 y. constexpr float kPatchHallZ = 294.1f; r.stand.push_back({ 16028, Who::MainTank, 3305.0f, -3232.0f, kPatchHallZ, 5.0f, true, 0 }); r.stand.push_back({ 16028, Who::Ranged, 3272.0f, -3240.0f, kPatchHallZ, 5.0f, false, 0 }); - r.stand.push_back({ 16028, Who::Healer, 3272.0f, -3224.0f, kPatchHallZ, 5.0f, false, 0 }); + r.stand.push_back({ 16028, Who::Healer, 3326.0f, -3223.0f, kPatchHallZ, 4.0f, false, 0, 100.0f, 0.0f, 1 }); + r.stand.push_back({ 16028, Who::Healer, 3326.0f, -3241.0f, kPatchHallZ, 4.0f, false, 0, 100.0f, 0.0f, 2 }); // --------------------------------------------------------------------------------------------------------------- // GROBBULUS (15931): Mutating Injection 28169 explodes into a poison cloud (creature 16363, triggers 28241 every diff --git a/src/modules/PlayerbotV2/Bot/Raid/RaidMechanics_Naxx.cpp b/src/modules/PlayerbotV2/Bot/Raid/RaidMechanics_Naxx.cpp index e66c93ddd7..f4927d6ca0 100644 --- a/src/modules/PlayerbotV2/Bot/Raid/RaidMechanics_Naxx.cpp +++ b/src/modules/PlayerbotV2/Bot/Raid/RaidMechanics_Naxx.cpp @@ -38,6 +38,7 @@ #include #include #include +#include namespace Playerbot::Raid::detail { @@ -1166,8 +1167,66 @@ void NaxxGluthTargets(Plan& plan, std::unordered_map& order } } +// Patchwerk +// ---------------------------------------------------------------------------------------------------------------------------------- +// The healers wait at their posts at the east end of his hall before he is pulled (RaidEncounterData_NAXX.cpp: 3326,-3223 and +// 3326,-3241, 20 y from his spawn, east of it, where his walk never goes). From the room's lower floor where the raid waits they had a +// 75 y walk after the pull: naxx_patchwerk 1115i fought him at his spawn, each soaker took one Hateful Strike (7k of 10.7k) in the first +// 3 s, and the healers spent 29 of 61 s walking, cast nothing for 18 s and every tank died before the first heal landed. +// They go only while he is far down his walk (kPatchFarYards from his spawn: 18 s or more at his pace, their walk takes about 8 s), and +// once sent they stay sent for the instance, so the post is held as he walks back. In combat the fight's stand rows take over. +constexpr uint32_t kPatchwerk = 16028; +constexpr float kPatchSpawnX = 3308.5f, kPatchSpawnY = -3232.1f; +constexpr float kPatchFarYards = 90.0f; +constexpr float kPatchNearRaid = 150.0f; +constexpr float kPatchHallZ = 294.1f; +struct PatchPost { float x, y; }; +constexpr PatchPost kPatchHealerPosts[] = { { 3326.0f, -3223.0f }, { 3326.0f, -3241.0f } }; // share 1 (even), share 2 (odd) +std::unordered_set g_patchPrePull; // instances whose healers were sent + +void NaxxPrePullPatchwerk(Plan& plan, std::unordered_map& orders, std::ostringstream& dump) +{ + Player* first = plan.members.front().p; + if (first->GetExactDist2d(kPatchSpawnX, kPatchSpawnY) > kPatchNearRaid) + return; + Creature* patch = first->FindNearestCreature(kPatchwerk, 300.0f, true); + if (!patch || patch->IsInCombat()) + return; + uint32_t const instance = first->GetInstanceId(); + float const away = patch->GetExactDist2d(kPatchSpawnX, kPatchSpawnY); + if (!g_patchPrePull.count(instance)) + { + if (away < kPatchFarYards) + return; + g_patchPrePull.insert(instance); + TC_LOG_INFO("playerbot.v2.raid", "[raid_patchwerk] he is {:.0f} y down his walk (at {:.1f},{:.1f}): the healers go to their posts at the hall's east end", + away, patch->GetPositionX(), patch->GetPositionY()); + } + uint32_t index = 0, sent = 0; + for (Member const& m : plan.members) + { + if (!m.healer) + continue; + PatchPost const& post = kPatchHealerPosts[index++ & 1u]; + if (!m.bot) + continue; + float z = kPatchHallZ; + if (!Usable(m.p, post.x, post.y, kPatchHallZ, z)) + z = kPatchHallZ; + RaidOrder& o = orders[m.p->GetGUID().GetCounter()]; + o.active = true; + o.prepull = true; + SetMove(o, post.x, post.y, z, "patchwerk: healer post"); + ++sent; + } + dump << " Patchwerk: " << sent << " healers to the east end, he is " << int(away) << " y from his spawn\n"; +} + void NaxxPrePull(Plan& plan, std::unordered_map& orders, std::ostringstream& dump) { + NaxxPrePullPatchwerk(plan, orders, dump); + if (g_patchPrePull.size() > 64) + g_patchPrePull.clear(); NaxxPrePullGothik(plan, orders, dump); NaxxPrePullThaddius(plan, orders, dump); if (g_thadSpot.size() > 512)