Open Timorem opened 11 years ago
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).
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"