Talisman is correct that this is patently bad.
Spider is incorrect in that you could use the dragonkill hook to preserve those things.
Since those things are (usually) fields on the accounts table they aren't something a module can/should control and thus they cannot be.
If you *really* needed to do this, the proper way to do this modularly would be
1) create a new hook (for instance dk-preserve)
2) add $nochange = modulehook('dk-preserve', $nochange)
3) in your module, addhook("dk-preserve") to your module_install
4) in your module_dohook, on the dk-preserve hook
do things like $args['gold'] = 1; $args['goldinbank'] = 1;
5) make sure your module_dohook returns $args.
That would allow you to modify the items which were preserved via the modules (and stop certain things too by setting them to 0

)
I will be adding that dk-preserve hook call to prerelease.4