Removed vespucci cardealer, add interior system (teleport missing)

This commit is contained in:
hydrant
2018-12-24 15:26:38 +01:00
parent cae6c951a9
commit d22cf6e1ba
5 changed files with 186 additions and 3 deletions

View File

@@ -0,0 +1,27 @@
using reallife_gamemode.Model;
using reallife_gamemode.Server.Entities;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace reallife_gamemode.Server.Managers
{
public class InteriorManager
{
public static Interior GetInteriorByName(string name, DatabaseContext dbContext = null)
{
if(dbContext == null)
{
using (dbContext = new DatabaseContext())
{
return dbContext.Interiors.Where(i => i.Name.ToLower() == name.ToLower()).FirstOrDefault();
}
}
else
{
return dbContext.Interiors.Where(i => i.Name.ToLower() == name.ToLower()).FirstOrDefault();
}
}
}
}