Package lineage2.gameserver.model.base

Examples of lineage2.gameserver.model.base.ClassId


  private void init()
  {
    _zoneListener = new ZoneListener();
    for (String s : zones)
    {
      Zone zone = ReflectionUtils.getZone(s);
      zone.addListener(_zoneListener);
    }
  }
View Full Code Here


   * Method init.
   */
  private void init()
  {
    _zoneListener = new ZoneListener();
    Zone zone = ReflectionUtils.getZone(ZONE_NAME);
    if (zone != null)
    {
      zone.addListener(_zoneListener);
    }
  }
View Full Code Here

      return new int[0];
    }
    loop:
    for (int clsId : subClassesList.toArray())
    {
      ClassId subClassId = ClassId.VALUES[clsId];
     
      for (SubClass playerSubClass : player.getSubClassList().values())
      {
        ClassId playerSubClassId = ClassId.VALUES[playerSubClass.getClassId()];
        if (!areClassesComportable(playerSubClassId, subClassId, playerSubClass.isBase()))
        {
          subClassesList.remove(clsId);
          continue loop;
        }
View Full Code Here

  }

  private static String getAvailableClassList(Player player, String html, String html2)
  {
    String htmltext = HtmCache.getInstance().getNotNull("quests/_10331_StartOfFate/" + html, player);
    ClassId classId = player.getClassId();
    StringBuilder classList = new StringBuilder();
    for(ClassId firstClassId : ClassId.VALUES)
    {
      if(!firstClassId.isOfLevel(ClassLevel.Second))
        continue;
View Full Code Here

   * @param player Player
   * @return String
   */
  private String makeMessage(Player player)
  {
    ClassId classId = player.getClassId();
    jobLevel = player.getClassLevel();
    int level = player.getLevel();
    StringBuilder html = new StringBuilder();
    if (Config.ALLOW_CLASS_MASTERS_LIST.isEmpty() || !Config.ALLOW_CLASS_MASTERS_LIST.contains(jobLevel))
    {
      jobLevel = 5;
    }
    if ((((level >= 20) && (jobLevel == 1)) || ((level >= 40) && (jobLevel == 2)) || ((level >= 76) && (jobLevel == 3)) || ((level >= 85) && (jobLevel == 4))) && Config.ALLOW_CLASS_MASTERS_LIST.contains(jobLevel))
    {
      ItemTemplate item = ItemHolder.getInstance().getTemplate(Config.CLASS_MASTERS_PRICE_ITEM_LIST[jobLevel]);
      if (Config.CLASS_MASTERS_PRICE_LIST[jobLevel] > 0)
      {
        html.append("Price: ").append(Util.formatAdena(Config.CLASS_MASTERS_PRICE_LIST[jobLevel])).append(' ').append(item.getName()).append("<br1>");
      }
      for (ClassId cid : ClassId.VALUES)
      {
        if (cid == ClassId.INSPECTOR)
        {
          continue;
        }
        if (cid.childOf(classId) && (cid.getClassLevel().ordinal() == (classId.getClassLevel().ordinal() + 1)))
        {
          html.append("<a action=\"bypass -h npc_").append(getObjectId()).append("_change_class ").append(cid.getId()).append(' ').append(Config.CLASS_MASTERS_PRICE_LIST[jobLevel]).append("\">").append(HtmlUtils.htmlClassName(cid.getId())).append("</a><br>");
        }
      }
      player.sendPacket(new NpcHtmlMessage(player, this).setHtml(html.toString()));
View Full Code Here

         * @param player Player
         * @return String
         */
        private String makeMessage(Player player)
        {
                ClassId classId = player.getClassId();
                jobLevel = player.getClassLevel();
                int level = player.getLevel();
                StringBuilder html = new StringBuilder();
                html.append("<br>");
                html.append("<table width=600>");
                html.append("<tr><td>");
                if (Config.ALLOW_CLASS_MASTERS_LIST.isEmpty() || !Config.ALLOW_CLASS_MASTERS_LIST.contains(jobLevel))
                {
                        jobLevel = 5;
                }
                if (((level >= 20) && (jobLevel == 1)) || ((level >= 40) && (jobLevel == 2)) || ((level >= 76) && (jobLevel == 3)) || ((level >= 85) && (jobLevel == 4) && Config.ALLOW_CLASS_MASTERS_LIST.contains(jobLevel)))
                {
                        ItemTemplate item = ItemHolder.getInstance().getTemplate(Config.CLASS_MASTERS_PRICE_ITEM_LIST[jobLevel]);
                        html.append("You have to pay: <font color=\"LEVEL\">");
                        html.append(Config.CLASS_MASTERS_PRICE_LIST[jobLevel] + "</font> <font color=\"LEVEL\">" + item.getName() + "</font> for a Class Change.<br>");
                        html.append("<center><table width=600><tr>");
                        for (ClassId cid : ClassId.values())
                        {
                                if (cid == ClassId.INSPECTOR)
                                {
                                        continue;
                                }
                                if (cid.childOf(classId) && (cid.getClassLevel().ordinal() == (classId.getClassLevel().ordinal() + 1)))
                                {
                                        html.append("<td><center><button value=\"" + cid.name() + "\" action=\"bypass _bbsclass_change " + cid.getId() + " " + Config.CLASS_MASTERS_PRICE_LIST[jobLevel] + "\" width=150 height=25 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_CT1.Button_DF\"></center></td>");
                                }
                        }
                        html.append("</tr>");
View Full Code Here

    {
      availSubs = EnumSet.copyOf(KAMAEL_SUBCLASS_SET);
    }
    else
    {
      ClassId classId = player.getClassId();
      if ((classId.isOfLevel(ClassLevel.Third)) || (classId.isOfLevel(ClassLevel.Fourth)) || (classId.isOfLevel(ClassLevel.Awaking)))
      {
        availSubs = EnumSet.copyOf(MAIN_SUBCLASS_SET);
        availSubs1 = EnumSet.copyOf(MAIN_SUBCLASS_SET1);
        availSubs.removeAll(BANNED_SUBCLASSES);
        availSubs.remove(classId);
        availSubs1.removeAll(BANNED_SUBCLASSES);
        availSubs1.remove(classId);
        switch (race.ordinal())
        {
          case 1:
            availSubs.removeAll(getSet(Race.darkelf, ClassLevel.Third));
            break;
          case 2:
            availSubs.removeAll(getSet(Race.elf, ClassLevel.Third));
            break;
        }
        switch (race.ordinal())
        {
          case 1:
            availSubs1.removeAll(getSet(Race.darkelf, ClassLevel.Awaking));
            break;
          case 2:
            availSubs1.removeAll(getSet(Race.elf, ClassLevel.Awaking));
            break;
        }
        Set<?> unavailableClasses = SUBCLASS_SET_MAP.get(classId);
        if (unavailableClasses != null)
        {
          availSubs.removeAll(unavailableClasses);
          availSubs1.removeAll(unavailableClasses);
        }
      }
    }
    int charClassId = player.getBaseClassId();
    ClassId currClass = ClassId.VALUES[charClassId];
    if (availSubs == null)
    {
      return Collections.emptySet();
    }
    availSubs.remove(currClass);
    for (ClassId availSub : availSubs)
    {
      for (SubClass subClass : player.getSubClassList().values())
      {
        if (availSub.getId() == subClass.getClassId())
        {
          availSubs.remove(availSub);
          continue;
        }
        ClassId parent = ClassId.VALUES[availSub.ordinal()].getParent(player.getSex());
        if ((parent != null) && (parent.getId() == subClass.getClassId()))
        {
          availSubs.remove(availSub);
          continue;
        }
        ClassId subParent = ClassId.VALUES[subClass.getClassId()].getParent(player.getSex());
        if ((subParent != null) && (subParent.getId() == availSub.getId()))
        {
          availSubs.remove(availSub);
        }
        if(availSub.getType2() == ClassId.VALUES[subClass.getClassId()].getType2() && subClass.isBase())
        {
View Full Code Here

    return null;
  }
 
  private String makeMessage(Player player)
  {
    ClassId classId = player.getClassId();
    StringBuilder html = new StringBuilder();
    for (ClassId cid : ClassId.VALUES)
    {
      if (cid == ClassId.INSPECTOR)
      {
        continue;
      }
      if (cid.childOf(classId) && (cid.getClassLevel().ordinal() == (classId.getClassLevel().ordinal() + 1)))
      {
        html.append("<a action=\"bypass -h Quest ").append(getClass().getSimpleName()).append(" changeclass ").append(cid.getId()).append(" ").append("\">").append(HtmlUtils.htmlClassName(cid.getId())).append("</a><br>");
      }
    }
    return html.toString();
View Full Code Here

        continue;
      }
     
      _normalSkillTree.put(classId.getId(), temp);
     
      ClassId secondparent = classId.getParent(1);
      if (secondparent == classId.getParent(0))
      {
        secondparent = null;
      }
     
      classId = classId.getParent(0);
     
      while (classId != null)
      {
        List<SkillLearn> parentList = _normalSkillTree.get(classId.getId());
        temp.addAll(parentList);
       
        classId = classId.getParent(0);
        if ((classId == null) && (secondparent != null))
        {
          classId = secondparent;
          secondparent = secondparent.getParent(1);
        }
      }
    }
  }
View Full Code Here

   * Method showSkillList.
   * @param player Player
   */
  public void showSkillList(Player player)
  {
    ClassId classId = player.getClassId();
    if (classId == null)
    {
      return;
    }
    int npcId = getTemplate().npcId;
    if (getTemplate().getTeachInfo().isEmpty())
    {
      NpcHtmlMessage html = new NpcHtmlMessage(player, this);
      StringBuilder sb = new StringBuilder();
      sb.append("<html><head><body>");
      if (player.getVar("lang@").equalsIgnoreCase("en"))
      {
        sb.append("I cannot teach you. My class list is empty.<br> Ask admin to fix it. <br>NpcId:" + npcId + ", Your classId:" + player.getClassId().getId() + "<br>");
      }
      else
      {
        sb.append("Я не могу обучит�? теб�?. Дл�? твоего кла�?�?а мой �?пи�?ок пу�?т.<br> Св�?жи�?�? �? админом дл�? фик�?а �?того. <br>NpcId:" + npcId + ", твой classId:" + player.getClassId().getId() + "<br>");
      }
      sb.append("</body></html>");
      html.setHtml(sb.toString());
      player.sendPacket(html);
      return;
    }
    if (!(getTemplate().canTeach(classId) || getTemplate().canTeach(classId.getParent(player.getSex()))))
    {
      if (this instanceof WarehouseInstance)
      {
        showChatWindow(player, "warehouse/" + getNpcId() + "-noteach.htm");
      }
View Full Code Here

TOP

Related Classes of lineage2.gameserver.model.base.ClassId

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.