Guest User

Untitled

a guest
Dec 10th, 2017
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 6.58 KB | None | 0 0
  1. package com.l2scoria.gameserver.model.base;
  2.  
  3. public enum ClassId
  4. {
  5.   fighter(0, false, Race.human, null),
  6.  
  7.   warrior(1, false, Race.human, fighter),
  8.   gladiator(2, false, Race.human, warrior),
  9.   warlord(3, false, Race.human, warrior),
  10.   knight(4, false, Race.human, fighter),
  11.   paladin(5, false, Race.human, knight),
  12.   darkAvenger(6, false, Race.human, knight),
  13.   rogue(7, false, Race.human, fighter),
  14.   treasureHunter(8, false, Race.human, rogue),
  15.   hawkeye(9, false, Race.human, rogue),
  16.  
  17.   mage(10, true, Race.human, null),
  18.   wizard(11, true, Race.human, mage),
  19.   sorceror(12, true, Race.human, wizard),
  20.   necromancer(13, true, Race.human, wizard),
  21.   warlock(14, true, Race.human, wizard),
  22.   cleric(15, true, Race.human, mage),
  23.   bishop(16, true, Race.human, cleric),
  24.   prophet(17, true, Race.human, cleric),
  25.  
  26.   elvenFighter(18, false, Race.elf, null),
  27.   elvenKnight(19, false, Race.elf, elvenFighter),
  28.   templeKnight(20, false, Race.elf, elvenKnight),
  29.   swordSinger(21, false, Race.elf, elvenKnight),
  30.   elvenScout(22, false, Race.elf, elvenFighter),
  31.   plainsWalker(23, false, Race.elf, elvenScout),
  32.   silverRanger(24, false, Race.elf, elvenScout),
  33.  
  34.   elvenMage(25, true, Race.elf, null),
  35.   elvenWizard(26, true, Race.elf, elvenMage),
  36.   spellsinger(27, true, Race.elf, elvenWizard),
  37.   elementalSummoner(28, true, Race.elf, elvenWizard),
  38.   oracle(29, true, Race.elf, elvenMage),
  39.   elder(30, true, Race.elf, oracle),
  40.  
  41.   darkFighter(31, false, Race.darkelf, null),
  42.   palusKnight(32, false, Race.darkelf, darkFighter),
  43.   shillienKnight(33, false, Race.darkelf, palusKnight),
  44.   bladedancer(34, false, Race.darkelf, palusKnight),
  45.   assassin(35, false, Race.darkelf, darkFighter),
  46.   abyssWalker(36, false, Race.darkelf, assassin),
  47.   phantomRanger(37, false, Race.darkelf, assassin),
  48.  
  49.   darkMage(38, true, Race.darkelf, null),
  50.   darkWizard(39, true, Race.darkelf, darkMage),
  51.   spellhowler(40, true, Race.darkelf, darkWizard),
  52.   phantomSummoner(41, true, Race.darkelf, darkWizard),
  53.   shillienOracle(42, true, Race.darkelf, darkMage),
  54.   shillenElder(43, true, Race.darkelf, shillienOracle),
  55.  
  56.   orcFighter(44, false, Race.orc, null),
  57.   orcRaider(45, false, Race.orc, orcFighter),
  58.   destroyer(46, false, Race.orc, orcRaider),
  59.   orcMonk(47, false, Race.orc, orcFighter),
  60.   tyrant(48, false, Race.orc, orcMonk),
  61.  
  62.   orcMage(49, false, Race.orc, null),
  63.   orcShaman(50, false, Race.orc, orcMage),
  64.   overlord(51, false, Race.orc, orcShaman),
  65.   warcryer(52, false, Race.orc, orcShaman),
  66.  
  67.   dwarvenFighter(53, false, Race.dwarf, null),
  68.   scavenger(54, false, Race.dwarf, dwarvenFighter),
  69.   bountyHunter(55, false, Race.dwarf, scavenger),
  70.   artisan(56, false, Race.dwarf, dwarvenFighter),
  71.   warsmith(57, false, Race.dwarf, artisan),
  72.  
  73.   dummyEntry1(58, false, null, null),
  74.   dummyEntry2(59, false, null, null),
  75.   dummyEntry3(60, false, null, null),
  76.   dummyEntry4(61, false, null, null),
  77.   dummyEntry5(62, false, null, null),
  78.   dummyEntry6(63, false, null, null),
  79.   dummyEntry7(64, false, null, null),
  80.   dummyEntry8(65, false, null, null),
  81.   dummyEntry9(66, false, null, null),
  82.   dummyEntry10(67, false, null, null),
  83.   dummyEntry11(68, false, null, null),
  84.   dummyEntry12(69, false, null, null),
  85.   dummyEntry13(70, false, null, null),
  86.   dummyEntry14(71, false, null, null),
  87.   dummyEntry15(72, false, null, null),
  88.   dummyEntry16(73, false, null, null),
  89.   dummyEntry17(74, false, null, null),
  90.   dummyEntry18(75, false, null, null),
  91.   dummyEntry19(76, false, null, null),
  92.   dummyEntry20(77, false, null, null),
  93.   dummyEntry21(78, false, null, null),
  94.   dummyEntry22(79, false, null, null),
  95.   dummyEntry23(80, false, null, null),
  96.   dummyEntry24(81, false, null, null),
  97.   dummyEntry25(82, false, null, null),
  98.   dummyEntry26(83, false, null, null),
  99.   dummyEntry27(84, false, null, null),
  100.   dummyEntry28(85, false, null, null),
  101.   dummyEntry29(86, false, null, null),
  102.   dummyEntry30(87, false, null, null),
  103.  
  104.   duelist(88, false, Race.human, gladiator),
  105.   dreadnought(89, false, Race.human, warlord),
  106.   phoenixKnight(90, false, Race.human, paladin),
  107.   hellKnight(91, false, Race.human, darkAvenger),
  108.   sagittarius(92, false, Race.human, hawkeye),
  109.   adventurer(93, false, Race.human, treasureHunter),
  110.   archmage(94, true, Race.human, sorceror),
  111.   soultaker(95, true, Race.human, necromancer),
  112.   arcanaLord(96, true, Race.human, warlock),
  113.   cardinal(97, true, Race.human, bishop),
  114.   hierophant(98, true, Race.human, prophet),
  115.  
  116.   evaTemplar(99, false, Race.elf, templeKnight),
  117.   swordMuse(100, false, Race.elf, swordSinger),
  118.   windRider(101, false, Race.elf, plainsWalker),
  119.   moonlightSentinel(102, false, Race.elf, silverRanger),
  120.   mysticMuse(103, true, Race.elf, spellsinger),
  121.   elementalMaster(104, true, Race.elf, elementalSummoner),
  122.   evaSaint(105, true, Race.elf, elder),
  123.  
  124.   shillienTemplar(106, false, Race.darkelf, shillienKnight),
  125.   spectralDancer(107, false, Race.darkelf, bladedancer),
  126.   ghostHunter(108, false, Race.darkelf, abyssWalker),
  127.   ghostSentinel(109, false, Race.darkelf, phantomRanger),
  128.   stormScreamer(110, true, Race.darkelf, spellhowler),
  129.   spectralMaster(111, true, Race.darkelf, phantomSummoner),
  130.   shillienSaint(112, true, Race.darkelf, shillenElder),
  131.  
  132.   titan(113, false, Race.orc, destroyer),
  133.   grandKhauatari(114, false, Race.orc, tyrant),
  134.   dominator(115, false, Race.orc, overlord),
  135.   doomcryer(116, false, Race.orc, warcryer),
  136.  
  137.   fortuneSeeker(117, false, Race.dwarf, bountyHunter),
  138.   maestro(118, false, Race.dwarf, warsmith);
  139.  
  140.   private final int _id;
  141.   private final boolean _isMage;
  142.   private final Race _race;
  143.   private final ClassId _parent;
  144.  
  145.   private ClassId(int pId, boolean pIsMage, Race pRace, ClassId pParent)
  146.   {
  147.     this._id = pId;
  148.     this._isMage = pIsMage;
  149.     this._race = pRace;
  150.     this._parent = pParent;
  151.   }
  152.  
  153.   public final int getId()
  154.   {
  155.     return this._id;
  156.   }
  157.  
  158.   public final boolean isMage()
  159.   {
  160.     return this._isMage;
  161.   }
  162.  
  163.   public final Race getRace()
  164.   {
  165.     return this._race;
  166.   }
  167.  
  168.   public final boolean childOf(ClassId cid)
  169.   {
  170.     if (this._parent == null) {
  171.       return false;
  172.     }
  173.     if (this._parent == cid) {
  174.       return true;
  175.     }
  176.     return this._parent.childOf(cid);
  177.   }
  178.  
  179.   public final boolean equalsOrChildOf(ClassId cid)
  180.   {
  181.     return (this == cid) || (childOf(cid));
  182.   }
  183.  
  184.   public final int level()
  185.   {
  186.     if (this._parent == null) {
  187.       return 0;
  188.     }
  189.     return 1 + this._parent.level();
  190.   }
  191.  
  192.   public final ClassId getParent()
  193.   {
  194.     return this._parent;
  195.   }
  196. }
Add Comment
Please, Sign In to add comment