Hey, I'm working on a H5 roleplay server , and we decided some weeks ago to unblock the subclass restrictions (elfs-OL-WS), lvl (I just setted it up to 40, and its working!!, I feel like a hacker this is my very first time) and quest items (done, too)
So I've been searching in eclipse like mad but I can't find what I'm looking for, so I just came up with the idea of looking for help.
Thank you very much in advance,
Like, for real.
Subclass limitations (Elfs-Delvs; Overlord and Warsmith)
Forum rules
READ NOW: L2j Forums Rules of Conduct
READ NOW: L2j Forums Rules of Conduct
-
- Posts: 6
- Joined: Wed May 31, 2017 12:11 am
-
- Posts: 95
- Joined: Wed May 04, 2011 9:12 am
Re: Subclass limitations (Elfs-Delvs; Overlord and Warsmith)
Hello
Maybe this well help you: L2JServer\Java\com.l2jserver\gameserver\model\base\PlayerClass.java
There is this 4th line.
And there I found this one too:
I'm quite sure you will find some good things withing this Java file. Try it out
Regards
Maybe this well help you: L2JServer\Java\com.l2jserver\gameserver\model\base\PlayerClass.java
Code: Select all
private Race _race;
private ClassLevel _level;
private ClassType _type;
private static final Set<PlayerClass> mainSubclassSet;
private static final Set<PlayerClass> neverSubclassed = EnumSet.of(Overlord, Warsmith);
private static final Set<PlayerClass> subclasseSet1 = EnumSet.of(DarkAvenger, Paladin, TempleKnight, ShillienKnight);
private static final Set<PlayerClass> subclasseSet2 = EnumSet.of(TreasureHunter, AbyssWalker, Plainswalker);
private static final Set<PlayerClass> subclasseSet3 = EnumSet.of(Hawkeye, SilverRanger, PhantomRanger);
private static final Set<PlayerClass> subclasseSet4 = EnumSet.of(Warlock, ElementalSummoner, PhantomSummoner);
private static final Set<PlayerClass> subclasseSet5 = EnumSet.of(Sorceror, Spellsinger, Spellhowler);
private static final EnumMap<PlayerClass, Set<PlayerClass>> subclassSetMap = new EnumMap<>(PlayerClass.class);
And there I found this one too:
Code: Select all
case ELF:
subclasses.removeAll(getSet(Race.DARK_ELF, Third));
break;
case DARK_ELF:
subclasses.removeAll(getSet(Race.ELF, Third));
break;
Regards
-
- Posts: 6
- Joined: Wed May 31, 2017 12:11 am
Re: Subclass limitations (Elfs-Delvs; Overlord and Warsmith)
Yeah !! Thanks!! Gonna comment the elf stuff and put those overlords and warsmiths in some group and pray
Thank you!
Thank you!
-
- Posts: 6
- Joined: Wed May 31, 2017 12:11 am
Re: Subclass limitations (Elfs-Delvs; Overlord and Warsmith)
It didn't work at first, but I commented the good line with trial and error..
It's all working now, I'll put the modifications here later, in case someone comes looking for exactly the same stuff.
It's all working now, I'll put the modifications here later, in case someone comes looking for exactly the same stuff.
-
- Posts: 6
- Joined: Wed May 31, 2017 12:11 am
Re: Subclass limitations (Elfs-Delvs; Overlord and Warsmith)
I said I would put the modifications and forgot about it, here they are. With this , any tank class will be able to choose other tank classes as subclasess, elfs will be able to choose delfs subclasses and if in the config files you setted it up to not require any quest items and to be able to use any master to take subclasses, players will be able to choose any subclass (included overlord and warsmith) no matter their race or class.
The only exception is the kamaels.
Thank you again for your help, it was very useful!
PlayerClass.java
/*
L2VillageMasterInstance.java
The only exception is the kamaels.
Thank you again for your help, it was very useful!
PlayerClass.java
/*
Code: Select all
private static final Set<PlayerClass> mainSubclassSet;
private static final Set<PlayerClass> neverSubclassed = EnumSet.of(Overlord, Warsmith);
private static final Set<PlayerClass> subclasseSet1 = EnumSet.of(DarkAvenger, Paladin, TempleKnight, ShillienKnight);
private static final Set<PlayerClass> subclasseSet2 = EnumSet.of(TreasureHunter, AbyssWalker, Plainswalker);
private static final Set<PlayerClass> subclasseSet3 = EnumSet.of(Hawkeye, SilverRanger, PhantomRanger);
private static final Set<PlayerClass> subclasseSet4 = EnumSet.of(Warlock, ElementalSummoner, PhantomSummoner);
private static final Set<PlayerClass> subclasseSet5 = EnumSet.of(Sorceror, Spellsinger, Spellhowler);
private static final EnumMap<PlayerClass, Set<PlayerClass>> subclassSetMap = new EnumMap<>(PlayerClass.class);
static
{
Set<PlayerClass> subclasses = getSet(null, Third);
// subclasses.removeAll(neverSubclassed);
mainSubclassSet = subclasses;
/*
* subclassSetMap.put(Paladin, subclasseSet1); subclassSetMap.put(TempleKnight, subclasseSet1); subclassSetMap.put(ShillienKnight, subclasseSet1); subclassSetMap.put(TreasureHunter, subclasseSet2); subclassSetMap.put(AbyssWalker, subclasseSet2); subclassSetMap.put(Plainswalker,
* subclasseSet2); subclassSetMap.put(Hawkeye, subclasseSet3); subclassSetMap.put(SilverRanger, subclasseSet3); subclassSetMap.put(PhantomRanger, subclasseSet3); subclassSetMap.put(Warlock, subclasseSet4); subclassSetMap.put(ElementalSummoner, subclasseSet4);
* subclassSetMap.put(PhantomSummoner, subclasseSet4); subclassSetMap.put(Sorceror, subclasseSet5); subclassSetMap.put(Spellsinger, subclasseSet5); subclassSetMap.put(Spellhowler, subclasseSet5);
*/
}
case ELF:
//subclasses.removeAll(getSet(Race.DARK_ELF, Third));
break;
case DARK_ELF:
//subclasses.removeAll(getSet(Race.ELF, Third));
break;
Code: Select all
if (player.getLevel() < 40)
{
allowAddition = false;
if (subClass.getLevel() < 40)