Ignore:
Timestamp:
Nov 16, 2018, 10:38:46 PM (6 years ago)
Author:
alloc
Message:

*Latest optimizations

File:
1 edited

Legend:

Unmodified
Added
Removed
  • binary-improvements/MapRendering/Web/API/GetPlayerInventories.cs

    r325 r332  
     1using System.Collections.Generic;
    12using System.Net;
    23using AllocsFixes.JSON;
     
    910                        JSONArray AllInventoriesResult = new JSONArray ();
    1011
    11                         foreach (string sid in PersistentContainer.Instance.Players.SteamIDs) {
    12                                 Player p = PersistentContainer.Instance.Players [sid, false];
     12                        foreach (KeyValuePair<string, Player> kvp in PersistentContainer.Instance.Players.Dict) {
     13                                Player p = kvp.Value;
    1314
    1415                                if (p == null) {
     
    2324                                        JSONArray belt = new JSONArray ();
    2425                                        JSONObject equipment = new JSONObject ();
    25                                         result.Add ("steamid", new JSONString (sid));
     26                                        result.Add ("steamid", new JSONString (kvp.Key));
    2627                                        result.Add ("entityid", new JSONNumber (p.EntityID));
    2728                                        result.Add ("playername", new JSONString (p.Name));
Note: See TracChangeset for help on using the changeset viewer.