示例#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.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);
        }
示例#2
0
 public static void HandleGameFightReadyMessage(WorldClient client, GameFightReadyMessage message)
 {
     if (client.Character.IsFighting())
     {
         client.Character.Fighter.ToggleReady(message.isReady);
     }
 }
示例#3
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);
            if (account.Fight != null)
            {
                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);
        }
 public static void HandleGameFightReady(GameFightReadyMessage message, WorldClient client)
 {
     if (client.Character.Fighting)
     {
         client.Character.FighterMaster.ToggleReady(message.isReady);
     }
 }
 public static void HandleFightReady(GameFightReadyMessage message, WorldClient client)
 {
     client.Character.FighterInstance.ToogleReady(message.isReady);
 }