Esempio n. 1
0
        public static void JobExperienceMultiUpdateMessageTreatment(Message message, byte[] packetDatas, AccountUC account)
        {
            JobExperienceMultiUpdateMessage msg = (JobExperienceMultiUpdateMessage)message;

            using (BigEndianReader reader = new BigEndianReader(packetDatas))
            {
                msg.Deserialize(reader);
            }
            foreach (JobExperience i in msg.experiencesUpdate)
            {
                foreach (Core.Job.Job j in account.Jobs)
                {
                    if (i.jobId == j.Id)
                    {
                        j.Level            = i.jobLevel;
                        j.XP               = (int)i.jobXP;
                        j.XpLevelFloor     = (int)i.jobXpLevelFloor;
                        j.XpNextLevelFloor = (int)i.jobXpNextLevelFloor;
                        break;
                    }
                }
            }
            account.ActualizeJobs();
            foreach (JobUC j in account.JobsUC)
            {
                j.populateTreeview();
            }
        }