Ignore:
Timestamp:
Jun 12, 2023, 3:21:34 PM (17 months ago)
Author:
alloc
Message:

24_27_41

File:
1 edited

Legend:

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

    r369 r446  
    2121                        }
    2222
    23                         Player p = PersistentContainer.Instance.Players [userId, false];
     23                        Player p = PersistentContainer.Instance.Players.GetByUserId (userId);
    2424                        if (p == null) {
    2525                                _resp.StatusCode = (int) HttpStatusCode.NotFound;
     
    3030                        GetInventoryArguments (_req, out bool showIconColor, out bool showIconName);
    3131
    32                         JSONObject result = DoPlayer (userIdString, p, showIconColor, showIconName);
     32                        JSONObject result = DoPlayer (p, showIconColor, showIconName);
    3333
    3434                        WriteJSON (_resp, result);
     
    4545                }
    4646
    47                 internal static JSONObject DoPlayer (string _steamId, Player _player, bool _showIconColor, bool _showIconName) {
     47                internal static JSONObject DoPlayer (Player _player, bool _showIconColor, bool _showIconName) {
    4848                        PersistentData.Inventory inv = _player.Inventory;
    4949
     
    5353                        JSONArray belt = new JSONArray ();
    5454                        JSONObject equipment = new JSONObject ();
    55                         result.Add ("userid", new JSONString (_steamId));
     55                        result.Add ("userid", new JSONString (_player.PlatformId.CombinedString));
     56                        result.Add ("crossplatformid", new JSONString (_player.CrossPlatformId?.CombinedString ?? ""));
    5657                        result.Add ("entityid", new JSONNumber (_player.EntityID));
    5758                        result.Add ("playername", new JSONString (_player.Name));
Note: See TracChangeset for help on using the changeset viewer.