Add TEDisplayDoll object to the event args.
This commit is contained in:
parent
69f232b12a
commit
408eaf4383
1 changed files with 7 additions and 2 deletions
|
|
@ -1960,6 +1960,10 @@ namespace TShockAPI
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int TileEntityID { get; set; }
|
public int TileEntityID { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
/// The TEDisplayDoll object that is being modified.
|
||||||
|
/// </summary>
|
||||||
|
public TEDisplayDoll DisplayDollEntity { get; set; }
|
||||||
|
/// <summary>
|
||||||
/// The slot of the DisplayDoll that is being modified.
|
/// The slot of the DisplayDoll that is being modified.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int Slot { get; set; }
|
public int Slot { get; set; }
|
||||||
|
|
@ -1980,7 +1984,7 @@ namespace TShockAPI
|
||||||
/// Called when a player modifies a DisplayDoll (Mannequin) item slot.
|
/// Called when a player modifies a DisplayDoll (Mannequin) item slot.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static HandlerList<DisplayDollItemSyncEventArgs> DisplayDollItemSync = new HandlerList<DisplayDollItemSyncEventArgs>();
|
public static HandlerList<DisplayDollItemSyncEventArgs> DisplayDollItemSync = new HandlerList<DisplayDollItemSyncEventArgs>();
|
||||||
private static bool OnDisplayDollItemSync(TSPlayer player, MemoryStream data, byte playerIndex, int tileEntityID, int slot, bool isDye, Item oldItem, Item newItem)
|
private static bool OnDisplayDollItemSync(TSPlayer player, MemoryStream data, byte playerIndex, int tileEntityID, TEDisplayDoll displayDollEntity, int slot, bool isDye, Item oldItem, Item newItem)
|
||||||
{
|
{
|
||||||
if (DisplayDollItemSync == null)
|
if (DisplayDollItemSync == null)
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -1991,6 +1995,7 @@ namespace TShockAPI
|
||||||
Data = data,
|
Data = data,
|
||||||
PlayerIndex = playerIndex,
|
PlayerIndex = playerIndex,
|
||||||
TileEntityID = tileEntityID,
|
TileEntityID = tileEntityID,
|
||||||
|
DisplayDollEntity = displayDollEntity,
|
||||||
Slot = slot,
|
Slot = slot,
|
||||||
IsDye = isDye,
|
IsDye = isDye,
|
||||||
OldItem = oldItem,
|
OldItem = oldItem,
|
||||||
|
|
@ -3794,7 +3799,7 @@ namespace TShockAPI
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (OnDisplayDollItemSync(args.Player, args.Data, playerIndex, tileEntityID, slot, isDye, oldItem, newItem))
|
if (OnDisplayDollItemSync(args.Player, args.Data, playerIndex, tileEntityID, displayDoll, slot, isDye, oldItem, newItem))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue