This is less a finished plugin but [part of] something else I needed to make ...
I found it very irritating that HB and many of the build in-bots force dismounts before various actions where it's not necessary for flight form druids ...
Since the those bots are only provided as compiled assembles and instrumentation is pretty much a massive PITA I figured I could just prevent CancelShapeshiftForm() from doing anything when HB invokes it ...
Essentially all it does is redefine the CancelShapeshiftForm function out-of-combat, so when the bot arrives at an object with which it wants to interact, it wont cancel flight form for no reason.
The second part to the plugin is forcing flight form to be used when the bot doesn't want to use it ... but you can comment that bit out as it suits.
Watch out for Swift Flight Form which I've hard coded so if you want to use it you gotta change it
If HB decides to want to drop you onto an unreachable-ish spot using dismount you're in trouble
Not so sure about combat logic, might fuck up if you have reloggers or whatever.
I found it very irritating that HB and many of the build in-bots force dismounts before various actions where it's not necessary for flight form druids ...
Since the those bots are only provided as compiled assembles and instrumentation is pretty much a massive PITA I figured I could just prevent CancelShapeshiftForm() from doing anything when HB invokes it ...
Essentially all it does is redefine the CancelShapeshiftForm function out-of-combat, so when the bot arrives at an object with which it wants to interact, it wont cancel flight form for no reason.
The second part to the plugin is forcing flight form to be used when the bot doesn't want to use it ... but you can comment that bit out as it suits.
Code:
using Styx;
using Styx.Common;
using Styx.CommonBot;
using Styx.Pathing;
using Styx.Plugins;
using Styx.WoWInternals;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AntiDismounter
{
public class AntiDismounter : HBPlugin
{
private static float MIN_DIST = 15.0f;
private bool on;
public override void Initialize()
{
on = false;
}
public override void Pulse()
{
var me = StyxWoW.Me;
if (!me.IsValid || !StyxWoW.IsInGame || !StyxWoW.IsInWorld)
return;
if (!me.Combat)
{
if (!on)
{
Lua.DoString("oldCancelShapeshiftForm = CancelShapeshiftForm; CancelShapeshiftForm = function() end");
on = true;
}
if (me.IsMoving && WoWMovement.ClickToMoveInfo.ClickPos.Distance(me.Location) >= MIN_DIST && !me.Mounted && SpellManager.CanCast("Swift Flight Form"))
{
SpellManager.Cast("Swift Flight Form");
Flightor.MoveTo(WoWMovement.ClickToMoveInfo.ClickPos);
}
}
else if(me.Combat && on)
{
Lua.DoString("CancelShapeshiftForm = oldCancelShapeshiftForm;");
on = false;
}
}
public override string Name
{
get { return "AntiDismounter"; }
}
public override bool WantButton
{
get { return false; }
}
public override Version Version
{
get { return new Version(0, 1); }
}
public override string Author
{
get { return "..."; }
}
}
}
Watch out for Swift Flight Form which I've hard coded so if you want to use it you gotta change it
If HB decides to want to drop you onto an unreachable-ish spot using dismount you're in trouble
Not so sure about combat logic, might fuck up if you have reloggers or whatever.
Last edited: