Part of magic system rewrite and some fixes to trades.
Ignore this commit - character conversion problem.
Added .tmp files to .gitignore and improved some things

@twostars If you could kindly take a look at this commit and check if I
did things right, that'd be appreciated!
Revert "Ignore this commit - character conversion problem."

This reverts commit bb6b8e941b52f6ff59ad1f680217df272201996f.
(Hopefully) fixed a few problems!
Switched all time-related variables to "time_t" and stopped casting to int32
Fetched maxmenten/master
Merge finalised