When the boss is casting AOE damage, in order to avoid deep damage, I hope the robot can follow a path or auto find a way to reach a safe area.
I made a plugin, but it not works, it only move very little little step then keep fighting without moving to the right place,. can you help me ,thanks.
public void OnFightLoop(WoWUnit unit,CancelEventArgs cancelable)
{
foreach(var boss in Bosses){
if(unit.Name == boss && unit.IsCast && unit.InCombat)
{
Logging.Write("Boss is casting,run now! );
RunWhenBossCastAOE(unit);
}
}
}
public void RunWhenBossCastAOE(WoWUnit boss)
{
switch (boss.Entry)
{
case 28586:
{
// General Bjarngrim
var x = ObjectManager.Me.Position.X;
var y = ObjectManager.Me.Position.Y;
var z = ObjectManager.Me.Position.Z;
List<Vector3>pathList = new List<Vector3>();
for(int i = 0;i<20;i++)
{
var newX = x;
var newY = y + i;
var newZ = z;
Vector3 tmpPos = new Vector3(newX,newY,newZ);
pathList.Add(tmpPos);
}
GoToSafePosition(pathList);
break;
}
}
}
public bool GoToSafePosition(List<Vector3> pathList)
{
wManager.Wow.Helpers.Conditions.ForceIgnoreIsAttacked = true;
MovementManager.Go(pathList);
wManager.Wow.Helpers.Conditions.ForceIgnoreIsAttacked = false;
return true;
}