Package l2p.database

Examples of l2p.database.FiltredPreparedStatement.executeUpdate()


        statement.setString(28, getName());
        statement.setInt(29, (int) getVitality());
        statement.setInt(30, getFame());
        statement.setInt(31, bookmarks.getCapacity());
        statement.setInt(32, getObjectId());
        statement.executeUpdate();
        Stat.increaseUpdatePlayerBase();
        try
        {
          if(!fast && Config.KILL_COUNTER && _StatKills != null)
          {
View Full Code Here


    {
      con = L2DatabaseFactory.getInstance().getConnection();
      st = con.prepareStatement("UPDATE characters SET char_name = ? WHERE obj_Id = ?");
      st.setString(1, getName());
      st.setInt(2, getObjectId());
      st.executeUpdate();
    }
    catch(Exception e)
    {
      e.printStackTrace();
    }
View Full Code Here

      insertion.setInt(1, leader.getObjectId());
      insertion.setInt(2, type);
      insertion.setInt(3, team.getId());
      insertion.setString(4, name);
      insertion.setInt(5, team.getCategory());
      insertion.executeUpdate();
    }
    catch(Exception e)
    {
      e.printStackTrace();
      return false;
View Full Code Here

      insertion.setInt(1, player.getObjectId());
      insertion.setInt(2, getPlayerType(player.getObjectId()));
      insertion.setInt(3, team.getId());
      insertion.setString(4, team.getName());
      insertion.setInt(5, team.getCategory());
      insertion.executeUpdate();
    }
    catch(Exception e)
    {
      e.printStackTrace();
      return false;
View Full Code Here

        int itemId = cw.getItemId();
        int skillId = cw.getSkillId();
        boolean foundedInItems = false;
        // Delete all cursed weapons skills (we don`t care about same skill on multiply weapons, when player back, skill will appears again)
        statement1.setInt(1, skillId);
        statement1.executeUpdate();
        statement2.setInt(1, itemId);
        rset = statement2.executeQuery();
        while(rset.next())
        {
          // A player has the cursed weapon in his inventory ...
View Full Code Here

      con = L2DatabaseFactory.getInstance().getConnection();
      // Delete the item
      statement = con.prepareStatement("DELETE FROM items WHERE owner_id=? AND item_id=?");
      statement.setInt(1, playerId);
      statement.setInt(2, itemId);
      statement.executeUpdate();
      DatabaseUtils.closeStatement(statement);
      statement = con.prepareStatement("UPDATE characters SET karma=?, pkkills=? WHERE obj_id=?");
      statement.setInt(1, cw.getPlayerKarma());
      statement.setInt(2, cw.getPlayerPkKills());
      statement.setInt(3, playerId);
View Full Code Here

      DatabaseUtils.closeStatement(statement);
      statement = con.prepareStatement("UPDATE characters SET karma=?, pkkills=? WHERE obj_id=?");
      statement.setInt(1, cw.getPlayerKarma());
      statement.setInt(2, cw.getPlayerPkKills());
      statement.setInt(3, playerId);
      if(statement.executeUpdate() != 1)
      {
        _log.warning("Error while updating karma & pkkills for userId " + cw.getPlayerId());
      }
      // clean up the cursedweapons table.
      removeFromDb(itemId);
View Full Code Here

    try
    {
      con = L2DatabaseFactory.getInstance().getConnection();
      statement = con.prepareStatement("DELETE FROM cursed_weapons WHERE item_id = ?");
      statement.setInt(1, itemId);
      statement.executeUpdate();
      if(getCursedWeapon(itemId) != null)
      {
        getCursedWeapon(itemId).initWeapon();
      }
    }
View Full Code Here

          con = L2DatabaseFactory.getInstance().getConnection();
          // Delete the item
          statement = con.prepareStatement("DELETE FROM items WHERE owner_id=? AND item_id=?");
          statement.setInt(1, cw.getPlayerId());
          statement.setInt(2, cw.getItemId());
          statement.executeUpdate();
          DatabaseUtils.closeStatement(statement);
          // Delete the skill
          statement = con.prepareStatement("DELETE FROM character_skills WHERE char_obj_id=? AND skill_id=?");
          statement.setInt(1, cw.getPlayerId());
          statement.setInt(2, cw.getSkillId());
View Full Code Here

          DatabaseUtils.closeStatement(statement);
          // Delete the skill
          statement = con.prepareStatement("DELETE FROM character_skills WHERE char_obj_id=? AND skill_id=?");
          statement.setInt(1, cw.getPlayerId());
          statement.setInt(2, cw.getSkillId());
          statement.executeUpdate();
          DatabaseUtils.closeStatement(statement);
          // Restore the karma
          statement = con.prepareStatement("UPDATE characters SET karma=?, pkkills=? WHERE obj_Id=?");
          statement.setInt(1, cw.getPlayerKarma());
          statement.setInt(2, cw.getPlayerPkKills());
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.