Replaced hardcoded Item IDs with constants

- This makes it harder to get the item IDs wrong in the code.
- Fixes item 'Slot_Coupon' being incorrectly considered a Spell Book due
  to an oversight (wrong item nameid) when the check was introduced.

Signed-off-by: Haru <haru@dotalux.com>