Idea taken from https://github.com/Zoey76/L2J_LoginServer/commit/379e27313faa9421b9f99b18d9f1db5a9c49ea00