Added Roving Elves quest requirement to crystal gear equip

This commit is contained in:
DebbySaurus
2022-09-25 14:38:29 +00:00
committed by Ryan
parent 0fcf442ec5
commit e0c68ef7ef
@@ -45,6 +45,31 @@ class ItemQuestRequirementListener : InteractionListener {
Items.DRAGON_LONGSWORD_1305
)
private val crystalEquipment = intArrayOf(
Items.NEW_CRYSTAL_BOW_4212,
Items.CRYSTAL_BOW_FULL_4214,
Items.CRYSTAL_BOW_9_10_4215,
Items.CRYSTAL_BOW_8_10_4216,
Items.CRYSTAL_BOW_7_10_4217,
Items.CRYSTAL_BOW_6_10_4218,
Items.CRYSTAL_BOW_5_10_4219,
Items.CRYSTAL_BOW_4_10_4220,
Items.CRYSTAL_BOW_3_10_4221,
Items.CRYSTAL_BOW_2_10_4222,
Items.CRYSTAL_BOW_1_10_4223,
Items.NEW_CRYSTAL_SHIELD_4224,
Items.CRYSTAL_SHIELD_FULL_4225,
Items.CRYSTAL_SHIELD_9_10_4226,
Items.CRYSTAL_SHIELD_8_10_4227,
Items.CRYSTAL_SHIELD_7_10_4228,
Items.CRYSTAL_SHIELD_6_10_4229,
Items.CRYSTAL_SHIELD_5_10_4230,
Items.CRYSTAL_SHIELD_4_10_4231,
Items.CRYSTAL_SHIELD_3_10_4232,
Items.CRYSTAL_SHIELD_2_10_4233,
Items.CRYSTAL_SHIELD_1_10_4234
)
private val questCapes = intArrayOf(9813,9814)
override fun defineListeners() {
@@ -139,5 +164,13 @@ class ItemQuestRequirementListener : InteractionListener {
}
return@onEquip true
}
onEquip(crystalEquipment){ player, _ ->
if (!isQuestComplete(player, "Roving Elves")) {
sendMessage(player, "You must have completed Roving Elves to equip this.")
return@onEquip false
}
return@onEquip true
}
}
}