Jump to content
  • 0

Coding Problem


TraineeDreamer

Question

6 answers to this question

Recommended Posts

  • 0

Oh god, and do you think that with this poor information could someone help you?

For god sake, give more info.

Which code did u "pass"?

Post the resulting code?

Explain what did you do?

Pack? Chronicle?

Link to comment
Share on other sites

  • 0

i use l2jfrozen the code is IL:its about ALL SYBS IN 1 NPC ...I put the + lines correct and i removed - lines but then i dont know what to do ....Index: L2jFrozen_GameServer\head-src\com\l2jfrozen\gameserver\model\actor\instance\L2VillageMasterInstance.java

===================================================================
--- head-src\com\l2jfrozen\gameserver\model\actor\instance\L2VillageMasterInstance.java (revision 912)
+++ head-src\com\l2jfrozen\gameserver\model\actor\instance\L2VillageMasterInstance.java (working copy)
@@ -1010,1 +1010,9 @@
- final PlayerRace npcRace = getVillageMasterRace();
- final ClassType npcTeachType = getVillageMasterTeachType();
+ getVillageMasterRace();
+ getVillageMasterTeachType();

@@ -1049,1 +1049,5 @@
-
- if(npcRace == PlayerRace.Human || npcRace == PlayerRace.LightElf)
- {
- // If the master is human or light elf, ensure that fighter-type
- // masters only teach fighter classes, and priest-type masters
- // only teach priest classes etc.
- if(!availSub.isOfType(npcTeachType))
- {
- availSubs.remove(availSub);
- }
- else if(!availSub.isOfRace(PlayerRace.Human) && !availSub.isOfRace(PlayerRace.LightElf))
- {
- availSubs.remove(availSub);
- }
- }
- else
- {
- // If the master is not human and not light elf,
- // then remove any classes not of the same race as the master.
- if(npcRace != PlayerRace.Human && npcRace != PlayerRace.LightElf && !availSub.isOfRace(npcRace))
- {
- availSubs.remove(availSub);
- }
- }
(/No newline at the end of the line)

Index: L2jFrozen_GameServer\head-src\com\l2jfrozen\gameserver\model\actor\instance\L2VillageMasterInstance.java
===================================================================
--- head-src\com\l2jfrozen\gameserver\model\base\PlayerClass.java (revision 59)
+++ head-src\com\l2jfrozen\gameserver\model\base\PlayerClass.java (working copy)
@@ -196,1 +196,5 @@
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, Set<PlayerClass>>(PlayerClass.class);

static
{
Set<PlayerClass> subclasses = getSet(null, Third);
- subclasses.removeAll(neverSubclassed);

mainSubclassSet = subclasses;
-
- subclassSetMap.put(DarkAvenger, subclasseSet1);
- 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);

@@ -252,1 +252,9 @@
- subclasses.removeAll(neverSubclassed);
- subclasses.remove(this);
-
- switch(player.getRace())
- {
- case elf:
- subclasses.removeAll(getSet(DarkElf, Third));
- break;
- case darkelf:
- subclasses.removeAll(getSet(LightElf, Third));
- break;
- }
-
- Set<PlayerClass> unavailableClasses = subclassSetMap.get(this);
-
- if(unavailableClasses != null)
- {
- subclasses.removeAll(unavailableClasses);
- }
-
- unavailableClasses = null;

@@ -222,1 +222,13 @@
if(_level == Third)
{
subclasses = EnumSet.copyOf(mainSubclassSet);
+
+subclasses.remove(this);
+
+ switch(player.getRace())
+ {
+ case human:
+ break;
+ case darkelf:
+ break;
+ case elf:
+ break;
+ case orc:
+ break;
+ case dwarf:
+ break;
+
}
}

return subclasses;
}
(/No newline at the end of the line)

Edited by TraineeDreamer
Link to comment
Share on other sites

  • 0

Jesus, use [ code ] tags please.

And which problem do you have? Did you go to a Village master and did u check if there are all subs available or only some?

Edited by ^Wyatt
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.


  • Posts

    • Update patch for L2Earth x25 Price: 15e  
    • We are taking new orders!! We are taking new orders!!
    • The DEATH KNIGHT costume in Lineage 2 is the true embodiment of power and style, created for those who are ready to immerse themselves in the world of darkness and mastery over death. This majestic costume is presented in three stunning styles:   Fire Embody your thirst for destruction in this stunning costume. The bright fiery hue of the skeleton surrounded by blazing tongues of flame gives you the power and might of the Lord of Hell himself. This costume immerses you in an atmosphere of apocalyptic rage and ruthless devastation.   Purple Skillfully blending elegance and mystery, this purple costume is designed to bestow additional unwavering resolve upon its owner. Its graceful lines and refined shade create the impression of impeccable deadly grace. This costume attracts attention and instills awe in anyone who dares to oppose you.   Blue Immerse yourself in the cold atmosphere of death with this magnificent blue costume. It will make anyone who dares to stand in your way see that death is not only the end but also a source of infinite strength and resilience. In this costume, you will appear as an unyielding defender of darkness, capable of overcoming any challenge.     Each costume set is accompanied by accessories and a splendid cloak of your choice, depending on the protocol (a cloak option is also available upon request), which will emphasize your greatness in all battles, prices starts from 50 or 100 depending by conditions. Additional information about the cloaks and their variations can be obtained by contacting the provided contacts. These costumes combine not only epic power but also unparalleled beauty, giving your character a unique style.   Contacts: Skype: Support_La2-Pro ( click ) Discord: NevesOma#3182 Personal messages. The best discord client dev community here: https://discord.gg/qeJuzHAgT9          
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock