Exemplo n.º 1
0
        public static void CharacterStatsListMessageTreatment(Message message, byte[] packetDatas, AccountUC account)
        {
            CharacterStatsListMessage msg = (CharacterStatsListMessage)message;

            using (BigEndianReader reader = new BigEndianReader(packetDatas))
            {
                msg.Deserialize(reader);
            }
            if (!account.ConfigManager.Restored)
            {
                account.ConfigManager.RecoverConfig();
            }
            account.CharacterStats = msg.stats;
            account.CaracUC.Init();
            if (account.MyGroup != null)
            {
                ((GroupForm)account.ParentForm).AddMember(account.CharacterBaseInformations.name);
            }
            int    percent = (msg.stats.lifePoints / msg.stats.maxLifePoints) * 100;
            string text    = msg.stats.lifePoints + "/" + msg.stats.maxLifePoints + "(" + percent + "%)";

            account.ModifBar(2, (int)msg.stats.maxLifePoints, (int)msg.stats.lifePoints, "Vitalité");
            double i = msg.stats.experience - msg.stats.experienceLevelFloor;
            double j = msg.stats.experienceNextLevelFloor - msg.stats.experienceLevelFloor;

            try
            {
                int xppercent = (int)(Math.Round(i / j, 2) * 100);
            }
            catch (Exception ex)
            {
            }
            account.ModifBar(1, (int)msg.stats.experienceNextLevelFloor - (int)msg.stats.experienceLevelFloor, (int)msg.stats.experience - (int)msg.stats.experienceLevelFloor, "Experience");
            account.ModifBar(4, 0, 0, msg.stats.kamas.ToString());
        }
 public static void HandleCharacterStatsListMessage(Bot bot, CharacterStatsListMessage message)
 {
     if (bot.Character != null)
     {
         bot.Character.Update(message);
     }
 }
Exemplo n.º 3
0
 public void Update(CharacterStatsListMessage msg)
 {
     if (msg == null)
     {
         throw new ArgumentNullException("msg");
     }
     Stats.Update(msg.stats);
 }
Exemplo n.º 4
0
 private void CharacterStatsListMessageHandler(DofusClient client, CharacterStatsListMessage message)
 {
     client.Account.Character.Stats = message.Stats;
 }
Exemplo n.º 5
0
        private void HandleCharacterCharacteristicsInformations(CharacterStatsListMessage _message, ConnectedHost source)
        {
            CharacterCharacteristicsInformations message = _message.stats;

            m_experience               = message.experience;
            m_experienceLevelFloor     = message.experienceLevelFloor;
            m_experienceNextLevelFloor = message.experienceNextLevelFloor;
            m_kamas                          = message.kamas;
            m_statsPoints                    = message.statsPoints;
            m_additionnalPoints              = message.additionnalPoints;
            m_spellsPoints                   = message.spellsPoints;
            m_alignmentInfos                 = message.alignmentInfos;
            m_lifePoints                     = message.lifePoints;
            m_maxLifePoints                  = message.maxLifePoints;
            m_energyPoints                   = message.energyPoints;
            m_maxEnergyPoints                = message.maxEnergyPoints;
            m_actionPointsCurrent            = message.actionPointsCurrent;
            m_movementPointsCurrent          = message.movementPointsCurrent;
            m_initiative                     = message.initiative;
            m_prospecting                    = message.prospecting;
            m_actionPoints                   = message.actionPoints;
            m_movementPoints                 = message.movementPoints;
            m_strength                       = message.strength;
            m_vitality                       = message.vitality;
            m_wisdom                         = message.wisdom;
            m_chance                         = message.chance;
            m_agility                        = message.agility;
            m_intelligence                   = message.intelligence;
            m_range                          = message.range;
            m_summonableCreaturesBoost       = message.summonableCreaturesBoost;
            m_reflect                        = message.reflect;
            m_criticalHit                    = message.criticalHit;
            m_criticalHitWeapon              = message.criticalHitWeapon;
            m_criticalMiss                   = message.criticalMiss;
            m_healBonus                      = message.healBonus;
            m_allDamagesBonus                = message.allDamagesBonus;
            m_weaponDamagesBonusPercent      = message.weaponDamagesBonusPercent;
            m_damagesBonusPercent            = message.damagesBonusPercent;
            m_trapBonus                      = message.trapBonus;
            m_trapBonusPercent               = message.trapBonusPercent;
            m_glyphBonusPercent              = message.glyphBonusPercent;
            m_permanentDamagePercent         = message.permanentDamagePercent;
            m_tackleBlock                    = message.tackleBlock;
            m_tackleEvade                    = message.tackleEvade;
            m_PAAttack                       = message.PAAttack;
            m_PMAttack                       = message.PMAttack;
            m_pushDamageBonus                = message.pushDamageBonus;
            m_criticalDamageBonus            = message.criticalDamageBonus;
            m_neutralDamageBonus             = message.neutralDamageBonus;
            m_earthDamageBonus               = message.earthDamageBonus;
            m_waterDamageBonus               = message.waterDamageBonus;
            m_airDamageBonus                 = message.airDamageBonus;
            m_fireDamageBonus                = message.fireDamageBonus;
            m_dodgePALostProbability         = message.dodgePALostProbability;
            m_dodgePMLostProbability         = message.dodgePMLostProbability;
            m_neutralElementResistPercent    = message.neutralElementResistPercent;
            m_earthElementResistPercent      = message.earthElementResistPercent;
            m_waterElementResistPercent      = message.waterElementResistPercent;
            m_airElementResistPercent        = message.airElementResistPercent;
            m_fireElementResistPercent       = message.fireElementResistPercent;
            m_neutralElementReduction        = message.neutralElementReduction;
            m_earthElementReduction          = message.earthElementReduction;
            m_waterElementReduction          = message.waterElementReduction;
            m_airElementReduction            = message.airElementReduction;
            m_fireElementReduction           = message.fireElementReduction;
            m_pushDamageReduction            = message.pushDamageReduction;
            m_criticalDamageReduction        = message.criticalDamageReduction;
            m_pvpNeutralElementResistPercent = message.pvpNeutralElementResistPercent;
            m_pvpEarthElementResistPercent   = message.pvpEarthElementResistPercent;
            m_pvpWaterElementResistPercent   = message.pvpWaterElementResistPercent;
            m_pvpAirElementResistPercent     = message.pvpAirElementResistPercent;
            m_pvpFireElementResistPercent    = message.pvpFireElementResistPercent;
            m_pvpNeutralElementReduction     = message.pvpNeutralElementReduction;
            m_pvpEarthElementReduction       = message.pvpEarthElementReduction;
            m_pvpWaterElementReduction       = message.pvpWaterElementReduction;
            m_pvpAirElementReduction         = message.pvpAirElementReduction;
            m_pvpFireElementReduction        = message.pvpFireElementReduction;
            m_spellModifications             = message.spellModifications;
            m_probationTime                  = message.probationTime;
            OnUpdated();
        }
Exemplo n.º 6
0
 private void HandleCharacterStatsListMessage(IAccount account, CharacterStatsListMessage message)
 {
     account.Character.Stats = message.Stats;
 }
Exemplo n.º 7
0
 public static Task HandleCharacterStatsListMessage(Account account, CharacterStatsListMessage message)
 => Task.Run(() => account.Game.Character.Update(message));