Package com.l2jfrozen.gameserver.model.actor.instance

Examples of com.l2jfrozen.gameserver.model.actor.instance.L2ScarletInstance


    try
    {
      con = L2DatabaseFactory.getInstance().getConnection(false);
      for(Integer bossId : _storedInfo.keySet())
      {
        L2ScarletInstance boss = _bosses.get(bossId);
        StatsSet info = _storedInfo.get(bossId);
        if(boss == null || info == null)
        {
          PreparedStatement update2 = con.prepareStatement(UPDATE_GRAND_BOSS_DATA2);
          update2.setInt(1, _bossStatus.get(bossId));
          update2.setInt(2, bossId);
          update2.executeUpdate();
          update2.close();
        }
        else
        {
          PreparedStatement update1 = con.prepareStatement(UPDATE_GRAND_BOSS_DATA);
          update1.setInt(1, boss.getX());
          update1.setInt(2, boss.getY());
          update1.setInt(3, boss.getZ());
          update1.setInt(4, boss.getHeading());
          update1.setLong(5, info.getLong("respawn_time"));
          double hp = boss.getCurrentHp();
          double mp = boss.getCurrentMp();
          if(boss.isDead())
          {
            hp = boss.getMaxHp();
            mp = boss.getMaxMp();
          }
          update1.setDouble(6, hp);
          update1.setDouble(7, mp);
          update1.setInt(8, _bossStatus.get(bossId));
          update1.setInt(9, bossId);
View Full Code Here


        }
      }

      for(Integer bossId : _storedInfo.keySet())
      {
        L2ScarletInstance boss = _bosses.get(bossId);
        StatsSet info = _storedInfo.get(bossId);
        if(boss == null || info == null)
        {
          PreparedStatement update2 = con.prepareStatement(UPDATE_GRAND_BOSS_DATA2);
          update2.setInt(1, _bossStatus.get(bossId));
          update2.setInt(2, bossId);
          update2.executeUpdate();
          update2.close();
        }
        else
        {
          PreparedStatement update1 = con.prepareStatement(UPDATE_GRAND_BOSS_DATA);
          update1.setInt(1, boss.getX());
          update1.setInt(2, boss.getY());
          update1.setInt(3, boss.getZ());
          update1.setInt(4, boss.getHeading());
          update1.setLong(5, info.getLong("respawn_time"));
          double hp = boss.getCurrentHp();
          double mp = boss.getCurrentMp();
          if(boss.isDead())
          {
            hp = boss.getMaxHp();
            mp = boss.getMaxMp();
          }
          update1.setDouble(6, hp);
          update1.setDouble(7, mp);
          update1.setInt(8, _bossStatus.get(bossId));
          update1.setInt(9, bossId);
View Full Code Here

    Connection con = null;
    PreparedStatement statement = null;
    try
    {
      con = L2DatabaseFactory.getInstance().getConnection();
      L2ScarletInstance boss = _bosses.get(bossId);
      StatsSet info = _storedInfo.get(bossId);
     
      if (statusOnly || boss == null || info == null)
      {
        statement = con.prepareStatement(UPDATE_GRAND_BOSS_DATA2);
        statement.setInt(1, _bossStatus.get(bossId));
        statement.setInt(2, bossId);
      }
      else
      {
        statement = con.prepareStatement(UPDATE_GRAND_BOSS_DATA);
        statement.setInt(1, boss.getX());
        statement.setInt(2, boss.getY());
        statement.setInt(3, boss.getZ());
        statement.setInt(4, boss.getHeading());
        statement.setLong(5, info.getLong("respawn_time"));
        double hp = boss.getCurrentHp();
        double mp = boss.getCurrentMp();
        if (boss.isDead())
        {
          hp = boss.getMaxHp();
          mp = boss.getMaxMp();
        }
        statement.setDouble(6, hp);
        statement.setDouble(7, mp);
        statement.setInt(8, _bossStatus.get(bossId));
        statement.setInt(9, bossId);
View Full Code Here

TOP

Related Classes of com.l2jfrozen.gameserver.model.actor.instance.L2ScarletInstance

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.