public static void PostTellEquip(PlayerEquipment __instance, ushort __state, Transform[] ___thirdSlots, CSteamID steamID, ushort id) { if (!__instance.channel.checkServer(steamID)) { return; } if (___thirdSlots == null) { return; } if (__state == 0 && id == 0) { return; } if (__state != 0) { OnItemUnequipped?.Invoke(__instance.player); } if (id != 0 && __instance.asset != null) { var type = Assets.useableTypes.getType(__instance.asset.useable); if (type != null && typeof(Useable).IsAssignableFrom(type)) { OnItemEquipped?.Invoke(__instance.player); } } }
//Custom events private void OnItemEquippedEvent() { if (!Item.IsAir) { OnItemEquipped?.Invoke(this); } }
private void EquipFromInventory(Item item) { if (item is EquippableItem) { MoveItemToEquippmentInventory((EquippableItem)item); OnItemEquipped?.Invoke((EquippableItem)item); } }
public static void PostTellEquip(PlayerEquipment __instance, ushort __state) { if (__state == 0 && __instance.itemID == 0) { return; } if (__state != 0) { OnItemUnequipped?.Invoke(__instance.player); } if (__instance.useable != null) { OnItemEquipped?.Invoke(__instance.player); } }
public void ItemEquipped(Item item, Guid itemInstanceId) { OnItemEquipped?.Invoke(item, itemInstanceId); }
public void ItemEquipped(long id, Equipment.EquipmentSlot slot, BigInteger amount) { OnItemEquipped?.Invoke(id, slot, amount); }