Creature.onOutfit event...
fixed typo
renamed event to onChangeOutfit
Fix #1027
Fix bug with playerdeath.lua
Update CMake file to link with threads library

Ubuntu 14.10 requires linking with pthread
Use C++-style casts
Store light info and color as uint8

They are being sent as uint8 in the protocol anyway, so larger values
wouldn't make a difference
Use appropriate types
The beginning of v1.1
Fix formula for magic level tries when offline training
fixed indentation
Fix #1033
Remove unused function
Merge pull request #966 from ReyAleman/Creature_onOutfit

Creature.onOutfit event.
Fix classic slots equipping bug

Related issue: #1033
Use integers instead of floating point numbers for weight and capacity
Fix item weight in shop protocol messages
Passing userdata instead of cid everywhere

This is a breaking change, and I think it's safe to assume that most NPC
scripts are broken and the NPC system needs a rewrite/some backwards
compatibility patch to pass id's instead of userdata to callbacks.
Fix bug in tiles.lua