Package l2p.gameserver.templates

Examples of l2p.gameserver.templates.StatsSet


    {
      return;
    }
    for(Integer nobleId : _nobles.keySet())
    {
      StatsSet nobleInfo = _nobles.get(nobleId);
      if(nobleInfo != null)
      {
        nobleInfo.set(POINTS, nobleInfo.getInteger(POINTS) + WEEKLY_POINTS);
      }
    }
  }
View Full Code Here


  }

  public static synchronized int getNoblessePasses(L2Player player)
  {
    int objId = player.getObjectId();
    StatsSet noble = _nobles.get(objId);
    if(noble == null)
    {
      return 0;
    }
    int points = noble.getInteger(POINTS_PAST);
    if(points == 0) // Уже получил бонус
    {
      return 0;
    }
    int rank = _noblesRank.get(objId);
    switch(rank)
    {
      case 1:
        points = Config.ALT_OLY_RANK1_POINTS;
        break;
      case 2:
        points = Config.ALT_OLY_RANK2_POINTS;
        break;
      case 3:
        points = Config.ALT_OLY_RANK3_POINTS;
        break;
      case 4:
        points = Config.ALT_OLY_RANK4_POINTS;
        break;
      default:
        points = Config.ALT_OLY_RANK5_POINTS;
    }
    if(player.isHero() || Hero.getInstance().isInactiveHero(player.getObjectId()))
    {
      points += Config.ALT_OLY_HERO_POINTS;
    }
    noble.set(POINTS_PAST, 0);
    OlympiadDatabase.saveNobleData(objId);
    return points * Config.ALT_OLY_GP_PER_POINT;
  }
 
View Full Code Here

      {
        if(id > 0 && heroId != id)
        {
          continue;
        }
        StatsSet hero = _heroes.get(heroId);
        try
        {
          statement.setInt(1, heroId);
          statement.setInt(2, hero.getInteger(COUNT));
          statement.setInt(3, hero.getInteger(PLAYED));
          statement.setInt(4, hero.getInteger(ACTIVE));
          statement.execute();
          if(_completeHeroes != null && !_completeHeroes.containsKey(heroId))
          {
            HeroSetClanAndAlly(heroId, hero);
            _completeHeroes.put(heroId, hero);
View Full Code Here

   * @param objId
   * @return
   */
  public static synchronized int getNoblePoints(int objId)
  {
    StatsSet noble = _nobles.get(objId);
    if(noble == null)
    {
      return 0;
    }
    return noble.getInteger(POINTS);
  }
View Full Code Here

    return false;
  }

  public void activateHero(L2Player player)
  {
    StatsSet hero = _heroes.get(player.getObjectId());
    hero.set(ACTIVE, 1);
    _heroes.remove(player.getObjectId());
    _heroes.put(player.getObjectId(), hero);
    if(player.getBaseClassId() == player.getActiveClassId())
    {
      addSkills(player);
View Full Code Here

   * @param objId
   * @return
   */
  public static synchronized int getNoblePointsPast(int objId)
  {
    StatsSet noble = _nobles.get(objId);
    if(noble == null)
    {
      return 0;
    }
    return noble.getInteger(POINTS_PAST);
  }
View Full Code Here

  }

  public static void addHeroes(int objectId)
  {
    L2Player player = L2ObjectsStorage.getPlayer(objectId);
    StatsSet hero = new StatsSet();
    hero.set(Olympiad.CHAR_NAME, player.getName());
    hero.set(Olympiad.CLASS_ID, player.getClassId());
    hero.set(COUNT, 1);
    hero.set(PLAYED, 1);
    hero.set(ACTIVE, 1);
    HeroSetClanAndAlly(objectId, hero);
    _heroes.put(objectId, hero);
  }
View Full Code Here

    return noble.getInteger(POINTS_PAST);
  }

  public static synchronized int getCompetitionDone(int objId)
  {
    StatsSet noble = _nobles.get(objId);
    if(noble == null)
    {
      return 0;
    }
    return noble.getInteger(COMP_DONE);
  }
View Full Code Here

    return noble.getInteger(COMP_DONE);
  }

  public static synchronized int getCompetitionWin(int objId)
  {
    StatsSet noble = _nobles.get(objId);
    if(noble == null)
    {
      return 0;
    }
    return noble.getInteger(COMP_WIN);
  }
View Full Code Here

    return noble.getInteger(COMP_WIN);
  }

  public static synchronized int getCompetitionLoose(int objId)
  {
    StatsSet noble = _nobles.get(objId);
    if(noble == null)
    {
      return 0;
    }
    return noble.getInteger(COMP_LOOSE);
  }
View Full Code Here

TOP

Related Classes of l2p.gameserver.templates.StatsSet

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.