Package l2p.database

Examples of l2p.database.FiltredStatement.executeUpdate()


    FiltredStatement statement = null;
    try
    {
      con = L2DatabaseFactory.getInstance().getConnection();
      statement = con.createStatement();
      statement.executeUpdate("DELETE FROM character_skills_save WHERE char_obj_id = " + getObjectId() + " AND class_index=" + getActiveClassId() + " AND `end_time` < " + System.currentTimeMillis());
      if(skillReuseTimeStamps.isEmpty())
      {
        return;
      }
      SqlBatch b = new SqlBatch("REPLACE INTO `character_skills_save` (`char_obj_id`,`skill_id`,`class_index`,`end_time`,`reuse_delay_org`) VALUES");
View Full Code Here


          }
        }
      }
      if(!b.isEmpty())
      {
        statement.executeUpdate(b.close());
      }
    }
    catch(final Exception e)
    {
      _log.warning("Could not store disable skills data: " + e);
View Full Code Here

    FiltredStatement statement = null;
    try
    {
      con = L2DatabaseFactory.getInstance().getConnection();
      statement = con.createStatement();
      statement.executeUpdate("DELETE FROM character_effects_save WHERE char_obj_id = " + getObjectId() + " AND class_index=" + getActiveClassId());
      if(_effectList == null || _effectList.isEmpty())
      {
        return;
      }
      int order = 0;
View Full Code Here

          }
        }
      }
      if(!b.isEmpty())
      {
        statement.executeUpdate(b.close());
      }
    }
    catch(final Exception e)
    {
      _log.warning("Could not store active effects data: " + e);
View Full Code Here

          disableItem(skill, rDelayOrg, endTime - curTime);
        }
      }
      DatabaseUtils.closeStatement(statement);
      statement = con.createStatement();
      statement.executeUpdate("DELETE FROM character_skills_save WHERE char_obj_id = " + getObjectId() + " AND class_index=" + getActiveClassId() + " AND `end_time` < " + System.currentTimeMillis());
    }
    catch(Exception e)
    {
      _log.warning("Could not restore active skills data for " + getObjectId() + "/" + getActiveClassId());
      e.printStackTrace();
View Full Code Here

    FiltredStatement statement = null;
    try
    {
      con = L2DatabaseFactory.getInstance().getConnection();
      statement = con.createStatement();
      statement.executeUpdate("DELETE FROM character_blocklist WHERE obj_Id=" + getObjectId());
      if(_blockList.isEmpty())
      {
        return;
      }
      SqlBatch b = new SqlBatch("INSERT IGNORE INTO `character_blocklist` (`obj_Id`,`target_Id`) VALUES");
View Full Code Here

          b.write(sb.toString());
        }
      }
      if(!b.isEmpty())
      {
        statement.executeUpdate(b.close());
      }
    }
    catch(Exception e)
    {
      _log.warning("Can't store player blocklist " + e);
View Full Code Here

        sb.append("active=").append(subClass.isActive() ? 1 : 0).append(",");
        sb.append("isBase=").append(subClass.isBase() ? 1 : 0).append(",");
        sb.append("death_penalty=").append(subClass.getDeathPenalty().getLevelOnSaveDB()).append(",");
        sb.append("skills='").append(subClass.getSkills()).append("'");
        sb.append(" WHERE char_obj_id=").append(getObjectId()).append(" AND class_id=").append(subClass.getClassId()).append(" LIMIT 1");
        statement.executeUpdate(sb.toString());
      }
      sb = new StringBuilder("UPDATE LOW_PRIORITY character_subclasses SET ");
      sb.append("maxHp=").append(getMaxHp()).append(",");
      sb.append("maxMp=").append(getMaxMp()).append(",");
      sb.append("maxCp=").append(getMaxCp());
View Full Code Here

      sb = new StringBuilder("UPDATE LOW_PRIORITY character_subclasses SET ");
      sb.append("maxHp=").append(getMaxHp()).append(",");
      sb.append("maxMp=").append(getMaxMp()).append(",");
      sb.append("maxCp=").append(getMaxCp());
      sb.append(" WHERE char_obj_id=").append(getObjectId()).append(" AND active=1 LIMIT 1");
      statement.executeUpdate(sb.toString());
    }
    catch(final Exception e)
    {
      _log.warning("Could not store char sub data: " + e);
      e.printStackTrace();
View Full Code Here

          b.write(sb.toString());
        }
      }
      if(!b.isEmpty())
      {
        statement.executeUpdate(b.close());
      }
    }
    catch(SQLException e)
    {
      _log.warning("RaidBossSpawnManager: Couldnt update raidboss_points table");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.