示例#1
0
        public void ParseInfo(Hashtable info)
        {
            this.hasWeapon       = info.GetValue <bool>((int)SPC.HasWeapon, false);
            this.optimalDistance = info.GetValue <float>((int)SPC.OptimalDistance, 0.0f);
            this.damage          = info.Value <float>((int)SPC.Damage);
            this.critDamage      = info.Value <float>((int)SPC.CritDamage);

            if (this.hasWeapon)
            {
                if (this.weaponObject == null)
                {
                    this.weaponObject = new WeaponInventoryObjectInfo();
                }

                this.weaponObject.ParseInfo(info.GetValue <Hashtable>((int)SPC.Source, new Hashtable()));
            }
            else
            {
                this.weaponObject = null;
            }
        }
        public void ParseInfo(Hashtable info)
        {
            this.hasWeapon       = info.GetValueBool((int)SPC.HasWeapon);
            this.optimalDistance = info.GetValueFloat((int)SPC.OptimalDistance);
            this.damage          = info.GetValueFloat((int)SPC.Damage);
            this.critDamage      = info.GetValueFloat((int)SPC.CritDamage);

            if (this.hasWeapon)
            {
                if (this.weaponObject == null)
                {
                    this.weaponObject = new WeaponInventoryObjectInfo();
                }

                this.weaponObject.ParseInfo(info.GetValueHash((int)SPC.Source));
            }
            else
            {
                this.weaponObject = null;
            }
        }