Esempio n. 1
0
 public static void GameFightPlacementPossiblePositionsMessageTreatment(Message message, byte[] packetDatas, AccountUC account)
 {
     GameFightPlacementPossiblePositionsMessage msg = (GameFightPlacementPossiblePositionsMessage)message;
     using (BigEndianReader reader = new BigEndianReader(packetDatas))
     {
         msg.Deserialize(reader);
     }
     account.ModifBar(6, 0, 0, "Combat");
     account.Fight.PlacementCells = msg.positionsForChallengers.ToList();
     account.Fight.TurnId = 0;
     if (account.Fight.m_Conf.Tactic != BlueSheep.Core.Fight.TacticEnum.Immobile)
         account.Fight.PlaceCharacter();
     //account.Fight.PerformAutoTimeoutFight(3000);
     //if (account.IsMITM)
     // account.Fight.PerformAutoTimeoutFight(3000);
     if (account.WithItemSetBox.Checked == true)
     {
         sbyte id = (sbyte)account.PresetStartUpD.Value;
         InventoryPresetUseMessage msg2 = new InventoryPresetUseMessage((sbyte)(id - 1));
         account.SocketManager.Send(msg2);
         account.Log(new ActionTextInformation("Equipement rapide numero " + Convert.ToString(id)), 5);
         account.Fight.PerformAutoTimeoutFight(500);
     }
     //LaunchWatch()
     GameFightReadyMessage nmsg = new GameFightReadyMessage(true);
     account.SocketManager.Send(nmsg);
     account.Log(new BotTextInformation("Send Ready !"), 5);
 }
Esempio n. 2
0
 public static void GameFightPlacementPossiblePositionsMessageTreatment(Message message, byte[] packetDatas, AccountUC account)
 {
     GameFightPlacementPossiblePositionsMessage msg = (GameFightPlacementPossiblePositionsMessage)message;
     using (BigEndianReader reader = new BigEndianReader(packetDatas))
     {
         msg.Deserialize(reader);
     }
     account.SetStatus(Status.Fighting);
     account.FightData.UpdateTurn(0);
     if (account.Fight != null)
     {
         account.Fight.PlaceCharacter(msg.positionsForChallengers.ToList());
     }
     if (account.WithItemSetBox.Checked == true)
     {
         sbyte id = (sbyte)account.PresetStartUpD.Value;
         InventoryPresetUseMessage msg2 = new InventoryPresetUseMessage((sbyte)(id - 1));
         account.SocketManager.Send(msg2);
         account.Log(new ActionTextInformation("Equipement rapide numero " + Convert.ToString(id)), 5);
     }
     GameFightReadyMessage nmsg = new GameFightReadyMessage(true);
     account.SocketManager.Send(nmsg);
     account.Log(new BotTextInformation("Send Ready !"), 5);
 }