From 0145bebb1066041c76eb6ccec8fc34d4da17a47a Mon Sep 17 00:00:00 2001 From: kadeshar Date: Mon, 29 Sep 2025 20:41:21 +0200 Subject: [PATCH] - Fix to make bots roll and equip for correct relic --- .../game/Entities/Player/PlayerStorage.cpp | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/server/game/Entities/Player/PlayerStorage.cpp b/src/server/game/Entities/Player/PlayerStorage.cpp index d45533ad6..4dde1cc16 100644 --- a/src/server/game/Entities/Player/PlayerStorage.cpp +++ b/src/server/game/Entities/Player/PlayerStorage.cpp @@ -2296,6 +2296,26 @@ InventoryResult Player::CanUseItem(ItemTemplate const* proto) const return EQUIP_ERR_YOU_CAN_NEVER_USE_THAT_ITEM; } + if (proto->Class == ITEM_CLASS_ARMOR && proto->SubClass == ITEM_SUBCLASS_ARMOR_IDOL && !IsClass(CLASS_DRUID, CLASS_CONTEXT_EQUIP_RELIC)) + { + return EQUIP_ERR_YOU_CAN_NEVER_USE_THAT_ITEM; + } + + if (proto->Class == ITEM_CLASS_ARMOR && proto->SubClass == ITEM_SUBCLASS_ARMOR_TOTEM && !IsClass(CLASS_SHAMAN, CLASS_CONTEXT_EQUIP_RELIC)) + { + return EQUIP_ERR_YOU_CAN_NEVER_USE_THAT_ITEM; + } + + if (proto->Class == ITEM_CLASS_ARMOR && proto->SubClass == ITEM_SUBCLASS_ARMOR_LIBRAM && !IsClass(CLASS_PALADIN, CLASS_CONTEXT_EQUIP_RELIC)) + { + return EQUIP_ERR_YOU_CAN_NEVER_USE_THAT_ITEM; + } + + if (proto->Class == ITEM_CLASS_ARMOR && proto->SubClass == ITEM_SUBCLASS_ARMOR_SIGIL && !IsClass(CLASS_DEATH_KNIGHT, CLASS_CONTEXT_EQUIP_RELIC)) + { + return EQUIP_ERR_YOU_CAN_NEVER_USE_THAT_ITEM; + } + if (proto->RequiredSkill != 0) { if (GetSkillValue(proto->RequiredSkill) == 0)