mirror of
https://github.com/liyunfan1223/mod-playerbots.git
synced 2026-06-20 15:39:25 +02:00
### Summary This PR restores the Naxxramas raid strategies that were removed in commit 686fe513b25bbb20ccfcc89f08ee8c4b498a263e . The reintroduced logic is core‑friendly (no AzerothCore script headers or internal boss AI/EventMap dependencies), and the Naxxramas actions have been refactored into per‑boss files for better maintainability. ### Motivation The previous removal was meant to avoid core modifications and unblock upstreaming. This PR brings the strategies back while adhering to that requirement, using only observable state and mod‑playerbots helpers. ### What’s included - Re‑enabled the Naxxramas strategies previously removed. - Replaced core script header dependencies with observable checks (auras, casts, unit flags, flight state, etc.). - Split the Naxxramas action logic into per‑boss source files to avoid a “god file” and ease future maintenance. - Minor, non‑intrusive behavior improvements aligned with existing helpers. ### Future work Some strategies may still require refinement or more advanced handling later. This PR focuses on restoring the baseline logic without core dependencies, while keeping changes minimal and safe. **Any contributions are welcome to further improve and fine‑tune the Naxxramas strategies.** ### Testing Tested in some Naxx boxx. No server crash and boss killed :D Note: I'll make another PR with revised scripts when this one are merged --------- Co-authored-by: Keleborn <22352763+Celandriel@users.noreply.github.com> Co-authored-by: bash <hermensb@gmail.com> Co-authored-by: Revision <tkn963@gmail.com> Co-authored-by: kadeshar <kadeshar@gmail.com>
19 lines
443 B
C++
19 lines
443 B
C++
#include "RaidNaxxActions.h"
|
|
|
|
uint32 RotateAroundTheCenterPointAction::FindNearestWaypoint()
|
|
{
|
|
float minDistance = 0;
|
|
int ret = -1;
|
|
for (int i = 0; i < intervals; i++)
|
|
{
|
|
float w_x = waypoints[i].first, w_y = waypoints[i].second;
|
|
float dis = bot->GetDistance2d(w_x, w_y);
|
|
if (ret == -1 || dis < minDistance)
|
|
{
|
|
ret = i;
|
|
minDistance = dis;
|
|
}
|
|
}
|
|
return ret;
|
|
}
|