Item stacks are shorts. Fixes severe SSC bugs
This commit is contained in:
parent
944b319bed
commit
3db37bb94a
1 changed files with 8 additions and 8 deletions
|
|
@ -198,7 +198,7 @@ namespace TShockAPI
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The stack edited
|
/// The stack edited
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public byte Stack { get; set; }
|
public short Stack { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The item prefix
|
/// The item prefix
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -212,7 +212,7 @@ namespace TShockAPI
|
||||||
/// PlayerSlot - called at a PlayerSlot event
|
/// PlayerSlot - called at a PlayerSlot event
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static HandlerList<PlayerSlotEventArgs> PlayerSlot;
|
public static HandlerList<PlayerSlotEventArgs> PlayerSlot;
|
||||||
private static bool OnPlayerSlot(byte _plr, byte _slot, byte _stack, byte _prefix, short _type)
|
private static bool OnPlayerSlot(byte _plr, byte _slot, short _stack, byte _prefix, short _type)
|
||||||
{
|
{
|
||||||
if (PlayerSlot == null)
|
if (PlayerSlot == null)
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -751,7 +751,7 @@ namespace TShockAPI
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// How many?
|
/// How many?
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public byte Stacks { get; set; }
|
public short Stacks { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Item prefix
|
/// Item prefix
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -766,7 +766,7 @@ namespace TShockAPI
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static HandlerList<ChestItemEventArgs> ChestItemChange;
|
public static HandlerList<ChestItemEventArgs> ChestItemChange;
|
||||||
|
|
||||||
private static bool OnChestItemChange(short id, byte slot, byte stacks, byte prefix, short type)
|
private static bool OnChestItemChange(short id, byte slot, short stacks, byte prefix, short type)
|
||||||
{
|
{
|
||||||
if (ChestItemChange == null)
|
if (ChestItemChange == null)
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -922,7 +922,7 @@ namespace TShockAPI
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Stacks
|
/// Stacks
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Int16 Stacks { get; set; }
|
public short Stacks { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Prefix of the item
|
/// Prefix of the item
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -941,7 +941,7 @@ namespace TShockAPI
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static HandlerList<ItemDropEventArgs> ItemDrop;
|
public static HandlerList<ItemDropEventArgs> ItemDrop;
|
||||||
|
|
||||||
private static bool OnItemDrop(short id, Vector2 pos, Vector2 vel, Int16 stacks, byte prefix, bool noDelay, short type)
|
private static bool OnItemDrop(short id, Vector2 pos, Vector2 vel, short stacks, byte prefix, bool noDelay, short type)
|
||||||
{
|
{
|
||||||
if (ItemDrop == null)
|
if (ItemDrop == null)
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -1258,7 +1258,7 @@ namespace TShockAPI
|
||||||
{
|
{
|
||||||
byte plr = args.Data.ReadInt8();
|
byte plr = args.Data.ReadInt8();
|
||||||
byte slot = args.Data.ReadInt8();
|
byte slot = args.Data.ReadInt8();
|
||||||
byte stack = args.Data.ReadInt8();
|
short stack = args.Data.ReadInt16();
|
||||||
byte prefix = args.Data.ReadInt8();
|
byte prefix = args.Data.ReadInt8();
|
||||||
short type = args.Data.ReadInt16();
|
short type = args.Data.ReadInt16();
|
||||||
|
|
||||||
|
|
@ -2746,7 +2746,7 @@ namespace TShockAPI
|
||||||
{
|
{
|
||||||
var id = args.Data.ReadInt16();
|
var id = args.Data.ReadInt16();
|
||||||
var slot = args.Data.ReadInt8();
|
var slot = args.Data.ReadInt8();
|
||||||
var stacks = args.Data.ReadInt8();
|
var stacks = args.Data.ReadInt16();
|
||||||
var prefix = args.Data.ReadInt8();
|
var prefix = args.Data.ReadInt8();
|
||||||
var type = args.Data.ReadInt16();
|
var type = args.Data.ReadInt16();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue