From 25ddb0ca99ee0bdb83f42312ab7ee60730113110 Mon Sep 17 00:00:00 2001 From: Sarjuuk Date: Fri, 7 Apr 2023 14:16:23 +0200 Subject: [PATCH] Items/FAP * show Feral Attack Power on weapons a druid can actually use (incuding 1H-weapons, excluding swords & axes (usually)) --- includes/types/item.class.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/includes/types/item.class.php b/includes/types/item.class.php index a0584e57..29a8f22e 100644 --- a/includes/types/item.class.php +++ b/includes/types/item.class.php @@ -1403,8 +1403,14 @@ class ItemList extends BaseType if ($this->curTpl['class'] != ITEM_CLASS_WEAPON) return 0; - // must be 2H weapon (2H-Mace, Polearm, Staff, ..Fishing Pole) - if (!in_array($this->curTpl['subClass'], [5, 6, 10, 20])) + $subClasses = [14]; // Misc Weapons + $druid = new CharClassList(array(['id', log(CLASS_DRUID, 2) + 1])); + if (!$druid->error) + for ($i = 0; $i < 21; $i++) + if ($druid->getField('weaponTypeMask') & (1 << $i)) + $subClasses[] = $i; + + if (!in_array($this->curTpl['subClass'], $subClasses)) return 0; // thats fucked up..