Fixed crash when mind-controlled unit is holding a non-weapon.
Fixed potential bug with deciding a unit's valid hand weapon
make some functions of the inventory static and use them where applicable
Merge pull request #29 from SupSuper/master

sync