public static void LifePointsRegenBeginMessageTreatment(Message message, byte[] packetDatas, AccountUC account) { LifePointsRegenBeginMessage msg = (LifePointsRegenBeginMessage)message; using (BigEndianReader reader = new BigEndianReader(packetDatas)) { msg.Deserialize(reader); } if (account.Fight != null && account.StatusLb.Text == "Combat" || account.StatusLb.Text == "Fighting") { account.Fight.watch.Stop(); account.Fight.WaitForReady = false; account.Fight.IsFighterTurn = false; account.Fight.IsFightStarted = false; account.Log(new ActionTextInformation("Combat fini ! (" + account.Fight.watch.Elapsed.Minutes + " min, " + account.Fight.watch.Elapsed.Seconds + " sec)"), 0); account.Fight.watch.Reset(); account.Fight.PerformAutoTimeoutFight(2000); if (account.WithItemSetBox.Checked == true) { sbyte id = (sbyte)account.PresetEndUpD.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(2000); account.Fight.PulseRegen(); account.ModifBar(6, 0, 0, "Connecté"); } //account.Path.Stop = false; }
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); }
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); }
/// <summary> /// Set the fight as stopped. /// </summary> public void FightStop() { watch.Stop(); WaitForReady = false; IsFighterTurn = false; IsFightStarted = false; IsDead = false; m_Account.Log(new ActionTextInformation("Combat fini ! (" + watch.Elapsed.Minutes + " min, " + watch.Elapsed.Seconds + " sec)"), 0); watch.Reset(); m_Account.SetStatus(Status.Busy); Reset(); PerformAutoTimeoutFight(2000); if (m_Account.WithItemSetBox.Checked == true) { sbyte id = (sbyte)m_Account.PresetEndUpD.Value; InventoryPresetUseMessage msg2 = new InventoryPresetUseMessage((sbyte)(id - 1)); m_Account.SocketManager.Send(msg2); m_Account.Log(new ActionTextInformation("Equipement rapide numero " + Convert.ToString(id)), 5); } PulseRegen(); }