Items/FAP

* show Feral Attack Power on weapons a druid can actually use (incuding 1H-weapons, excluding swords & axes (usually))
This commit is contained in:
Sarjuuk
2023-04-07 14:16:23 +02:00
parent 02239b4f74
commit 25ddb0ca99

View File

@@ -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..