Jump to content

Fight class not casting spells


Recommended Posts

I'm having an issue with a new fight class I created, it seems to only load 1 SpellState into the Engine so the bot just sits there and auto attacks, I'm not sure what I've done wrong.

I've also manually set Sinister Strike to priority 1 which caused it to get loaded and the bot would only cast Sinister Strike and nothing else in the state list.

image.thumb.png.deb3b3f401a2c1fe2678af2d747e2143.png

Console output during initialization:

[D] 23:00:27 - Init
[D] 23:00:27 - [Spell] Evasion (Id found: 5277, Name found: Evasion, NameInGame found: Evasion, Know = True, IsSpellUsable = True)
[D] 23:00:27 - [Spell] Eviscerate (Id found: 6761, Name found: Eviscerate, NameInGame found: Eviscerate, Know = True, IsSpellUsable = False)
[D] 23:00:27 - [Spell] Backstab (Id found: 2590, Name found: Backstab, NameInGame found: Backstab, Know = True, IsSpellUsable = False)
[D] 23:00:28 - [Spell] Riposte (Id found: 14251, Name found: Riposte, NameInGame found: Riposte, Know = True, IsSpellUsable = False)
[D] 23:00:28 - [Spell] Sinister Strike (Id found: 1758, Name found: Sinister Strike, NameInGame found: Sinister Strike, Know = True, IsSpellUsable = True)
[D] 23:00:28 - Spell Evasion - 1
[D] 23:00:28 - Spell Eviscerate - 2
[D] 23:00:28 - Spell Backstab - 3
[D] 23:00:28 - Spell Riposte - 4
[D] 23:00:28 - Spell Sinister Strike - 5
[D] 23:00:28 - [FSM] State wManager.Wow.Bot.States.SpellState already launched, ignore it.
[D] 23:00:28 - [FSM] State wManager.Wow.Bot.States.SpellState already launched, ignore it.
[D] 23:00:28 - [FSM] State wManager.Wow.Bot.States.SpellState already launched, ignore it.
[D] 23:00:28 - [FSM] State wManager.Wow.Bot.States.SpellState already launched, ignore it.
23:00:28 - Spell Evasion - 1

 

Any help would be appreciated.

Link to comment
Share on other sites

5 hours ago, Droidz said:

Hello, replace 

"_engine.StartEngine(5);"

by

"_engine.StartEngine(5, "", true);"

(and check if you dispose correctly your fightclass)

Thanks that looks to have fixed it, and below is my Dispose() method, is anything I'm missing in there?

    public void Dispose()
    {
        Logging.WriteDebug("Dispose() Called");
        if (_engine == null) return;
        _engine.StopEngine();
        _engine.States.Clear();
    }

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...