Revert "feat(GetDataHandler): add ForceItemIntoNearestChest"
This reverts commit 939d1582f5.
This commit is contained in:
parent
0b79a6bee4
commit
2cf08d393c
1 changed files with 0 additions and 37 deletions
|
|
@ -130,7 +130,6 @@ namespace TShockAPI
|
||||||
{ PacketTypes.NumberOfAnglerQuestsCompleted, HandleNumberOfAnglerQuestsCompleted },
|
{ PacketTypes.NumberOfAnglerQuestsCompleted, HandleNumberOfAnglerQuestsCompleted },
|
||||||
{ PacketTypes.PlaceObject, HandlePlaceObject },
|
{ PacketTypes.PlaceObject, HandlePlaceObject },
|
||||||
{ PacketTypes.LoadNetModule, HandleLoadNetModule },
|
{ PacketTypes.LoadNetModule, HandleLoadNetModule },
|
||||||
{ PacketTypes.ForceItemIntoNearestChest, HandleForceItemIntoNearestChest },
|
|
||||||
{ PacketTypes.PlaceTileEntity, HandlePlaceTileEntity },
|
{ PacketTypes.PlaceTileEntity, HandlePlaceTileEntity },
|
||||||
{ PacketTypes.PlaceItemFrame, HandlePlaceItemFrame },
|
{ PacketTypes.PlaceItemFrame, HandlePlaceItemFrame },
|
||||||
{ PacketTypes.UpdateItemDrop, HandleItemDrop },
|
{ PacketTypes.UpdateItemDrop, HandleItemDrop },
|
||||||
|
|
@ -1791,30 +1790,6 @@ namespace TShockAPI
|
||||||
return args.Handled;
|
return args.Handled;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>For use in a ForceItemIntoNearestChest event.</summary>
|
|
||||||
public class ForceItemIntoNearestChestEventArgs : GetDataHandledEventArgs
|
|
||||||
{
|
|
||||||
/// <summary>The slot index of the item being attempted to put into a chest.</summary>
|
|
||||||
public short Slot { get; set; }
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>Fired when a ForceItemIntoNearestChest event occurs.</summary>
|
|
||||||
public static HandlerList<ForceItemIntoNearestChestEventArgs> ForceItemIntoNearestChest = new HandlerList<ForceItemIntoNearestChestEventArgs>();
|
|
||||||
private static bool OnForceItemIntoNearest(TSPlayer player, MemoryStream data, short slot)
|
|
||||||
{
|
|
||||||
|
|
||||||
var args = new ForceItemIntoNearestChestEventArgs
|
|
||||||
{
|
|
||||||
Player = player,
|
|
||||||
Data = data,
|
|
||||||
Slot = slot
|
|
||||||
};
|
|
||||||
|
|
||||||
ForceItemIntoNearestChest.Invoke(null, args);
|
|
||||||
return args.Handled;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>For use in a PlaceTileEntity event.</summary>
|
/// <summary>For use in a PlaceTileEntity event.</summary>
|
||||||
public class PlaceTileEntityEventArgs : GetDataHandledEventArgs
|
public class PlaceTileEntityEventArgs : GetDataHandledEventArgs
|
||||||
{
|
{
|
||||||
|
|
@ -4113,18 +4088,6 @@ namespace TShockAPI
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static bool HandleForceItemIntoNearestChest(GetDataHandlerArgs args)
|
|
||||||
{
|
|
||||||
var slot = args.Data.ReadInt16();
|
|
||||||
|
|
||||||
if (OnForceItemIntoNearest(args.Player, args.Data, slot))
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static bool HandlePlaceTileEntity(GetDataHandlerArgs args)
|
private static bool HandlePlaceTileEntity(GetDataHandlerArgs args)
|
||||||
{
|
{
|
||||||
var x = args.Data.ReadInt16();
|
var x = args.Data.ReadInt16();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue