- Timestamp:
- Jun 12, 2023, 3:21:34 PM (17 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/MapRendering/Web/API/GetPlayerInventory.cs
r369 r446 21 21 } 22 22 23 Player p = PersistentContainer.Instance.Players [userId, false];23 Player p = PersistentContainer.Instance.Players.GetByUserId (userId); 24 24 if (p == null) { 25 25 _resp.StatusCode = (int) HttpStatusCode.NotFound; … … 30 30 GetInventoryArguments (_req, out bool showIconColor, out bool showIconName); 31 31 32 JSONObject result = DoPlayer ( userIdString,p, showIconColor, showIconName);32 JSONObject result = DoPlayer (p, showIconColor, showIconName); 33 33 34 34 WriteJSON (_resp, result); … … 45 45 } 46 46 47 internal static JSONObject DoPlayer ( string _steamId,Player _player, bool _showIconColor, bool _showIconName) {47 internal static JSONObject DoPlayer (Player _player, bool _showIconColor, bool _showIconName) { 48 48 PersistentData.Inventory inv = _player.Inventory; 49 49 … … 53 53 JSONArray belt = new JSONArray (); 54 54 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 ?? "")); 56 57 result.Add ("entityid", new JSONNumber (_player.EntityID)); 57 58 result.Add ("playername", new JSONString (_player.Name));
Note:
See TracChangeset
for help on using the changeset viewer.