public VehicleInfo(RichTextBox rtbMain, TabControl tabControl, VehicleEntry vehicle) { _rtb = rtbMain; _vehicle = vehicle; _tabControl = tabControl; for (uint i = 0; i < (uint)Constants.MaxVehicleSeats; ++i) { var m = _vehicle.SeatId[i]; if (m == 0) continue; Contract.Assume(DBC.VehicleSeat.ContainsKey(m)); _tabControl.TabPages.Add("seat" + i); var seatInfo = new VehicleSeatInfo(_rtb, DBC.VehicleSeat[m]); Seats.Add(seatInfo); } ViewVehicleInfo(); }
public static uint GetUsedCount(VehicleEntry vehicle) { return SQL.CreatureTemplate.Count(x => x.Value.VehicleId == vehicle.Id).ToUInt32(); }