Index: C:/work oby trybil/1/L2_GameServer/LICENSE.txt =================================================================== --- C:/work oby trybil/1/L2_GameServer/LICENSE.txt (revision 3396) +++ C:/work oby trybil/1/L2_GameServer/LICENSE.txt (working copy) @@ -1,28 +1,7 @@ GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 - Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you + Copyrighve source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. Index: C:/work oby trybil/1/L2_GameServer/java/config/Feature.properties =================================================================== --- C:/work oby trybil/1/L2_GameServer/java/config/Feature.properties (revision 3396) +++ C:/work oby trybil/1/L2_GameServer/java/config/Feature.properties (working copy) @@ -311,4 +311,7 @@ ClanLevel7Cost = 20000 ClanLevel8Cost = 40000 ClanLevel9Cost = 40000 -ClanLevel10Cost = 40000 \ No newline at end of file +ClanLevel10Cost = 40000 + +# Sub stuck +SubStucking = False \ No newline at end of file Index: C:/work oby trybil/1/L2_GameServer/java/net/sf/l2j/gameserver/model/actor/instance/L2VillageMasterInstance.java =================================================================== --- C:/work oby trybil/1/L2_GameServer/java/net/sf/l2j/gameserver/model/actor/instance/L2VillageMasterInstance.java (revision 3396) +++ C:/work oby trybil/1/L2_GameServer/java/net/sf/l2j/gameserver/model/actor/instance/L2VillageMasterInstance.java (working copy) @@ -824,8 +824,8 @@ charClassId = player.getClassId().getParent().ordinal(); - final Race npcRace = getVillageMasterRace(); - final ClassType npcTeachType = getVillageMasterTeachType(); + getVillageMasterRace(); + getVillageMasterTeachType(); PlayerClass currClass = PlayerClass.values()[charClassId]; @@ -870,24 +870,6 @@ || availSub.ordinal() == player.getBaseClass()) availSubs.remove(availSub); } - - if (npcRace == Race.Human || npcRace == Race.Elf) - { - // 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); - - // Remove any non-human or light elf classes. - else if (!availSub.isOfRace(Race.Human) - && !availSub.isOfRace(Race.Elf)) 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 (!availSub.isOfRace(npcRace)) availSubs.remove(availSub); - } } } return availSubs; Index: C:/work oby trybil/1/L2_GameServer/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java =================================================================== --- C:/work oby trybil/1/L2_GameServer/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (revision 3396) +++ C:/work oby trybil/1/L2_GameServer/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (working copy) @@ -238,6 +238,8 @@ { // Character Skill SQL String Definitions: private static final String RESTORE_SKILLS_FOR_CHAR = "SELECT skill_id,skill_level FROM character_skills WHERE charId=? AND class_index=?"; + // Twoj Addon + private static final String ACUMULATE_SKILLS_FOR_CHAR_SUB = "SELECT skill_id,skill_level FROM character_skills WHERE charId=? ORDER BY skill_id , skill_level ASC"; private static final String ADD_NEW_SKILL = "INSERT INTO character_skills (charId,skill_id,skill_level,class_index) VALUES (?,?,?,?)"; private static final String UPDATE_CHARACTER_SKILL_LEVEL = "UPDATE character_skills SET skill_level=? WHERE skill_id=? AND charId=? AND class_index=?"; private static final String DELETE_SKILL_FROM_CHAR = "DELETE FROM character_skills WHERE skill_id=? AND charId=? AND class_index=?"; @@ -5564,7 +5566,9 @@ { // Add karma to attacker and increase its PK counter setPvpKills(getPvpKills() + 1); - + addItem("Loot", 4356, 3, this, true); + sendMessage("Congratulation! You won PVP and the revard is 3 Gold Einhasad"); + // Send a Server->Client UserInfo packet to attacker with its Karma and PK Counter sendPacket(new UserInfo(this)); sendPacket(new ExBrExtraUserInfo(this)); @@ -7815,12 +7819,15 @@ try { + // Twoj Addon + boolean isAcumulative = Config.ACUMULATIVE_SUBCLASS_SKILLS; // Retrieve all skills of this L2PcInstance from the database con = L2DatabaseFactory.getInstance().getConnection(); - PreparedStatement statement = con.prepareStatement(RESTORE_SKILLS_FOR_CHAR); - + PreparedStatement statement = con.prepareStatement(isAcumulative ? ACUMULATE_SKILLS_FOR_CHAR_SUB : RESTORE_SKILLS_FOR_CHAR); statement.setInt(1, getObjectId()); - statement.setInt(2, getClassIndex()); + if (!isAcumulative) + // Twoj Addon + statement.setInt(2, getClassIndex()); ResultSet rset = statement.executeQuery(); // Go though the recordset of this SQL query Index: C:/work oby trybil/1/L2_GameServer/java/net/sf/l2j/gameserver/model/base/PlayerClass.java =================================================================== --- C:/work oby trybil/1/L2_GameServer/java/net/sf/l2j/gameserver/model/base/PlayerClass.java (revision 3396) +++ C:/work oby trybil/1/L2_GameServer/java/net/sf/l2j/gameserver/model/base/PlayerClass.java (working copy) @@ -208,7 +208,6 @@ 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); @@ -221,7 +220,6 @@ static { Set<PlayerClass> subclasses = getSet(null, Third); - subclasses.removeAll(neverSubclassed); mainSubclassSet = subclasses; @@ -268,12 +266,21 @@ switch (player.getRace()) { - case Elf: - subclasses.removeAll(getSet(DarkElf, Third)); + case Human: + break; case DarkElf: - subclasses.removeAll(getSet(Elf, Third)); + break; + case Elf: + + break; + case Orc: + + break; + case Dwarf: + + break; } subclasses.removeAll(getSet(Kamael, Third)); @@ -293,8 +300,6 @@ subclasses.removeAll(EnumSet.of(maleSoulbreaker)); else subclasses.removeAll(EnumSet.of(femaleSoulbreaker)); - if (player.getTotalSubClasses() < 2) - subclasses.removeAll(EnumSet.of(inspector)); } } return subclasses; Index: C:/work oby trybil/1/L2_GameServer/java/net/sf/l2j/Config.java =================================================================== --- C:/work oby trybil/1/L2_GameServer/java/net/sf/l2j/Config.java (revision 3396) +++ C:/work oby trybil/1/L2_GameServer/java/net/sf/l2j/Config.java (working copy) @@ -322,6 +322,8 @@ public static int CLAN_LEVEL_8_COST; public static int CLAN_LEVEL_9_COST; public static int CLAN_LEVEL_10_COST; + // Twoj Addon + public static boolean ACUMULATIVE_SUBCLASS_SKILLS; //-------------------------------------------------- @@ -1070,6 +1072,8 @@ CLAN_LEVEL_8_COST = Integer.parseInt(Feature.getProperty("ClanLevel8Cost", "40000")); CLAN_LEVEL_9_COST = Integer.parseInt(Feature.getProperty("ClanLevel9Cost", "40000")); CLAN_LEVEL_10_COST = Integer.parseInt(Feature.getProperty("ClanLevel10Cost", "40000")); + // Twoj Addon + ACUMULATIVE_SUBCLASS_SKILLS = Boolean.parseBoolean(Feature.getProperty("SubStucking", "False")); } catch (Exception e) {
veandil