Log UserWeapon
This commit is contained in:
31
ReallifeGamemode.Server/Shop/Ammunation/Ammunation.cs
Normal file
31
ReallifeGamemode.Server/Shop/Ammunation/Ammunation.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using GTANetworkAPI;
|
||||
using ReallifeGamemode.Database.Entities;
|
||||
using ReallifeGamemode.Database.Models;
|
||||
|
||||
namespace ReallifeGamemode.Server.Shop.Ammunation
|
||||
{
|
||||
public class Ammunation
|
||||
{
|
||||
public Vector3 vector { get; set; }
|
||||
public List<Weapon> weaponList = new List<Weapon>();
|
||||
|
||||
public Ammunation(Vector3 position)
|
||||
{
|
||||
this.vector = vector;
|
||||
LoadWeapons();
|
||||
}
|
||||
|
||||
public void LoadWeapons()
|
||||
{
|
||||
using (var dbContext = new DatabaseContext())
|
||||
{
|
||||
weaponList = dbContext.Weapons.ToList();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user