Package lineage2.gameserver.model.base

Examples of lineage2.gameserver.model.base.Race


  @Override
  public void onReload()
  {
    for (String element : ZONES)
    {
      Zone zone = ReflectionUtils.getZone(element);
      zone.removeListener(_zoneListener);
    }
    if (_buffTask != null)
    {
      _buffTask.cancel(false);
      _buffTask = null;
View Full Code Here


    @Override
    public void runImpl()
    {
      for (String element : ZONES)
      {
        Zone zone = ReflectionUtils.getZone(element);
        NpcInstance npc = getKasha(zone);
        if ((npc != null) && (zone != null))
        {
          int curseLvl = 0;
          int yearningLvl = 0;
          int despairLvl = 0;
          for (Creature c : zone.getObjects())
          {
            if (c.isMonster() && !c.isDead())
            {
              if (getRealNpcId((NpcInstance) c) == mobs[0])
              {
                curseLvl++;
              }
              else if (getRealNpcId((NpcInstance) c) == mobs[1])
              {
                yearningLvl++;
              }
              else if (getRealNpcId((NpcInstance) c) == mobs[2])
              {
                despairLvl++;
              }
            }
          }
          if ((yearningLvl > 0) || (curseLvl > 0) || (despairLvl > 0))
          {
            for (Creature cha : zone.getInsidePlayables())
            {
              boolean casted = false;
              if (curseLvl > 0)
              {
                addEffect(npc, cha.getPlayer(), SkillTable.getInstance().getInfo(_buffs[0], curseLvl), true);
View Full Code Here

  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

      boolean useBaseClass = chardata.getInt("type") == SubClassType.BASE_CLASS.ordinal();
      if (!useBaseClass)
      {
        baseClassId = restoreBaseClassId(objectId);
      }
      Race race = ClassId.VALUES[baseClassId[1]].getRace();
      String name = chardata.getString("char_name");
      charInfopackage = new CharSelectInfoPackage(objectId, name);
      charInfopackage.setLevel(chardata.getInt("level"));
      charInfopackage.setMaxHp(chardata.getInt("maxHp"));
      charInfopackage.setCurrentHp(chardata.getDouble("curHp"));
      charInfopackage.setMaxMp(chardata.getInt("maxMp"));
      charInfopackage.setCurrentMp(chardata.getDouble("curMp"));

      charInfopackage.setX(chardata.getInt("x"));
      charInfopackage.setY(chardata.getInt("y"));
      charInfopackage.setZ(chardata.getInt("z"));
      charInfopackage.setPk(chardata.getInt("pkkills"));
      charInfopackage.setPvP(chardata.getInt("pvpkills"));

      charInfopackage.setFace(chardata.getInt("face"));
      charInfopackage.setHairStyle(chardata.getInt("hairstyle"));
      charInfopackage.setHairColor(chardata.getInt("haircolor"));
      charInfopackage.setSex(chardata.getInt("sex"));

      charInfopackage.setExp(chardata.getLong("exp"));
      charInfopackage.setSp(chardata.getInt("sp"));
      charInfopackage.setClanId(chardata.getInt("clanid"));

      charInfopackage.setKarma(chardata.getInt("karma"));
      charInfopackage.setRace(race.ordinal());
      charInfopackage.setClassId(classid);
      charInfopackage.setBaseClassId(baseClassId[0]);
      long deletetime = chardata.getLong("deletetime");
      int deletedays = 0;
      if (Config.DELETE_DAYS > 0)
View Full Code Here

  }

  public boolean checkStartNpc(NpcInstance npc, Player player)
  {
    int npcId = npc.getNpcId();
    Race race = player.getRace();
    switch(npcId)
    {
      case FRANCO:
        if(race == Race.human)
          return true;
View Full Code Here

  protected void readData(Element rootElement) throws Exception
  {
    for (Iterator<Element> iterator = rootElement.elementIterator(); iterator.hasNext();)
    {
      Element element = iterator.next();
      Race race = Race.valueOf(element.attributeValue("race").toLowerCase());
      Sex sex = Sex.valueOf(element.attributeValue("sex").toUpperCase());
      ClassType classtype = ClassType.valueOf(element.attributeValue("type").toUpperCase());
      StatAttributes min_attr = null;
      StatAttributes max_attr = null;
      StatAttributes base_attr = null;
View Full Code Here

      int min_level = Integer.parseInt(element.attributeValue("min_level"));
      int item_id = element.attributeValue("item_id") == null ? 0 : Integer.parseInt(element.attributeValue("item_id"));
      long item_count = element.attributeValue("item_count") == null ? 1 : Long.parseLong(element.attributeValue("item_count"));
      boolean clicked = (element.attributeValue("clicked") != null) && Boolean.parseBoolean(element.attributeValue("clicked"));
      boolean deprecated = (element.attributeValue("deprecated") != null) && Boolean.parseBoolean(element.attributeValue("deprecated"));
      Race race = element.attributeValue("race") == null ? null : Race.valueOf(element.attributeValue("race"));
     
      skillLearns.add(new SkillLearn(id, level, min_level, cost, item_id, item_count, clicked, deprecated, race, new HashMap<Integer, Long>(), new ArrayList<Integer>()));
    }
    return skillLearns;
  }
View Full Code Here

   */
  public static Set<ClassId> getAvailableSubClasses(Player player, Race npcRace, ClassType npcTeachType, boolean isNew)
  {
    Set<ClassId> availSubs = null;
    Set<ClassId> availSubs1 = null;
    Race race = player.getRace();
    if (race == Race.kamael)
    {
      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:
View Full Code Here

            }
            territory.add(shape);
          }
          else if ("restart".equalsIgnoreCase(n.getName()))
          {
            Race race = Race.valueOf(n.attributeValue("race"));
            String locName = n.attributeValue("loc");
            restarts.put(race, locName);
          }
        }
        if (territory == null)
View Full Code Here

TOP

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

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.