Merge branch 'quest-cape-fix' into 'master'

Quest Point Cape Login Check Fix

See merge request 2009scape/2009scape!337
This commit is contained in:
Ceikry 2021-11-27 08:37:10 +00:00
commit c6b2d9cf23
2 changed files with 4 additions and 1 deletions

View file

@ -60,3 +60,4 @@
< ---- ABOVE Released NOVEMBER 22, 2021 https://gitlab.com/2009scape/2009scape/-/tags/Nov-22-2021 ---- >
- Animations for passing through Isafdar Dense Forest added
- Implement Wire Traps, Leaf Traps, and Stick Traps in Isafdar
- Quest point cape/hood no longer unequip on login if wearing QP hood

View file

@ -76,7 +76,9 @@ public final class LoginValidationPlugin implements Plugin<Player> {
* @param player the player.
*/
private static void checkQuestPointsItems(final Player player) {
if (!player.getQuestRepository().hasCompletedAll() && player.getEquipment().contains(9813, 1) || player.getEquipment().contains(9814, 1)) {
if (!player.getQuestRepository().hasCompletedAll() &&
(player.getEquipment().contains(9813, 1) || player.getEquipment().contains(9814, 1))
) {
for (Item i : QUEST_ITEMS) {
if (player.getEquipment().remove(i)) {
player.getDialogueInterpreter().sendItemMessage(i, "As you no longer have completed all the quests, your " + i.getName() + " unequips itself to your " + (player.getInventory().freeSlots() < 1 ? "bank" : "inventory") + "!");