Package com.l2jfrozen.gameserver.templates

Examples of com.l2jfrozen.gameserver.templates.StatsSet


   
    for (StatsSet hero : _heroesToBe)
    {
      int charId = hero.getInteger(CHAR_ID);
     
      StatsSet noble = _nobles.get(charId);
      int currentPoints = noble.getInteger(POINTS);
      currentPoints += Config.ALT_OLY_HERO_POINTS;
      noble.set(POINTS, currentPoints);
     
      updateNobleStats(charId, noble);
    }
  }
View Full Code Here


    if (_period == 1)
    {
      if (_nobles.isEmpty())
        return 0;

      StatsSet noble = _nobles.get(objId);
      if (noble == null)
        return 0;
      int points = noble.getInteger(POINTS);
      if (points <= Config.ALT_OLY_MIN_POINT_FOR_EXCH)
        return 0;

      noble.set(POINTS, 0);
      updateNobleStats(objId, noble);

      points *= Config.ALT_OLY_GP_PER_POINT;

      return points;
    }
   
    if (_oldnobles.isEmpty())
      return 0;

    StatsSet noble = _oldnobles.get(objId);
    if (noble == null)
      return 0;
    int points = noble.getInteger(POINTS);
    if (points <= Config.ALT_OLY_MIN_POINT_FOR_EXCH)
      return 0;

    noble.set(POINTS, 0);
    updateOldNobleStats(objId, noble);

    points *= Config.ALT_OLY_GP_PER_POINT;

    return points;
View Full Code Here

  public int getNoblePoints(int objId)
  {
    if (_nobles.isEmpty())
      return 0;
   
    StatsSet noble = _nobles.get(objId);
    if (noble == null)
      return 0;
    int points = noble.getInteger(POINTS);
   
    return points;
  }
View Full Code Here

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

  public int getCompetitionWon(int objId)
  {
    if (_nobles.isEmpty())
      return 0;
   
    StatsSet noble = _nobles.get(objId);
    if (noble == null)
      return 0;
    int points = noble.getInteger(COMP_WON);
   
    return points;
  }
View Full Code Here

  public int getCompetitionLost(int objId)
  {
    if (_nobles.isEmpty())
      return 0;
   
    StatsSet noble = _nobles.get(objId);
    if (noble == null)
      return 0;
    int points = noble.getInteger(COMP_LOST);
   
    return points;
  }
View Full Code Here

     
      long respawnTime = (long)(Config.VALAKAS_RESP_FIRST + Rnd.get(Config.VALAKAS_RESP_SECOND)) * 3600000;
        
      this.startQuestTimer("valakas_unlock", respawnTime, null, null);
      // also save the respawn time so that the info is maintained past reboots
      StatsSet info = GrandBossManager.getInstance().getStatsSet(VALAKAS);
      info.set("respawn_time", (System.currentTimeMillis() + respawnTime));
      GrandBossManager.getInstance().setStatsSet(VALAKAS, info);
    }
   
    return super.onKill(npc, killer, isPet);
  }
View Full Code Here

    registerMobs(mob);
    addStartNpc(GUIDE);
    addTalkId(GUIDE);
    addStartNpc(CUBE);
    addTalkId(CUBE);
    StatsSet info = GrandBossManager.getInstance().getStatsSet(FRINTEZZA);
   
    Integer status = GrandBossManager.getInstance().getBossStatus(FRINTEZZA);
   
    if (status == DEAD)
    {
      long temp = (info.getLong("respawn_time") - System.currentTimeMillis());
      if (temp > 0)
        startQuestTimer("frintezza_unlock", temp, null, null);
      else
        GrandBossManager.getInstance().setBossStatus(FRINTEZZA,DORMANT);
    }
View Full Code Here

       
        GrandBossManager.getInstance().setBossStatus(FRINTEZZA,DEAD);
        long respawnTime = (long) (Config.FRINTEZZA_RESP_FIRST + Rnd.get(Config.FRINTEZZA_RESP_SECOND)) * 3600000;
        startQuestTimer("frintezza_unlock", respawnTime, npc, null);
        // also save the respawn time so that the info is maintained past reboots
        StatsSet info = GrandBossManager.getInstance().getStatsSet(FRINTEZZA);
        info.set("respawn_time", System.currentTimeMillis() + respawnTime);
        GrandBossManager.getInstance().setStatsSet(FRINTEZZA,info);
       
      }
     
    }
View Full Code Here

    addEventId(ZAKEN, Quest.QuestEventType.ON_KILL);
    addEventId(ZAKEN, Quest.QuestEventType.ON_ATTACK);
   
    _Zone = GrandBossManager.getInstance().getZone(55312, 219168, -3223);
   
    StatsSet info = GrandBossManager.getInstance().getStatsSet(ZAKEN);
    Integer status = GrandBossManager.getInstance().getBossStatus(ZAKEN);
    if (status == DEAD)
    {
      // load the unlock date and time for zaken from DB
      long temp = info.getLong("respawn_time") - System.currentTimeMillis();
      // if zaken is locked until a certain time, mark it so and start the unlock timer
      // the unlock time has not yet expired.
      if (temp > 0)
        startQuestTimer("zaken_unlock", temp, null, null);
      else
      {
        // the time has already expired while the server was offline. Immediately spawn zaken.
        L2GrandBossInstance zaken = (L2GrandBossInstance) addSpawn(ZAKEN, 55312, 219168, -3223, 0, false, 0);
        GrandBossManager.getInstance().setBossStatus(ZAKEN, ALIVE);
        spawnBoss(zaken);
      }
    }
    else
    {
      int loc_x = info.getInteger("loc_x");
      int loc_y = info.getInteger("loc_y");
      int loc_z = info.getInteger("loc_z");
      int heading = info.getInteger("heading");
      int hp = info.getInteger("currentHP");
      int mp = info.getInteger("currentMP");
      L2GrandBossInstance zaken = (L2GrandBossInstance) addSpawn(ZAKEN, loc_x, loc_y, loc_z, heading, false, 0);
      zaken.setCurrentHpMp(hp, mp);
      spawnBoss(zaken);
    }
  }
View Full Code Here

TOP

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