Package l2p.gameserver.model.base

Examples of l2p.gameserver.model.base.ClassId


    {
      show("I have nothing to say you", pl, npc);
      return;
    }
    String htmltext;
    ClassId classId = pl.getClassId();
    if(classId == ClassId.maleSoldier)
    {
      htmltext = "01.htm";
    }
    else
View Full Code Here


    {
      show("I have nothing to say you", pl, npc);
      return;
    }
    String htmltext = "I have nothing to say you";
    ClassId classId = pl.getClassId();
    if(classId == ClassId.warder)
    {
      htmltext = "01.htm";
    }
    else if(classId == ClassId.trooper)
View Full Code Here

                showTransferSkillList(player);
            } else if (command.startsWith("RemoveTransferSkill")) {
                StringTokenizer st = new StringTokenizer(command);
                st.nextToken();
                // int skill_id = Integer.parseInt(st.nextToken());
                ClassId classId = player.getClassId();
                if (classId != null) {
                    int item_id = 0;
                    switch (classId) {
                    case cardinal:
                        item_id = 15307;
View Full Code Here

            sb.append("</body></html>");
            html.setHtml(sb.toString());
            player.sendPacket(html);
            return;
        }
        ClassId classId = player.getClassId();
        if (classId == null) {
            return;
        }
        int npcId = getTemplate().npcId;
        if (_classesToTeach == null) {
            NpcHtmlMessage html = new NpcHtmlMessage(player, this);
            TextBuilder sb = new TextBuilder();
            sb.append("<html><head><body>");
            sb.append("I cannot teach you. My class list is empty.<br> Ask admin to fix it. Need add my npcid and classes to skill_learn.sql.<br>NpcId:"
                    + npcId + ", Your 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())))) {
            NpcHtmlMessage html = new NpcHtmlMessage(player, this);
            TextBuilder sb = new TextBuilder();
            sb.append("<html><head><body>");
            sb.append(new CustomMessage("l2p.gameserver.model.instances.L2NpcInstance.WrongTeacherClass", player));
            sb.append("</body></html>");
View Full Code Here

            sb.append("</body></html>");
            html.setHtml(sb.toString());
            player.sendPacket(html);
            return;
        }
        ClassId classId = player.getClassId();
        if (classId == null) {
            return;
        }
        if (player.getLevel() < 76 || classId.getLevel() < 4) {
            NpcHtmlMessage html = new NpcHtmlMessage(player, this);
            TextBuilder sb = new TextBuilder();
            sb.append("<html><head><body>");
            sb.append("You must have 3rd class change quest completed.");
            sb.append("</body></html>");
View Full Code Here

    super(objectId, template);
  }

  private String makeMessage(L2Player player)
  {
    ClassId classId = player.getClassId();
    int jobLevel = classId.getLevel();
    int level = player.getLevel();
    StringBuilder html = new StringBuilder();
    if(Config.ALLOW_CLASS_MASTERS_LIST.isEmpty() || !Config.ALLOW_CLASS_MASTERS_LIST.contains(jobLevel))
    {
      jobLevel = 4;
    }
    if((level >= 20 && jobLevel == 1 || level >= 40 && jobLevel == 2 || level >= 76 && jobLevel == 3) && Config.ALLOW_CLASS_MASTERS_LIST.contains(jobLevel))
    {
      L2Item item = ItemTable.getInstance().getTemplate(Config.CLASS_MASTERS_PRICE_ITEM);
      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())
      {
        // Инспектор является наследником trooper и warder, но сменить его как профессию нельзя,
        // т.к. это сабкласс. Наследуется с целью получения скилов родителей.
        if(cid == ClassId.inspector)
        {
          continue;
        }
        if(cid.childOf(classId) && cid.getLevel() == classId.getLevel() + 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(cid.name()).append("</a><br>");
        }
      }
      player.sendPacket(new NpcHtmlMessage(player, this).setHtml(html.toString()));
View Full Code Here

    String htmltext = "noquest";
    if(npcId == Ascalon)
    {
      if(cond == 0)
      {
        ClassId class_id = st.getPlayer().getClassId();
        if(class_id != ClassId.warrior && class_id != ClassId.orcRaider)
        {
          st.exitCurrentQuest(true);
          return "30624-01.htm";
        }
View Full Code Here

      skilltreestatement = con.prepareStatement("SELECT class_id, skill_id, level, name, sp, min_level, rep FROM skill_trees where class_id=? AND class_id >= 0 ORDER BY skill_id, level");
      classlist = classliststatement.executeQuery();
      while(classlist.next())
      {
        classintid = classlist.getInt("id");
        ClassId classId = ClassId.values()[classintid];
        GArray<L2SkillLearn> list = new GArray<L2SkillLearn>();
        skilltreestatement.setInt(1, classintid);
        skilltree = skilltreestatement.executeQuery();
        addSkills(con, skilltree, list);
        _skillTrees.put(ClassId.values()[classintid], list);
        count += list.size();
        ClassId secondparent = classId.getParent((byte) 1);
        if(secondparent == classId.getParent((byte) 0))
        {
          secondparent = null;
        }
        classId = classId.getParent((byte) 0);
        while(classId != null)
        {
          GArray<L2SkillLearn> parentList = _skillTrees.get(classId);
          list.addAll(parentList);
          classId = classId.getParent((byte) 0);
          if(classId == null && secondparent != null)
          {
            classId = secondparent;
            secondparent = secondparent.getParent((byte) 1);
          }
        }
        //_log.info("SkillTreeTable: skill tree for class " + classintid + " has " + list.size() + " skills");
      }
      DatabaseUtils.closeDatabaseSR(classliststatement, classlist);
View Full Code Here

      {
        return true;
      }
    }
    // Проверяем, трансферился ли скилл
    ClassId classId = player.getClassId();
    if(classId != null)
    {
      int item_id = 0;
      switch(classId)
      {
View Full Code Here

      statement = con.prepareStatement("SELECT * FROM class_list, char_templates, lvlupgain WHERE class_list.id = char_templates.classId AND class_list.id = lvlupgain.classId ORDER BY class_list.id");
      rset = statement.executeQuery();
      while(rset.next())
      {
        StatsSet set = new StatsSet();
        ClassId classId = ClassId.values()[rset.getInt("class_list.id")];
        set.set("classId", rset.getInt("class_list.id"));
        set.set("className", rset.getString("char_templates.className"));
        set.set("raceId", rset.getByte("char_templates.RaceId"));
        set.set("baseSTR", rset.getByte("char_templates.STR"));
        set.set("baseCON", rset.getByte("char_templates.CON"));
        set.set("baseDEX", rset.getByte("char_templates.DEX"));
        set.set("baseINT", rset.getByte("char_templates._INT"));
        set.set("baseWIT", rset.getByte("char_templates.WIT"));
        set.set("baseMEN", rset.getByte("char_templates.MEN"));
        set.set("baseHpMax", rset.getFloat("lvlupgain.defaultHpBase"));
        set.set("lvlHpAdd", rset.getFloat("lvlupgain.defaultHpAdd"));
        set.set("lvlHpMod", rset.getFloat("lvlupgain.defaultHpMod"));
        set.set("baseMpMax", rset.getFloat("lvlupgain.defaultMpBase"));
        set.set("baseCpMax", rset.getFloat("lvlupgain.defaultCpBase"));
        set.set("lvlCpAdd", rset.getFloat("lvlupgain.defaultCpAdd"));
        set.set("lvlCpMod", rset.getFloat("lvlupgain.defaultCpMod"));
        set.set("lvlMpAdd", rset.getFloat("lvlupgain.defaultMpAdd"));
        set.set("lvlMpMod", rset.getFloat("lvlupgain.defaultMpMod"));
        set.set("baseHpReg", 0.01);
        set.set("baseCpReg", 0.01);
        set.set("baseMpReg", 0.01);
        set.set("basePAtk", rset.getInt("char_templates.p_atk"));
        set.set("basePDef", /* classId.isMage()? 77 : 129 */rset.getInt("char_templates.p_def"));
        set.set("baseMAtk", rset.getInt("char_templates.m_atk"));
        set.set("baseMDef", 41 /* rset.getInt("char_templates.m_def") */);
        set.set("classBaseLevel", rset.getInt("lvlupgain.class_lvl"));
        set.set("basePAtkSpd", rset.getInt("char_templates.p_spd"));
        set.set("baseMAtkSpd", classId.isMage() ? 166 : 333 /* rset.getInt("char_templates.m_spd") */);
        set.set("baseCritRate", rset.getInt("char_templates.critical"));
        set.set("baseWalkSpd", rset.getInt("char_templates.walk_spd"));
        set.set("baseRunSpd", rset.getInt("char_templates.run_spd"));
        set.set("baseShldDef", 0);
        set.set("baseShldRate", 0);
View Full Code Here

TOP

Related Classes of l2p.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.