Register DisplayDollItemSyncHandler.
Moved the type check for 0 before itemSetDefaults to have less code run if the empty slots are clicked.
This commit is contained in:
parent
90dd61e668
commit
38a1351d38
2 changed files with 8 additions and 4 deletions
|
|
@ -3791,13 +3791,13 @@ namespace TShockAPI
|
|||
ushort stack = args.Data.ReadUInt16();
|
||||
int prefix = args.Data.ReadByte();
|
||||
|
||||
if (oldItem.type == 0 && newItem.type == 0)
|
||||
return false;
|
||||
|
||||
newItem.SetDefaults(itemType);
|
||||
newItem.stack = stack;
|
||||
newItem.Prefix(prefix);
|
||||
|
||||
if (oldItem.type == 0 && newItem.type == 0)
|
||||
return false;
|
||||
|
||||
if (OnDisplayDollItemSync(args.Player, args.Data, playerIndex, tileEntityID, displayDoll, slot, isDye, oldItem, newItem))
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue