mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-18 11:15:43 +00:00
Ulduar base files
Base files for ulduar. w/o any script
This commit is contained in:
24
src/strategy/raids/ulduar/RaidUlduarActions.cpp
Normal file
24
src/strategy/raids/ulduar/RaidUlduarActions.cpp
Normal file
@@ -0,0 +1,24 @@
|
||||
|
||||
#include "ObjectGuid.h"
|
||||
#include "PlayerbotAIConfig.h"
|
||||
#include "Playerbots.h"
|
||||
#include "RaidUlduarActions.h"
|
||||
#include "RaidUlduarStrategy.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "SharedDefines.h"
|
||||
#include "RaidUlduarBossHelper.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;
|
||||
}
|
||||
Reference in New Issue
Block a user