Hi guys,
Am I missing something in my code?
Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using SPQR;
using MySPQR;
namespace SPQR.Engine
{
class Warrior : Engine.FightModule
{
public override string DisplayName
{
get { return "Warrior"; }
}
internal enum Spells : int //This is a convenient list of all spells used by our combat routine
{ //you can have search on wowhead.com for spell name, and get the id in url
Devastate = 20243,
Revenge = 6572,
ShieldSlam = 23922,
ShieldBlock = 2565,
ThunderClap = 6343,
HeroicStrike = 78,
BerserkerRage = 18499,
DemoralizingShout = 1160,
DragonRoar = 118000,
BattleShout = 6673,
}
internal enum Auras : int //This is another convenient list of Auras used in our combat routine
{ //you can have those in wowhead.com (again) and get the id in url
Ultimatum = 122510,
SwordAndBoard = 50227,
}
public override void CombatLogic() //This is the DPS / healing coutine, called in loop by SPQR all code here is executed
{
var TARGET = MySPQR.Internals.ObjectManager.Target;
var ME = MySPQR.Internals.ObjectManager.WoWLocalPlayer;
MySPQR.Internals.ActionBar.CastSpellById((int)Spells.BerserkerRage);
MySPQR.Internals.ActionBar.CastSpellById((int)Spells.BattleShout);
MySPQR.Internals.ActionBar.CastSpellById((int)Spells.ThunderClap);
MySPQR.Internals.ActionBar.CastSpellById((int)Spells.DemoralizingShout);
if(ME.Rage > 75 || ME.HasAurabyId((int)Auras.Ultimatum))
MySPQR.Internals.ActionBar.CastSpellById((int)Spells.HeroicStrike);
if(ME.Rage > 60)
MySPQR.Internals.ActionBar.CastSpellById((int)Spells.ShieldBlock);
if(ME.HasAurabyId((int)Auras.SwordAndBoard))
MySPQR.Internals.ActionBar.CastSpellById((int)Spells.ShieldSlam);
MySPQR.Internals.ActionBar.CastSpellById((int)Spells.ShieldSlam);
MySPQR.Internals.ActionBar.CastSpellById((int)Spells.Revenge);
MySPQR.Internals.ActionBar.CastSpellById((int)Spells.Devastate);
}
public override void OnLoad() //This is called when the Customclass is loaded in SPQR
{
}
public override void OnClose() //This is called when the Customclass is unloaded in SPQR
{
}
public override void OnStart() //This is called once, when you hit CTRL+X to start SPQR combat routine
{
}
public override void OnStop() //This is called once, when you hit CTRL+X to stop SPQR combat routine
{
}
}
}
All it seems to do is cast Berserker Rage, Battle Shout, Thunder Clap, Shield Slam then proceeds to spam Devastate over and over without ever doing anything again.
**EDIT**
Fixed by restarting SPQR, don't worry.