Hi Folks,
I'm trying to change a characters class. When the character is off line, I change the classid and base_class fields, and the character seems to be that, but when they log in, the character goes back to the previous class. Any idea what else I'm missing, please?
Michelle.
Changing a characters class.
Forum rules
READ NOW: L2j Forums Rules of Conduct
READ NOW: L2j Forums Rules of Conduct
-
- Advanced User
- Posts: 308
- Joined: Wed May 10, 2006 11:40 am
- Location: U.K.
Changing a characters class.
My friend is a paranoid schizophrenic ... she'll take over the world, as long as nobody minds.
-
- Posts: 5
- Joined: Wed Aug 08, 2007 10:53 am
-
- Advanced User
- Posts: 308
- Joined: Wed May 10, 2006 11:40 am
- Location: U.K.
Nope - didn't work. There was a message in teh server console that it had reverted the character to base class, stating that it was a possible exploit while subclassing. There's probably something I'm missing somewhere.
My friend is a paranoid schizophrenic ... she'll take over the world, as long as nobody minds.
-
- L2j Veteran
- Posts: 1554
- Joined: Mon Oct 10, 2005 6:49 pm
I replied in your dropcalc thread, but I find it interesting now that you mention that you actually changed the base_class as well :/
When you are changing the mainclass and if the mainclass is active, you need to change both the classId and the base_class, which apparently you are doing. If you need to change the classId of a subclass, you should not touch the base_class. Instead, change the classId in the subclasses table and the classId in the characters table. The warning you are getting on the log merely means that the class_id in the characters table is not equal to the base_class nor does it match any of the char's subclasses. As a result, the core will automatically revert the char to whatever value is stored in base_class.
It sounds to me like your change of base_class didn't work.
When you are changing the mainclass and if the mainclass is active, you need to change both the classId and the base_class, which apparently you are doing. If you need to change the classId of a subclass, you should not touch the base_class. Instead, change the classId in the subclasses table and the classId in the characters table. The warning you are getting on the log merely means that the class_id in the characters table is not equal to the base_class nor does it match any of the char's subclasses. As a result, the core will automatically revert the char to whatever value is stored in base_class.
It sounds to me like your change of base_class didn't work.
I'm a joyful, merriful, playful, curious, young, little elf!!! 
I'm also a High(tech) Elf, (computer) wiz!

I'm also a High(tech) Elf, (computer) wiz!
-
- Advanced User
- Posts: 308
- Joined: Wed May 10, 2006 11:40 am
- Location: U.K.
-
- L2j Veteran
- Posts: 1554
- Joined: Mon Oct 10, 2005 6:49 pm
The base_class is the class of the main. This value is normally only changed when a player completes an occupation change quest (or cat).
The characters.classId denotes the currently active class. It will either be the same as base_class or the same as one of the subclasses. This value is changed both upon completion of occupation change quests (or cat) and whenever the player switches between subclasses.
If the value of characters.classId doesn't match the subclasses nor the base_class, then its value is ignored and the core's anti-exploit code over-writes it using the value of base_class.
Assuming that a player is currently using his main class (or has no subclasses at all), then in order to change the class you must set both the classId and the base_class to the id of the new class.
On retrospect, if you always only wish to change the main class, the easiest thing will be to only change the base_class. This way, if the player had a subclass active, it won't be affected. The player will not notice the main class's change except by going to a village master to switch back to the main. If the player had the main class active (or had no subclasses), then the core will display a warning about possible exploits, but it will then automatically set the player to the correct (new) class that you set.
The characters.classId denotes the currently active class. It will either be the same as base_class or the same as one of the subclasses. This value is changed both upon completion of occupation change quests (or cat) and whenever the player switches between subclasses.
If the value of characters.classId doesn't match the subclasses nor the base_class, then its value is ignored and the core's anti-exploit code over-writes it using the value of base_class.
Assuming that a player is currently using his main class (or has no subclasses at all), then in order to change the class you must set both the classId and the base_class to the id of the new class.
On retrospect, if you always only wish to change the main class, the easiest thing will be to only change the base_class. This way, if the player had a subclass active, it won't be affected. The player will not notice the main class's change except by going to a village master to switch back to the main. If the player had the main class active (or had no subclasses), then the core will display a warning about possible exploits, but it will then automatically set the player to the correct (new) class that you set.
I'm a joyful, merriful, playful, curious, young, little elf!!! 
I'm also a High(tech) Elf, (computer) wiz!

I'm also a High(tech) Elf, (computer) wiz!