public GangWeapon AddGangWeapon([FromUri] string gangId, GangWeapon gangWeapon) { if (!_gangManager.Spend(gangId, gangWeapon.Cost)) { return(null); } return(_weaponManager.AddGangWeapon(gangWeapon)); }
/// <summary> /// Buy equipment /// </summary> /// <param name="equipment">Equipment</param> public void BuyEquipment(GangWeapon equipment) { // TODO: Add some validation to ensure cost is correct. _gangManager.Spend(equipment.GangId, equipment.Cost); _weaponManager.AddGangWeapon(equipment); }