Rewrote Ava's device handling

Rewrote the handling for both the accumulator and the attractor in new systems
Fixed a bug that would cause the devices to attract unwanted items at inappropriate times
Fixed a bug that prevented equip listeners from firing on login
This commit is contained in:
Ceikry
2022-08-20 08:10:26 +00:00
committed by Ryan
parent e7804fdd42
commit 69aa7a7557
8 changed files with 140 additions and 194 deletions
+11
View File
@@ -2084,4 +2084,15 @@ fun clearHintIcon(player: Player) {
val slot = getAttribute(player, "hinticon", -1)
player.removeAttribute("hinticon")
HintIconManager.removeHintIcon(player, slot)
}
/**
* Gets the equipment slot the item belongs to
* @param item the Id of the item to check
* @return the EquipmentSlot, or null if the item cannot be equipped, or has no slot defined.
*/
fun equipSlot(item: Int) : EquipmentSlot? {
return EquipmentSlot
.values()
.getOrNull(itemDefinition(item).getConfiguration(ItemConfigParser.EQUIP_SLOT, -1))
}