Your code is confusing class_index
Looked in the code, when adding a sub class, it assigns the desired index. You re-assign the index -1 to the skills.
// solo le enseniamos el skill si es que el mismo no lo tiene aun o si es el inferior al q le vamos a enseniar
if (player.getSkillLevel(id) < level)
// Add the L2Skill object to the L2Character _skills and its Func objects to the calculator set of the L2Character
That is Active AntiCheat - due to server's client side protection. You can't really bypass it. One of its many features is to block running the game from a VM - the only way you can play on THAT particular server is to do a dual-boot.