public void Load() { VTabFile tab = new VTabFile(Main.WeaponDataPath); int height = tab.GetHeight(); for (int row = 2; row <= height; row++) { VWeaponInfo info = new VWeaponInfo(); info.Id = tab.GetInteger(row, "Id"); info.ResName = tab.GetString(row, "ResName"); info.Type = (WeaponType)tab.GetInteger(row, "Type");; info.HurtId = tab.GetInteger(row, "HurtId"); info.AddHp = tab.GetFloat(row, "AddHp"); info.AddDefense = tab.GetFloat(row, "AddDefense"); info.AttackPhysic = tab.GetFloat(row, "AttackPhysic"); info.AddAttackCriticalPossibility = tab.GetFloat(row, "AddAttackCriticalPossibility"); info.AddMoveSpeed = tab.GetFloat(row, "AddMoveSpeed"); _WeaponSetting.Add(info.Id, info); } }
public void Init(VAnimal ani, int weaponId) { this._Parent = ani; this._WeaponInfo = VGame.Instance.WeaponTemManager.GetWeapon(weaponId); }