/// <summary> /// Marks the inventory available for interaction for this player. Returns a open inventory packet that can be sent to the server for synchronization. /// </summary> /// <param name="player"></param> /// <returns></returns> public virtual object Open(IPlayer player) { object packet = InvNetworkUtil.DidOpen(player); openedByPlayerGUIds.Add(player.PlayerUID); OnInventoryOpened?.Invoke(player); return(packet); }
/// <summary> /// Marks the inventory available for interaction for this player. Returns a open inventory packet that can be sent to the server for synchronization. /// </summary> /// <param name="player"></param> /// <returns></returns> public virtual object Open(IPlayer player) { object packet = InvNetworkUtil.DidOpen(player); openedByPlayerGUIds.Add(player.PlayerUID); OnInventoryOpened?.Invoke(player); Api.World.Logger.Audit("{0} opened inventory {1}", player.PlayerName, InventoryID); return(packet); }
public static void NotifyInventoryOpen(List <PickableObject> items) { OnPlayerDeactivated?.Invoke(); OnInventoryOpened?.Invoke(items); }