private void PlayerInfoWorkerOnNewEntity(PlayerEntity playerEntity)
 {
     // delegate event from player info from ram, not required to subsribe; this is for YOU and includes all your stats
 }
Exemple #2
0
 /// <summary>
 /// </summary>
 /// <param name="sender"> </param>
 /// <param name="e"> </param>
 private void ScanTimerElapsed(object sender, ElapsedEventArgs e)
 {
     if (_isScanning)
     {
         return;
     }
     _isScanning = true;
     double refresh = 1000;
     if (Double.TryParse(Settings.Default.PlayerInfoWorkerRefresh.ToString(CultureInfo.InvariantCulture), out refresh))
     {
         _scanTimer.Interval = refresh;
     }
     Func<bool> scannerWorker = delegate
     {
         if (MemoryHandler.Instance.SigScanner.Locations.ContainsKey("CHARMAP"))
         {
             if (MemoryHandler.Instance.SigScanner.Locations.ContainsKey("PLAYERINFO"))
             {
                 PlayerInfoMap = MemoryHandler.Instance.SigScanner.Locations["PLAYERINFO"];
                 if (PlayerInfoMap <= 6496)
                 {
                     return false;
                 }
                 try
                 {
                     short enmityCount;
                     uint enmityStructure;
                     switch (Settings.Default.GameLanguage)
                     {
                         case "Chinese":
                             enmityCount = MemoryHandler.Instance.GetInt16(MemoryHandler.Instance.SigScanner.Locations["CHARMAP"] + 5688);
                             enmityStructure = MemoryHandler.Instance.SigScanner.Locations["CHARMAP"] + 3384;
                             break;
                         default:
                             enmityCount = MemoryHandler.Instance.GetInt16(MemoryHandler.Instance.SigScanner.Locations["CHARMAP"] - 0x1C590); // 116032
                             enmityStructure = MemoryHandler.Instance.SigScanner.Locations["CHARMAP"] - 0x1CE94; // 118340;
                             break;
                     }
                     var enmityEntries = new List<EnmityEntry>();
                     if (enmityCount > 0 && enmityCount < 32 && enmityStructure > 0)
                     {
                         for (uint i = 0; i < enmityCount; i++)
                         {
                             var address = enmityStructure + (i * 72);
                             var enmityEntry = new EnmityEntry
                             {
                                 ID = (uint) MemoryHandler.Instance.GetInt32(address),
                                 Name = MemoryHandler.Instance.GetString(address + 4),
                                 Enmity = (uint) MemoryHandler.Instance.GetInt16(address + 72)
                             };
                             if (enmityEntry.ID > 0)
                             {
                                 enmityEntries.Add(enmityEntry);
                             }
                         }
                     }
                     var source = MemoryHandler.Instance.GetByteArray(PlayerInfoMap, 0x256);
                     try
                     {
                         var entry = PlayerEntityHelper.ResolvePlayerFromBytes(source);
                         entry.EnmityEntries = enmityEntries;
                         var notify = false;
                         if (LastPlayerEntity == null)
                         {
                             LastPlayerEntity = entry;
                             notify = true;
                         }
                         else
                         {
                             var hash1 = JsonConvert.SerializeObject(LastPlayerEntity)
                                                    .GetHashCode();
                             var hash2 = JsonConvert.SerializeObject(entry)
                                                    .GetHashCode();
                             if (!hash1.Equals(hash2))
                             {
                                 LastPlayerEntity = entry;
                                 notify = true;
                             }
                         }
                         if (notify)
                         {
                             AppContextHelper.Instance.RaiseNewPlayerEntity(entry);
                         }
                     }
                     catch (Exception ex)
                     {
                     }
                 }
                 catch (Exception ex)
                 {
                 }
             }
             else
             {
                 try
                 {
                     switch (Settings.Default.GameLanguage)
                     {
                         case "Chinese":
                             PlayerInfoMap = MemoryHandler.Instance.SigScanner.Locations["CHARMAP"] + 5724;
                             break;
                         default:
                             PlayerInfoMap = MemoryHandler.Instance.SigScanner.Locations["CHARMAP"] - 115996;
                             break;
                     }
                     MemoryHandler.Instance.SigScanner.Locations.Add("PLAYERINFO", PlayerInfoMap);
                 }
                 catch (Exception ex)
                 {
                 }
             }
         }
         _isScanning = false;
         return true;
     };
     scannerWorker.BeginInvoke(delegate { }, scannerWorker);
 }
Exemple #3
0
 public void RaiseNewPlayerEntity(PlayerEntity playerEntity)
 {
     CurrentUserStats = playerEntity;
     // THIRD PARTY
     PluginHost.Instance.RaiseNewPlayerEntity(playerEntity);
 }
Exemple #4
0
 public virtual void RaiseNewPlayerEntity(PlayerEntity e)
 {
     var playerEntityEvent = new PlayerEntityEvent(this, e);
     var handler = NewPlayerEntity;
     if (handler != null)
     {
         handler(this, playerEntityEvent);
     }
 }
 public PlayerEntityEvent(object sender, PlayerEntity playerEntity)
 {
     Sender = sender;
     PlayerEntity = playerEntity;
 }
 /// <summary>
 /// </summary>
 /// <param name="sender"> </param>
 /// <param name="e"> </param>
 private void ScanTimerElapsed(object sender, ElapsedEventArgs e)
 {
     if (_isScanning)
     {
         return;
     }
     _isScanning = true;
     double refresh = 1000;
     if (Double.TryParse(Settings.Default.PlayerInfoWorkerRefresh.ToString(CultureInfo.InvariantCulture), out refresh))
     {
         _scanTimer.Interval = refresh;
     }
     Func<bool> scannerWorker = delegate
     {
         if (MemoryHandler.Instance.SigScanner.Locations.ContainsKey("CHARMAP"))
         {
             if (MemoryHandler.Instance.SigScanner.Locations.ContainsKey("PLAYERINFO"))
             {
                 PlayerInfoMap = MemoryHandler.Instance.SigScanner.Locations["PLAYERINFO"];
                 if (PlayerInfoMap <= 6496)
                 {
                     return false;
                 }
                 try
                 {
                     var enmityCount = MemoryHandler.Instance.GetInt16(MemoryHandler.Instance.SigScanner.Locations["CHARMAP"] + 5688);
                     var enmityStructure = MemoryHandler.Instance.SigScanner.Locations["CHARMAP"] + 3384;
                     var enmityEntries = new List<EnmityEntry>();
                     if (enmityCount > 0 && enmityCount < 32 && enmityStructure > 0)
                     {
                         for (uint i = 0; i < enmityCount; i++)
                         {
                             var address = enmityStructure + (i * 72);
                             var enmityEntry = new EnmityEntry
                             {
                                 Name = MemoryHandler.Instance.GetString(address),
                                 ID = (uint) MemoryHandler.Instance.GetInt32(address + 64),
                                 Enmity = (uint) MemoryHandler.Instance.GetInt16(address + 68)
                             };
                             if (enmityEntry.ID > 0)
                             {
                                 enmityEntries.Add(enmityEntry);
                             }
                         }
                     }
                     var playerInfo = MemoryHandler.Instance.GetStructure<Structures.PlayerInfo>(PlayerInfoMap);
                     var playerEntity = new PlayerEntity
                     {
                         Name = MemoryHandler.Instance.GetString(PlayerInfoMap, 1),
                         EnmityEntries = enmityEntries,
                         Accuracy = playerInfo.Accuracy,
                         ACN = playerInfo.ACN,
                         ACN_CurrentEXP = playerInfo.ACN_CurrentEXP,
                         ALC = playerInfo.ALC,
                         ARC = playerInfo.ARC,
                         ARC_CurrentEXP = playerInfo.ARC_CurrentEXP,
                         ARM = playerInfo.ARM,
                         ARM_CurrentEXP = playerInfo.ARM_CurrentEXP,
                         AttackMagicPotency = playerInfo.AttackMagicPotency,
                         AttackPower = playerInfo.AttackPower,
                         BTN = playerInfo.BTN,
                         BTN_CurrentEXP = playerInfo.BTN_CurrentEXP,
                         BSM = playerInfo.BSM,
                         BSM_CurrentEXP = playerInfo.BSM_CurrentEXP,
                         BaseDexterity = playerInfo.BaseDexterity,
                         BaseIntelligence = playerInfo.BaseIntelligence,
                         BaseMind = playerInfo.BaseMind,
                         BasePiety = playerInfo.BasePiety,
                         BaseStrength = playerInfo.BaseStrength,
                         BaseVitality = playerInfo.BaseVitality,
                         CNJ = playerInfo.CNJ,
                         CNJ_CurrentEXP = playerInfo.CNJ_CurrentEXP,
                         CPMax = playerInfo.CPMax,
                         CPT = playerInfo.CPT,
                         CPT_CurrentEXP = playerInfo.CPT_CurrentEXP,
                         CUL = playerInfo.CUL,
                         CUL_CurrentEXP = playerInfo.CUL_CurrentEXP,
                         Control = playerInfo.Control,
                         Craftmanship = playerInfo.Craftmanship,
                         CriticalHitRate = playerInfo.CriticalHitRate,
                         Defense = playerInfo.Defense,
                         Determination = playerInfo.Determination,
                         Dexterity = playerInfo.Dexterity,
                         FSH = playerInfo.FSH,
                         FSH_CurrentEXP = playerInfo.FSH_CurrentEXP,
                         FireResistance = playerInfo.FireResistance,
                         GLD = playerInfo.GLD,
                         GLD_CurrentEXP = playerInfo.GLD_CurrentEXP,
                         GPMax = playerInfo.GPMax,
                         GSM = playerInfo.GSM,
                         GSM_CurrentEXP = playerInfo.GSM_CurrentEXP,
                         Gathering = playerInfo.Gathering,
                         HPMax = playerInfo.HPMax,
                         HealingMagicPotency = playerInfo.HealingMagicPotency,
                         IceResistance = playerInfo.IceResistance,
                         Intelligence = playerInfo.Intelligence,
                         JobID = playerInfo.JobID,
                         LNC = playerInfo.LNC,
                         LNC_CurrentEXP = playerInfo.LNC_CurrentEXP,
                         LTW = playerInfo.LTW,
                         LTW_CurrentEXP = playerInfo.LTW_CurrentEXP,
                         LightningResistance = playerInfo.LightningResistance,
                         MIN = playerInfo.MIN,
                         MIN_CurrentEXP = playerInfo.MIN_CurrentEXP,
                         MPMax = playerInfo.MPMax,
                         MRD = playerInfo.MRD,
                         MRD_CurrentEXP = playerInfo.MRD_CurrentEXP,
                         MagicDefense = playerInfo.MagicDefense,
                         Mind = playerInfo.Mind,
                         PGL = playerInfo.PGL,
                         PGL_CurrentEXP = playerInfo.PGL_CurrentEXP,
                         Parry = playerInfo.Parry,
                         Perception = playerInfo.Perception,
                         PiercingResistance = playerInfo.PiercingResistance,
                         Piety = playerInfo.Piety,
                         SkillSpeed = playerInfo.SkillSpeed,
                         SlashingResistance = playerInfo.SlashingResistance,
                         SpellSpeed = playerInfo.SpellSpeed,
                         Strength = playerInfo.Strength,
                         THM = playerInfo.THM,
                         THM_CurrentEXP = playerInfo.THM_CurrentEXP,
                         TPMax = playerInfo.TPMax,
                         Vitality = playerInfo.Vitality,
                         WVR = playerInfo.WVR,
                         WVR_CurrentEXP = playerInfo.WVR_CurrentEXP,
                         WaterResistance = playerInfo.WaterResistance,
                         WindResistance = playerInfo.WindResistance
                     };
                     playerEntity.Job = (Actor.Job) playerEntity.JobID;
                     var notify = false;
                     if (LastPlayerEntity == null)
                     {
                         LastPlayerEntity = playerEntity;
                         notify = true;
                     }
                     else
                     {
                         var hash1 = JsonConvert.SerializeObject(LastPlayerEntity)
                                                .GetHashCode();
                         var hash2 = JsonConvert.SerializeObject(playerEntity)
                                                .GetHashCode();
                         if (!hash1.Equals(hash2))
                         {
                             LastPlayerEntity = playerEntity;
                             notify = true;
                         }
                     }
                     if (notify)
                     {
                         AppContextHelper.Instance.RaiseNewPlayerEntity(playerEntity);
                     }
                 }
                 catch (Exception ex)
                 {
                 }
             }
             else
             {
                 try
                 {
                     PlayerInfoMap = MemoryHandler.Instance.SigScanner.Locations["CHARMAP"] + 5724;
                     MemoryHandler.Instance.SigScanner.Locations.Add("PLAYERINFO", PlayerInfoMap);
                 }
                 catch (Exception ex)
                 {
                 }
             }
         }
         _isScanning = false;
         return true;
     };
     scannerWorker.BeginInvoke(delegate { }, scannerWorker);
 }
        public static PlayerEntity ResolvePlayerFromBytes(byte[] source)
        {
            var entry = new PlayerEntity();
            try
            {
                entry.Name = MemoryHandler.Instance.GetStringFromBytes(source, 1);

                switch (Settings.Default.GameLanguage)
                {
                    case "Chinese":
                        entry.JobID = source[0x64];
                        entry.Job = (Actor.Job) entry.JobID;

                        #region Job Levels

                        entry.GLD = source[0x66];
                        entry.PGL = source[0x68];
                        entry.MRD = source[0x6A];
                        entry.LNC = source[0x6C];
                        entry.ARC = source[0x6E];
                        entry.CNJ = source[0x70];
                        entry.THM = source[0x72];

                        entry.CPT = source[0x74];
                        entry.BSM = source[0x76];
                        entry.ARM = source[0x78];
                        entry.GSM = source[0x7A];
                        entry.LTW = source[0x7C];
                        entry.WVR = source[0x7E];
                        entry.ALC = source[0x80];
                        entry.CUL = source[0x82];

                        entry.MIN = source[0x84];
                        entry.BTN = source[0x86];
                        entry.FSH = source[0x88];

                        entry.ACN = source[0x8A];
                        entry.ROG = source[0x8C];

                        #endregion

                        #region Current Experience

                        entry.GLD_CurrentEXP = BitConverter.ToInt32(source, 0x94);
                        entry.PGL_CurrentEXP = BitConverter.ToInt32(source, 0x98);
                        entry.MRD_CurrentEXP = BitConverter.ToInt32(source, 0x9C);
                        entry.LNC_CurrentEXP = BitConverter.ToInt32(source, 0xA0);
                        entry.ARC_CurrentEXP = BitConverter.ToInt32(source, 0xA4);
                        entry.CNJ_CurrentEXP = BitConverter.ToInt32(source, 0xA8);
                        entry.THM_CurrentEXP = BitConverter.ToInt32(source, 0xAC);

                        entry.CPT_CurrentEXP = BitConverter.ToInt32(source, 0xB0);
                        entry.BSM_CurrentEXP = BitConverter.ToInt32(source, 0xB4);
                        entry.ARM_CurrentEXP = BitConverter.ToInt32(source, 0xB8);
                        entry.GSM_CurrentEXP = BitConverter.ToInt32(source, 0xBC);
                        entry.LTW_CurrentEXP = BitConverter.ToInt32(source, 0xC0);
                        entry.WVR_CurrentEXP = BitConverter.ToInt32(source, 0xC4);
                        entry.ALC_CurrentEXP = BitConverter.ToInt32(source, 0xC8);
                        entry.CUL_CurrentEXP = BitConverter.ToInt32(source, 0xCC);

                        entry.MIN_CurrentEXP = BitConverter.ToInt32(source, 0xD0);
                        entry.BTN_CurrentEXP = BitConverter.ToInt32(source, 0xD4);
                        entry.FSH_CurrentEXP = BitConverter.ToInt32(source, 0xD8);

                        entry.ACN_CurrentEXP = BitConverter.ToInt32(source, 0xDC);
                        entry.ROG_CurrentEXP = BitConverter.ToInt32(source, 0xE0);

                        #endregion

                        #region Base Stats

                        entry.BaseStrength = BitConverter.ToInt16(source, 0xFC);
                        entry.BaseDexterity = BitConverter.ToInt16(source, 0x100);
                        entry.BaseVitality = BitConverter.ToInt16(source, 0x104);
                        entry.BaseIntelligence = BitConverter.ToInt16(source, 0x108);
                        entry.BaseMind = BitConverter.ToInt16(source, 0x10C);
                        entry.BasePiety = BitConverter.ToInt16(source, 0x110);

                        #endregion

                        #region Base Stats (base+gear+bonus)

                        entry.Strength = BitConverter.ToInt16(source, 0x118);
                        entry.Dexterity = BitConverter.ToInt16(source, 0x11C);
                        entry.Vitality = BitConverter.ToInt16(source, 0x120);
                        entry.Intelligence = BitConverter.ToInt16(source, 0x124);
                        entry.Mind = BitConverter.ToInt16(source, 0x128);
                        entry.Piety = BitConverter.ToInt16(source, 0x12C);

                        #endregion

                        #region Basic Info

                        entry.HPMax = BitConverter.ToInt16(source, 0x130);
                        entry.MPMax = BitConverter.ToInt16(source, 0x134);
                        entry.TPMax = BitConverter.ToInt16(source, 0x138);
                        entry.GPMax = BitConverter.ToInt16(source, 0x13C);
                        entry.CPMax = BitConverter.ToInt16(source, 0x140);

                        #endregion

                        #region Offensive Properties

                        entry.Accuracy = BitConverter.ToInt16(source, 0x16C);
                        entry.CriticalHitRate = BitConverter.ToInt16(source, 0x180);
                        entry.Determination = BitConverter.ToInt16(source, 0x1C4);

                        #endregion

                        #region Defensive Properties

                        entry.Parry = BitConverter.ToInt16(source, 0x160);
                        entry.Defense = BitConverter.ToInt16(source, 0x168);
                        entry.MagicDefense = BitConverter.ToInt16(source, 0x174);

                        #endregion

                        #region Phyiscal Properties

                        entry.AttackPower = BitConverter.ToInt16(source, 0x164);
                        entry.SkillSpeed = BitConverter.ToInt16(source, 0x1C8);

                        #endregion

                        #region Mental Properties

                        entry.SpellSpeed = BitConverter.ToInt16(source, 0x170);
                        entry.AttackMagicPotency = BitConverter.ToInt16(source, 0x198);
                        entry.HealingMagicPotency = BitConverter.ToInt16(source, 0x19C);

                        #endregion

                        #region Status Resistances

                        //entry.SlowResistance = BitConverter.ToInt16(source, 0x1C8);
                        //entry.SilenceResistance = BitConverter.ToInt16(source, 0x1CC);
                        //entry.BindResistance = BitConverter.ToInt16(source, 0x1D0);
                        //entry.PoisionResistance = BitConverter.ToInt16(source, 0x1D4);
                        //entry.StunResistance = BitConverter.ToInt16(source, 0x1D8);
                        //entry.SleepResistance = BitConverter.ToInt16(source, 0x1DC);
                        //entry.BindResistance = BitConverter.ToInt16(source, 0x1E0);
                        //entry.HeavyResistance = BitConverter.ToInt16(source, 0x1E4);

                        #endregion

                        #region Elemental Resistances

                        entry.FireResistance = BitConverter.ToInt16(source, 0x1A8);
                        entry.IceResistance = BitConverter.ToInt16(source, 0x1AC);
                        entry.WindResistance = BitConverter.ToInt16(source, 0x1B0);
                        entry.EarthResistance = BitConverter.ToInt16(source, 0x1B4);
                        entry.LightningResistance = BitConverter.ToInt16(source, 0x1B8);
                        entry.WaterResistance = BitConverter.ToInt16(source, 0x1BC);

                        #endregion

                        #region Physical Resistances

                        entry.SlashingResistance = BitConverter.ToInt16(source, 0x188);
                        entry.PiercingResistance = BitConverter.ToInt16(source, 0x18C);
                        entry.BluntResistance = BitConverter.ToInt16(source, 0x190);

                        #endregion

                        #region Crafting

                        entry.Craftmanship = BitConverter.ToInt16(source, 0x22C);
                        entry.Control = BitConverter.ToInt16(source, 0x230);

                        #endregion

                        #region Gathering

                        entry.Gathering = BitConverter.ToInt16(source, 0x234);
                        entry.Perception = BitConverter.ToInt16(source, 0x238);

                        #endregion

                        break;
                    default:
                        entry.JobID = source[0x64];
                        entry.Job = (Actor.Job) entry.JobID;

                        #region Job Levels

                        entry.GLD = source[0x66];
                        entry.PGL = source[0x68];
                        entry.MRD = source[0x6A];
                        entry.LNC = source[0x6C];
                        entry.ARC = source[0x6E];
                        entry.CNJ = source[0x70];
                        entry.THM = source[0x72];

                        entry.CPT = source[0x74];
                        entry.BSM = source[0x76];
                        entry.ARM = source[0x78];
                        entry.GSM = source[0x7A];
                        entry.LTW = source[0x7C];
                        entry.WVR = source[0x7E];
                        entry.ALC = source[0x80];
                        entry.CUL = source[0x82];

                        entry.MIN = source[0x84];
                        entry.BTN = source[0x86];
                        entry.FSH = source[0x88];

                        entry.ACN = source[0x8A];
                        entry.ROG = source[0x8C];

                        #endregion

                        #region Current Experience

                        entry.GLD_CurrentEXP = BitConverter.ToInt32(source, 0x94);
                        entry.PGL_CurrentEXP = BitConverter.ToInt32(source, 0x98);
                        entry.MRD_CurrentEXP = BitConverter.ToInt32(source, 0x9C);
                        entry.LNC_CurrentEXP = BitConverter.ToInt32(source, 0xA0);
                        entry.ARC_CurrentEXP = BitConverter.ToInt32(source, 0xA4);
                        entry.CNJ_CurrentEXP = BitConverter.ToInt32(source, 0xA8);
                        entry.THM_CurrentEXP = BitConverter.ToInt32(source, 0xAC);

                        entry.CPT_CurrentEXP = BitConverter.ToInt32(source, 0xB0);
                        entry.BSM_CurrentEXP = BitConverter.ToInt32(source, 0xB4);
                        entry.ARM_CurrentEXP = BitConverter.ToInt32(source, 0xB8);
                        entry.GSM_CurrentEXP = BitConverter.ToInt32(source, 0xBC);
                        entry.LTW_CurrentEXP = BitConverter.ToInt32(source, 0xC0);
                        entry.WVR_CurrentEXP = BitConverter.ToInt32(source, 0xC4);
                        entry.ALC_CurrentEXP = BitConverter.ToInt32(source, 0xC8);
                        entry.CUL_CurrentEXP = BitConverter.ToInt32(source, 0xCC);

                        entry.MIN_CurrentEXP = BitConverter.ToInt32(source, 0xD0);
                        entry.BTN_CurrentEXP = BitConverter.ToInt32(source, 0xD4);
                        entry.FSH_CurrentEXP = BitConverter.ToInt32(source, 0xD8);

                        entry.ACN_CurrentEXP = BitConverter.ToInt32(source, 0xDC);
                        entry.ROG_CurrentEXP = BitConverter.ToInt32(source, 0xE0);

                        #endregion

                        #region Base Stats

                        entry.BaseStrength = BitConverter.ToInt16(source, 0xFC);
                        entry.BaseDexterity = BitConverter.ToInt16(source, 0x100);
                        entry.BaseVitality = BitConverter.ToInt16(source, 0x104);
                        entry.BaseIntelligence = BitConverter.ToInt16(source, 0x108);
                        entry.BaseMind = BitConverter.ToInt16(source, 0x10C);
                        entry.BasePiety = BitConverter.ToInt16(source, 0x110);

                        #endregion

                        #region Base Stats (base+gear+bonus)

                        entry.Strength = BitConverter.ToInt16(source, 0x118);
                        entry.Dexterity = BitConverter.ToInt16(source, 0x11C);
                        entry.Vitality = BitConverter.ToInt16(source, 0x120);
                        entry.Intelligence = BitConverter.ToInt16(source, 0x124);
                        entry.Mind = BitConverter.ToInt16(source, 0x128);
                        entry.Piety = BitConverter.ToInt16(source, 0x12C);

                        #endregion

                        #region Basic Info

                        entry.HPMax = BitConverter.ToInt16(source, 0x130);
                        entry.MPMax = BitConverter.ToInt16(source, 0x134);
                        entry.TPMax = BitConverter.ToInt16(source, 0x138);
                        entry.GPMax = BitConverter.ToInt16(source, 0x13C);
                        entry.CPMax = BitConverter.ToInt16(source, 0x140);

                        #endregion

                        #region Offensive Properties

                        entry.Accuracy = BitConverter.ToInt16(source, 0x16C);
                        entry.CriticalHitRate = BitConverter.ToInt16(source, 0x180);
                        entry.Determination = BitConverter.ToInt16(source, 0x1C4);

                        #endregion

                        #region Defensive Properties

                        entry.Parry = BitConverter.ToInt16(source, 0x160);
                        entry.Defense = BitConverter.ToInt16(source, 0x168);
                        entry.MagicDefense = BitConverter.ToInt16(source, 0x174);

                        #endregion

                        #region Phyiscal Properties

                        entry.AttackPower = BitConverter.ToInt16(source, 0x164);
                        entry.SkillSpeed = BitConverter.ToInt16(source, 0x1C8);

                        #endregion

                        #region Mental Properties

                        entry.SpellSpeed = BitConverter.ToInt16(source, 0x170);
                        entry.AttackMagicPotency = BitConverter.ToInt16(source, 0x198);
                        entry.HealingMagicPotency = BitConverter.ToInt16(source, 0x19C);

                        #endregion

                        #region Status Resistances

                        //entry.SlowResistance = BitConverter.ToInt16(source, 0x1C8);
                        //entry.SilenceResistance = BitConverter.ToInt16(source, 0x1CC);
                        //entry.BindResistance = BitConverter.ToInt16(source, 0x1D0);
                        //entry.PoisionResistance = BitConverter.ToInt16(source, 0x1D4);
                        //entry.StunResistance = BitConverter.ToInt16(source, 0x1D8);
                        //entry.SleepResistance = BitConverter.ToInt16(source, 0x1DC);
                        //entry.BindResistance = BitConverter.ToInt16(source, 0x1E0);
                        //entry.HeavyResistance = BitConverter.ToInt16(source, 0x1E4);

                        #endregion

                        #region Elemental Resistances

                        entry.FireResistance = BitConverter.ToInt16(source, 0x1A8);
                        entry.IceResistance = BitConverter.ToInt16(source, 0x1AC);
                        entry.WindResistance = BitConverter.ToInt16(source, 0x1B0);
                        entry.EarthResistance = BitConverter.ToInt16(source, 0x1B4);
                        entry.LightningResistance = BitConverter.ToInt16(source, 0x1B8);
                        entry.WaterResistance = BitConverter.ToInt16(source, 0x1BC);

                        #endregion

                        #region Physical Resistances

                        entry.SlashingResistance = BitConverter.ToInt16(source, 0x188);
                        entry.PiercingResistance = BitConverter.ToInt16(source, 0x18C);
                        entry.BluntResistance = BitConverter.ToInt16(source, 0x190);

                        #endregion

                        #region Crafting

                        entry.Craftmanship = BitConverter.ToInt16(source, 0x22C);
                        entry.Control = BitConverter.ToInt16(source, 0x230);

                        #endregion

                        #region Gathering

                        entry.Gathering = BitConverter.ToInt16(source, 0x234);
                        entry.Perception = BitConverter.ToInt16(source, 0x238);

                        #endregion

                        break;
                }
            }
            catch (Exception ex)
            {
            }
            return entry;
        }