public void UpdateBackpack(string aPlayerSteamId, ItemStack[] aToolbar, ItemStack[] aBag)
        {
            Backpack backpack = TaskTools.Retry(() => backpack = ExecUpdate(aPlayerSteamId, aToolbar, aBag));

            if (backpack != null)
            {
                BackpackHub?.Clients.All.SendAsync("UpdateBackpack", JsonConvert.SerializeObject(backpack)).Wait();
            }
        }
Пример #2
0
 public Player GetPlayer(string aSteamId)
 {
     return(TaskTools.Retry(() =>
     {
         using (var DB = new PlayerContext())
         {
             return DB.Players.FirstOrDefault(P => P.SteamId == aSteamId);
         }
     }));
 }
Пример #3
0
 public Player GetPlayer(int aPlayerId)
 {
     return(TaskTools.Retry(() =>
     {
         using (var DB = new PlayerContext())
         {
             return DB.Players.FirstOrDefault(P => P.EntityId == aPlayerId);
         }
     }));
 }