Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spell not found after Cast #59

Open
Timorem opened this issue Apr 25, 2013 · 1 comment
Open

Spell not found after Cast #59

Timorem opened this issue Apr 25, 2013 · 1 comment
Labels

Comments

@Timorem
Copy link
Member

Timorem commented Apr 25, 2013

For some spells there is an exception after the spell cast in SpellsBook.AI.cs@68. The server replied another spell id than the casted spell (i.g "Rembobinage" Xelor's spell).

We must store the casted spell and then reuse the stored id on cast reply.

"System.Exception: Cannot dispatch GameActionFightSpellCastMessage ---> System.ArgumentException: Spell Id 3181 do not exists in the SpellsBook of XXXXX, with 4 entries
à BiM.Behaviors.Game.Spells.SpellsBook.CastAt(GameActionFightSpellCastMessage msg) dans C:\Users\Bouh2\Desktop\Programming\CSharp\BehaviorIsManaged\Behaviors\Game\Spells\SpellsBook.AI.cs:ligne 68
à BiM.Behaviors.Handlers.Spells.SpellHandler.HandleGameActionFightSpellCastMessage(Bot bot, GameActionFightSpellCastMessage message) dans C:\Users\Bouh2\Desktop\Programming\CSharp\BehaviorIsManaged\Behaviors\Handlers\Spells\SpellHandler.cs:ligne 50
à (Object , Object , Message )
à BiM.MITM.Network.NetworkMessageDispatcher.InternalDispatch(NetworkMessage message, Object token) dans C:\Users\Bouh2\Desktop\Programming\CSharp\BehaviorIsManaged\MITM\Network\NetworkMessageDispatcher.cs:ligne 108
à BiM.MITM.Network.NetworkMessageDispatcher.Dispatch(NetworkMessage message, Object token) dans C:\Users\Bouh2\Desktop\Programming\CSharp\BehaviorIsManaged\MITM\Network\NetworkMessageDispatcher.cs:ligne 68
--- Fin de la trace de la pile d'exception interne ---
à BiM.MITM.Network.NetworkMessageDispatcher.Dispatch(NetworkMessage message, Object token) dans C:\Users\Bouh2\Desktop\Programming\CSharp\BehaviorIsManaged\MITM\Network\NetworkMessageDispatcher.cs:ligne 86
à BiM.MITM.Network.NetworkMessageDispatcher.Dispatch(Message message, Object token) dans C:\Users\Bouh2\Desktop\Programming\CSharp\BehaviorIsManaged\MITM\Network\NetworkMessageDispatcher.cs:ligne 55
à BiM.Core.Messages.MessageDispatcher.ProcessDispatching(Object processor) dans C:\Users\Bouh2\Desktop\Programming\CSharp\BehaviorIsManaged\Core\Messages\MessageDispatcher.cs:ligne 469
à BiM.Behaviors.Bot.OnTick() dans C:\Users\Bouh2\Desktop\Programming\CSharp\BehaviorIsManaged\Behaviors\Bot.cs:ligne 185"

@FastFrench
Copy link
Member

Yep, I've somewhat improved all that stuff in the while. Getting reliable notification is quite tricky. I've added a timeout mecanism to start other actions even when no notification is received, but it was not really satisfactory, so I finally removed that stuff. Now I store the last action details and ignore non-coherent server messages.

But still now, on very long runs (let 8 bots running over 12h without restarting them) sometimes the bot do not receive any ack from the server on casting spells (or moves).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants