Hey i followed a guide here that showed how to make all subs available in one npc i made the following changes but there is a problem :D When you press Add a subclass it gives the full sub class list but you can add classes that are available retail like in the Npc For Example Master Jurek where you can add mage classes does not allow you to become a gladiator and pops up the subclass error ( Mimir's Elixir etc)
Also when i want to change into another subclass the Npc only desplays classes that are available only at that kind of Npc I wanna make it like that: When you want to add a class you can add everything from one single NpC except ( dominator and the dwarf class )
and also at the same Npc to be able to change in whatever subclass you like
Changes i made in L2VillageMasterInstance.java:
/**
* If the race of your main class is Elf or Dark Elf, you may not select each class as a subclass to the other class, and you may not select Overlord and Warsmith class as a subclass. You may not select a similar class as the subclass. The occupations classified as similar classes are as
* follows: Treasure Hunter, Plainswalker and Abyss Walker Hawkeye, Silver Ranger and Phantom Ranger Paladin, Dark Avenger, Temple Knight and Shillien Knight Warlocks, Elemental Summoner and Phantom Summoner Elder and Shillien Elder Swordsinger and Bladedancer Sorcerer, Spellsinger and
* Spellhowler
*/
Set<PlayerClass> availSubs = PlayerClass.values()[baseClassId].getAvailableSubclasses(player);
if (availSubs != null)
{
for (PlayerClass availSub : availSubs)
{
for (Iterator<SubClass> subList = iterSubClasses(player); subList.hasNext();)
{
SubClass prevSubClass = subList.next();
int subClassId = prevSubClass.getClassId();
if (subClassId >= 88) subClassId = ClassId.values()[subClassId].getParent().getId();
if (availSub.ordinal() == subClassId
|| availSub.ordinal() == player.getBaseClass())
availSubs.remove(PlayerClass.values()[availSub.ordinal()]);
}
}
}
return availSubs;
}
/*
* Check new subclass classId for validity (villagemaster race/type is not contains in previous subclasses, but in allowed subclasses) Base class not added into allowed subclasses.
*/
private final boolean isValidNewSubClass(L2PcInstance player, int classId)
{
if (!checkVillageMaster(classId))
return false;
final ClassId cid = ClassId.values()[classId];
for (Iterator<SubClass> subList = iterSubClasses(player); subList.hasNext();)
{
SubClass sub = subList.next();
ClassId subClassId = ClassId.values()[sub.getClassId()];
if (subClassId.equalsOrChildOf(cid))
return false;
}
Thank you guys.
NEWS
Our on-site dashboard is now live! Users can register for a customer account at https://www.nimeracp.com/sign-up.
NimeraCP will become available for purchase once development is complete and it’s listed in the Customer Dashboard.
We’ve also added pricing details to the official post on top and on our website: https://www.nimeracp.com/pricing.
Development on NimeraCP is progressing steadily. I’ll carve out some time this weekend to update the documentation so you can explore NimeraCP’s features in more detail.
That funny many here download but no one would like to share back its such a selfish behavior of people in 2020s
That why games die because of people who are later reselling thigs what people almost forgot or no have access to.
Question
mikemaster
Hey i followed a guide here that showed how to make all subs available in one npc i made the following changes but there is a problem :D
When you press Add a subclass it gives the full sub class list but you can add classes that are available retail like in the Npc
For Example Master Jurek where you can add mage classes does not allow you to become a gladiator and pops up the subclass error ( Mimir's Elixir etc)
Also when i want to change into another subclass the Npc only desplays classes that are available only at that kind of Npc
I wanna make it like that: When you want to add a class you can add everything from one single NpC except ( dominator and the dwarf class )
and also at the same Npc to be able to change in whatever subclass you like
Changes i made in L2VillageMasterInstance.java:
6 answers to this question
Recommended Posts