Exemple #1
0
        private void HandleCharacterCharacteristicsInformations(StatsUpgradeResultMessage message, ConnectedHost source)
        {
            switch (message.result)
            {
            default:
                TextDataAdapter.GetText("ui.popup.statboostFailed.text");
                break;

            case 0:
                source.logger.Log("Caractéristique augmentée avec succés.", Common.Default.Loging.LogLevelEnum.Succes);
                break;

            case 1:
                source.logger.Log(TextDataAdapter.GetText("ui.charSel.deletionErrorUnsecureMode"), Common.Default.Loging.LogLevelEnum.Error);
                break;

            case 2:
                source.logger.Log(TextDataAdapter.GetText("ui.fight.guestAccount"), Common.Default.Loging.LogLevelEnum.Error);
                break;

            case 3:
                source.logger.Log(TextDataAdapter.GetText("ui.error.cantDoInFight"), Common.Default.Loging.LogLevelEnum.Error);
                break;

            case 4:
                source.logger.Log(TextDataAdapter.GetText("ui.popup.statboostFailed.notEnoughPoint"), Common.Default.Loging.LogLevelEnum.Error);
                break;
            }
            OnUpdated();
        }
        public static void StatsUpgradeResultMessageTreatment(Message message, byte[] packetDatas, AccountUC account)
        {
            StatsUpgradeResultMessage msg = (StatsUpgradeResultMessage)message;

            using (BigEndianReader reader = new BigEndianReader(packetDatas))
            {
                msg.Deserialize(reader);
            }
            //if (msg.result == 1)
            //{
            //    //account.CaracUC.DecreaseAvailablePoints(msg.nbCharacBoost);
            //    account.Log(new BotTextInformation("Caractéristique augmentée."),0);
            //}
            //else
            //    account.Log(new ErrorTextInformation("Echec de l'up de caractéristique."), 0);
        }