Fix compilation issue

Follow up dae81222 (AEGIS class system) fix out of bound issue for
array.
(didn't check the x_ALL option system yet)
Follow up 7a9aa7fb Fix possible mapcrash due to offline player
Follow up 12007fef Fix some invalide string check and remove the
reverted sqlfiles