PDA

View Full Version : isWeapon returning false unexpectedly



anathemort
January 8th, 2022, 00:40
With 3.5E (and therefore those rulesets that inherit), I'm getting unexpected results with ItemManager2.isWeapon(). I am checking against an orcish axe defined in the basic rules:
50842

When I call isWeapon

Debug.chat(item, ItemManager2.isWeapon(item))
the result is

databasenode = { charsheet.id-00001.inventorylist.id-00004 } | bFALSE | s'weapon' | s'exotic two-handed melee'

As you can see, isWeapon returns bFALSE. I compared to the 5E ItemManager, and the big different is that 3.5E first checks sClass before checking the item type. Is this a bug? Should I be using the manager in a different way?

Moon Wizard
January 8th, 2022, 15:21
It looks like this function hasn't been working for awhile; and hasn't really been noticed, because it's only used in one not very obvious location. (weapon drop on Actions weapon list)

I'll push a fix for the next ruleset update.

Regards,
JPG

anathemort
January 8th, 2022, 17:52
Thanks so much!