/// <summary> /// Update a carying item. /// </summary> /// <param name="localID">The local ID of the item.</param> /// <param name="type">The type of update being done.</param> /// <param name="newItem"></param> public override void UpdateCarryingItem(byte localID, UpdateCarryingType type, Item newItem) { netmsg.AddU16(0x16); //Add header netmsg.AddByte((byte)type); netmsg.AddByte(localID); AddItemRaw(newItem, true, true, false); }
/// <summary> /// Update via appending protocol data to all viewers. /// </summary> /// <param name="item"></param> public void UpdateItem(Item item) { foreach (Player player in viewers) { byte index = player.GetContainerIndex(this); UpdateCarryingType type = index == 0 ? UpdateCarryingType.CONTAINER_ONE : UpdateCarryingType.CONTAINER_TWO; player.UpdateCarryingItem((byte)containerItems.IndexOf(item), type, item); } }
/* DEPRECATED */ public abstract void UpdateCarryingItem(byte localID, UpdateCarryingType type, Item newItem);
public override void UpdateCarryingItem(byte localID, UpdateCarryingType type, Item newItem) { throw new NotImplementedException(); }
public void UpdateCarryingItem(byte index, UpdateCarryingType type, Item newItem) { AddAffected(); protocolS.UpdateCarryingItem(index, type, newItem); }