Jump to content

Chaazy

Membro
  • Content Count

    109
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Chaazy

  1. Chaazy

    Baium Bugado

    no caso da frozen, options.properties # Delete dropped reward items from world after a specified amount of seconds. Disabled = 0. AutoDestroyDroppedItemAfter = 360 <- Tempo em segundos, que o drop fica no chão.
  2. Deixa eu ver se entendi, você quer usar um item como moeda no jogo com a aparência do ticket? Se for isso é mais fácil você criar um novo item. Fazendo isso você pode colocar o nome que deseja, se pode ser comercializado, dropado etc...
  3. Amigo você já procurou nas sua configs? head/other.preperties. Geralmente fica lá, caso realmente não encontre nada eu aconselho você fazer como Zeron disse. Migre seus arquivos para uma revisão com source. A maioria das compiladas aqui do fórum possuem muitos bugs que ainda não foram corrigidos, outras são versões antigas. Abraço.
  4. Mais uma fix pra 1132 .
  5. Correção para as skills da frozen.
  6. Acho que deve ser isso que esta procurando.
  7. Meu amigo você é demais! Problema resolvido! Vou postar a correção no tópico dos fixes da Frozen 1132. Muito Obrigado KhayrusS. Abraço
  8. Vou postar todos os códigos. StoreEffect @SuppressWarnings("null") private synchronized void storeEffect() { if (!Config.STORE_SKILL_COOLTIME) return; Connection con = null; try { con = L2DatabaseFactory.getInstance().getConnection(false); PreparedStatement statement; // Delete all current stored effects for char to avoid dupe statement = con.prepareStatement(DELETE_SKILL_SAVE); statement.setInt(1, getObjectId()); statement.setInt(2, getClassIndex()); statement.execute(); DatabaseUtils.close(statement); // Store all effect data along with calulated remaining // reuse delays for matching skills. 'restore_type'= 0. final L2Effect[] effects = getAllEffects(); statement = con.prepareStatement(ADD_SKILL_SAVE); final List<Integer> storedSkills = new FastList<>(); int buff_index = 0; for (final L2Effect effect : effects) { final int skillId = effect.getSkill().getId(); if (storedSkills.contains(skillId)) continue; storedSkills.add(skillId); if (effect != null && effect.getInUse() && !effect.getSkill().isToggle() && !effect.getStackType().equals("BattleForce") && !effect.getStackType().equals("SpellForce") && effect.getSkill().getSkillType() != SkillType.FORCE_BUFF) { statement.setInt(1, getObjectId()); statement.setInt(2, skillId); statement.setInt(3, effect.getSkill().getLevel()); statement.setInt(4, effect.getCount()); statement.setInt(5, effect.getTime()); if (ReuseTimeStamps.containsKey(effect.getSkill().getReuseHashCode())) { final TimeStamp t = ReuseTimeStamps.get(effect.getSkill().getReuseHashCode()); statement.setLong(6, t.hasNotPassed() ? t.getReuse() : 0); statement.setLong(7, t.hasNotPassed() ? t.getStamp() : 0); } else { statement.setLong(6, 0); statement.setLong(7, 0); } statement.setInt(8, 0); statement.setInt(9, getClassIndex()); statement.setInt(10, ++buff_index); statement.execute(); } } // Store the reuse delays of remaining skills which // lost effect but still under reuse delay. 'restore_type' 1. for (final TimeStamp t : ReuseTimeStamps.values()) { if (t.hasNotPassed()) { final int skillId = t.getSkill().getId(); final int skillLvl = t.getSkill().getLevel(); if (storedSkills.contains(skillId)) continue; storedSkills.add(skillId); statement.setInt(1, getObjectId()); statement.setInt(2, skillId); statement.setInt(3, skillLvl); statement.setInt(4, -1); statement.setInt(5, -1); statement.setLong(6, t.getReuse()); statement.setLong(7, t.getStamp()); statement.setInt(8, 1); statement.setInt(9, getClassIndex()); statement.setInt(10, ++buff_index); statement.execute(); } } DatabaseUtils.close(statement); } catch (final Exception e) { LOGGER.warn("Could not store char effect data: "); e.printStackTrace(); } finally { CloseUtil.close(con); } } restoreEffect public void restoreEffects(final boolean activateEffects) { Connection con = null; try { con = L2DatabaseFactory.getInstance().getConnection(false); PreparedStatement statement; ResultSet rset; /** * Restore Type 0 These skill were still in effect on the character upon logout. Some of which were self casted and might still have had a long reuse delay which also is restored. */ statement = con.prepareStatement(RESTORE_SKILL_SAVE); statement.setInt(1, getObjectId()); statement.setInt(2, getClassIndex()); statement.setInt(3, 0); rset = statement.executeQuery(); while (rset.next()) { final int skillId = rset.getInt("skill_id"); final int skillLvl = rset.getInt("skill_level"); final int effectCount = rset.getInt("effect_count"); final int effectCurTime = rset.getInt("effect_cur_time"); final long reuseDelay = rset.getLong("reuse_delay"); final long systime = rset.getLong("systime"); // Just incase the admin minipulated this table incorrectly :x if (skillId == -1 || effectCount == -1 || effectCurTime == -1 || reuseDelay < 0) { continue; } if (activateEffects) { L2Skill skill = SkillTable.getInstance().getInfo(skillId, skillLvl); skill.getEffects(this, this, false, false, false); skill = null; for (final L2Effect effect : getAllEffects()) { if (effect.getSkill().getId() == skillId) { effect.setCount(effectCount); effect.setFirstTime(effectCurTime); } } } final long remainingTime = systime - System.currentTimeMillis(); if (remainingTime > 10) { final L2Skill skill = SkillTable.getInstance().getInfo(skillId, skillLvl); if (skill == null) continue; disableSkill(skill, remainingTime); addTimeStamp(new TimeStamp(skill, reuseDelay, systime)); } } DatabaseUtils.close(rset); DatabaseUtils.close(statement); rset = null; statement = null; /** * Restore Type 1 The remaning skills lost effect upon logout but were still under a high reuse delay. */ statement = con.prepareStatement(RESTORE_SKILL_SAVE); statement.setInt(1, getObjectId()); statement.setInt(2, getClassIndex()); statement.setInt(3, 1); rset = statement.executeQuery(); while (rset.next()) { final int skillId = rset.getInt("skill_id"); final int skillLvl = rset.getInt("skill_level"); final long reuseDelay = rset.getLong("reuse_delay"); final long systime = rset.getLong("systime"); final long remainingTime = systime - System.currentTimeMillis(); if (remainingTime > 0) { final L2Skill skill = SkillTable.getInstance().getInfo(skillId, skillLvl); if (skill == null) continue; disableSkill(skill, remainingTime); addTimeStamp(new TimeStamp(skill, reuseDelay, systime)); } } DatabaseUtils.close(rset); DatabaseUtils.close(statement); rset = null; statement = con.prepareStatement(DELETE_SKILL_SAVE); statement.setInt(1, getObjectId()); statement.setInt(2, getClassIndex()); statement.executeUpdate(); DatabaseUtils.close(statement); statement = null; } catch (final Exception e) { if (Config.ENABLE_ALL_EXCEPTIONS) e.printStackTrace(); LOGGER.warn("Could not restore active effect data: " + e); } finally { CloseUtil.close(con); } updateEffectIcons(); } TimeStamp public static class TimeStamp { public long getStamp() { return stamp; } public L2Skill getSkill() { return skill; } public long getReuse() { return reuse; } public long getRemaining() { return Math.max(stamp - System.currentTimeMillis(), 0L); } protected boolean hasNotPassed() { return System.currentTimeMillis() < stamp; } private final L2Skill skill; private final long reuse; private final long stamp; protected TimeStamp(final L2Skill _skill, final long _reuse) { skill = _skill; reuse = _reuse; stamp = System.currentTimeMillis() + reuse; } protected TimeStamp(final L2Skill _skill, final long _reuse, final long _systime) { skill = _skill; reuse = _reuse; stamp = _systime; } } /** * Index according to skill id the current timestamp of use. * @param s the s * @param r the r */ @Override public void addTimeStamp(final L2Skill s, final int r) { ReuseTimeStamps.put(s.getReuseHashCode(), new TimeStamp(s, r)); } /** * Index according to skill this TimeStamp instance for restoration purposes only. * @param T the t */ private void addTimeStamp(final TimeStamp T) { ReuseTimeStamps.put(T.getSkill().getId(), T); } /** * Index according to skill id the current timestamp of use. * @param s the s */ @Override public void removeTimeStamp(final L2Skill s) { ReuseTimeStamps.remove(s.getReuseHashCode()); } public Collection<TimeStamp> getReuseTimeStamps() { return ReuseTimeStamps.values(); } public void resetSkillTime(final boolean ssl) { final L2Skill arr$[] = getAllSkills(); for (final L2Skill skill : arr$) { if (skill != null && skill.isActive() && skill.getId() != 1324) enableSkill(skill); } if (ssl) sendSkillList(); sendPacket(new SkillCoolTime(this)); } Valor da ADD/RESTORE skills save /** The Constant ADD_SKILL_SAVE. */ // private static final String ADD_SKILL_SAVE = "INSERT INTO character_skills_save (char_obj_id,skill_id,skill_level,effect_count,effect_cur_time,reuse_delay,restore_type,class_index,buff_index) VALUES (?,?,?,?,?,?,?,?,?)"; private static final String ADD_SKILL_SAVE = "INSERT INTO character_skills_save (char_obj_id,skill_id,skill_level,effect_count,effect_cur_time,reuse_delay,systime,restore_type,class_index,buff_index) VALUES (?,?,?,?,?,?,?,?,?,?)"; /** The Constant RESTORE_SKILL_SAVE. */ private static final String RESTORE_SKILL_SAVE = "SELECT skill_id,skill_level,effect_count,effect_cur_time, reuse_delay, systime FROM character_skills_save WHERE char_obj_id=? AND class_index=? AND restore_type=? ORDER BY buff_index ASC"; Acho que são esses os responsaveis.
  9. Sim. O mais estranho é que esse bug não estão em todas as skills.
  10. Altere essa linha na sua config "AntharasWaitTime = 30" O numero é representado em minutos assim que vc entrou na caverna com a quest, mude para 5 pra focar mais rápido.
  11. Aparentemente esta correta. Só o shield esta dando esse error? Verifique se a sql esta registrada em seu banco de dados.
  12. Amigo, valakas/frintezza e antharas são diferentes. Eles só logam depois de um determinado tempo (que esta configurado em seu boss.properties ) quando você entra com o item da quest. No caso do zaken se ele estiver vivo e você não esteja vendo ele, talvez ele esteja bugado, use o comando do seu admin e teleporte para as coodernadas que esta presente na grandboss_data, o id do zaken é 29022. Já aconteceu comigo dele estar no teto da montanha. Caso ele esteja bugado no barco em algum lugar, as coodernadas originais dele são (x=55312/y=219168/z=-3224) basta você adiciona-las.
  13. Grandboss_data DROP TABLE IF EXISTS `grandboss_data`; CREATE TABLE `grandboss_data` ( `boss_id` int(11) NOT NULL DEFAULT '0', `loc_x` int(11) NOT NULL DEFAULT '0', `loc_y` int(11) NOT NULL DEFAULT '0', `loc_z` int(11) NOT NULL DEFAULT '0', `heading` int(11) NOT NULL DEFAULT '0', `respawn_time` bigint(20) NOT NULL DEFAULT '0', `currentHP` decimal(8,0) DEFAULT NULL, `currentMP` decimal(8,0) DEFAULT NULL, `status` tinyint(4) NOT NULL DEFAULT '0', PRIMARY KEY (`boss_id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- ---------------------------- -- Records of grandboss_data -- ---------------------------- INSERT INTO `grandboss_data` VALUES ('29001', '-21610', '181594', '-5720', '0', '0', '919592', '866', '0'); INSERT INTO `grandboss_data` VALUES ('29006', '17726', '108915', '-6472', '0', '0', '487683', '1725', '0'); INSERT INTO `grandboss_data` VALUES ('29014', '55024', '17368', '-5512', '0', '0', '385550', '1859', '0'); INSERT INTO `grandboss_data` VALUES ('29019', '185708', '114298', '-8221', '32768', '0', '13090000', '22197', '0'); INSERT INTO `grandboss_data` VALUES ('29020', '115213', '16623', '10080', '41740', '0', '790857', '3347', '0'); INSERT INTO `grandboss_data` VALUES ('29022', '55312', '219168', '-3224', '0', '0', '721444', '2203', '0'); INSERT INTO `grandboss_data` VALUES ('29028', '213004', '-114890', '-1595', '0', '0', '16660000', '22197', '0'); INSERT INTO `grandboss_data` VALUES ('29045', '0', '0', '0', '0', '0', '790857', '1859', '0'); INSERT INTO `grandboss_data` VALUES ('29046', '0', '0', '0', '0', '0', '63', '44', '0'); INSERT INTO `grandboss_data` VALUES ('29047', '0', '0', '0', '0', '0', '350000', '85', '0'); INSERT INTO `grandboss_data` VALUES ('29054', '0', '0', '0', '0', '0', '300000', '2000', '0'); INSERT INTO `grandboss_data` VALUES ('29062', '0', '0', '0', '0', '0', null, null, '1'); INSERT INTO `grandboss_data` VALUES ('29066', '185708', '114298', '-8221', '32768', '0', '11186000', '1998000', '0'); INSERT INTO `grandboss_data` VALUES ('29067', '185708', '114298', '-8221', '32768', '0', '14518000', '1998000', '0'); INSERT INTO `grandboss_data` VALUES ('29068', '185708', '114298', '-8221', '32768', '0', '17850000', '1998000', '0'); raidboss_spawnlist DROP TABLE IF EXISTS `raidboss_spawnlist`; CREATE TABLE `raidboss_spawnlist` ( `boss_id` int(11) NOT NULL DEFAULT '0', `amount` int(11) NOT NULL DEFAULT '0', `loc_x` int(11) NOT NULL DEFAULT '0', `loc_y` int(11) NOT NULL DEFAULT '0', `loc_z` int(11) NOT NULL DEFAULT '0', `heading` int(11) NOT NULL DEFAULT '0', `respawn_min_delay` int(11) NOT NULL DEFAULT '43200', `respawn_max_delay` int(11) NOT NULL DEFAULT '129600', `respawn_time` bigint(20) NOT NULL DEFAULT '0', `currentHp` decimal(8,0) DEFAULT NULL, `currentMp` decimal(8,0) DEFAULT NULL, PRIMARY KEY (`boss_id`,`loc_x`,`loc_y`,`loc_z`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- ---------------------------- -- Records of raidboss_spawnlist -- ---------------------------- INSERT INTO `raidboss_spawnlist` VALUES ('25001', '1', '-54416', '146480', '-2887', '0', '43200', '129600', '0', '95986', '545'); INSERT INTO `raidboss_spawnlist` VALUES ('25004', '1', '-94208', '100240', '-3520', '0', '43200', '129600', '0', '168366', '763'); INSERT INTO `raidboss_spawnlist` VALUES ('25007', '1', '124240', '75376', '-2800', '0', '43200', '129600', '0', '331522', '1062'); INSERT INTO `raidboss_spawnlist` VALUES ('25010', '1', '113920', '52960', '-3735', '0', '43200', '129600', '0', '624464', '2039'); INSERT INTO `raidboss_spawnlist` VALUES ('25013', '1', '169744', '11920', '-2732', '0', '43200', '129600', '0', '507285', '1722'); INSERT INTO `raidboss_spawnlist` VALUES ('25016', '1', '76787', '245775', '-10376', '0', '43200', '129600', '0', '188376', '2368'); INSERT INTO `raidboss_spawnlist` VALUES ('25019', '1', '7376', '169376', '-3600', '0', '43200', '129600', '0', '206185', '606'); INSERT INTO `raidboss_spawnlist` VALUES ('25020', '1', '90384', '125568', '-2128', '0', '43200', '129600', '0', '156584', '893'); INSERT INTO `raidboss_spawnlist` VALUES ('25023', '1', '27280', '101744', '-3696', '0', '43200', '129600', '0', '208019', '1415'); INSERT INTO `raidboss_spawnlist` VALUES ('25026', '1', '92976', '7920', '-3914', '0', '43200', '129600', '0', '352421', '1660'); INSERT INTO `raidboss_spawnlist` VALUES ('25029', '1', '54941', '206705', '-3728', '0', '43200', '129600', '0', '156190', '1911'); INSERT INTO `raidboss_spawnlist` VALUES ('25032', '1', '88532', '245798', '-10376', '0', '43200', '129600', '0', '229722', '2707'); INSERT INTO `raidboss_spawnlist` VALUES ('25035', '1', '180968', '12035', '-2720', '0', '43200', '129600', '0', '888658', '3058'); INSERT INTO `raidboss_spawnlist` VALUES ('25038', '1', '-57360', '186272', '-4967', '0', '43200', '129600', '0', '116581', '699'); INSERT INTO `raidboss_spawnlist` VALUES ('25041', '1', '10416', '126880', '-3676', '0', '43200', '129600', '0', '165289', '927'); INSERT INTO `raidboss_spawnlist` VALUES ('25044', '1', '107792', '27728', '-3488', '0', '43200', '129600', '0', '319791', '1296'); INSERT INTO `raidboss_spawnlist` VALUES ('25047', '1', '116352', '27648', '-3319', '0', '43200', '129600', '0', '352421', '1660'); INSERT INTO `raidboss_spawnlist` VALUES ('25050', '1', '125520', '27216', '-3632', '0', '43200', '129600', '0', '771340', '2039'); INSERT INTO `raidboss_spawnlist` VALUES ('25051', '1', '117760', '-9072', '-3264', '0', '43200', '129600', '0', '818959', '2707'); INSERT INTO `raidboss_spawnlist` VALUES ('25054', '1', '113432', '16403', '3960', '0', '43200', '129600', '0', '397437', '1372'); INSERT INTO `raidboss_spawnlist` VALUES ('25057', '1', '107056', '168176', '-3456', '0', '43200', '129600', '0', '288415', '2235'); INSERT INTO `raidboss_spawnlist` VALUES ('25060', '1', '-60428', '188264', '-4512', '0', '43200', '129600', '0', '99367', '575'); INSERT INTO `raidboss_spawnlist` VALUES ('25063', '1', '-91024', '116304', '-3466', '0', '43200', '129600', '0', '330579', '927'); INSERT INTO `raidboss_spawnlist` VALUES ('25064', '1', '92528', '84752', '-3703', '0', '43200', '129600', '0', '218810', '1120'); INSERT INTO `raidboss_spawnlist` VALUES ('25067', '1', '94992', '-23168', '-2176', '0', '43200', '129600', '0', '554640', '1598'); INSERT INTO `raidboss_spawnlist` VALUES ('25070', '1', '125600', '50100', '-3600', '0', '43200', '129600', '0', '451391', '2039'); INSERT INTO `raidboss_spawnlist` VALUES ('25073', '1', '143265', '110044', '-3944', '0', '43200', '129600', '0', '875948', '2987'); INSERT INTO `raidboss_spawnlist` VALUES ('25076', '1', '-60976', '127552', '-2960', '0', '43200', '129600', '0', '103092', '606'); INSERT INTO `raidboss_spawnlist` VALUES ('25079', '1', '53712', '102656', '-1072', '0', '43200', '129600', '0', '168366', '763'); INSERT INTO `raidboss_spawnlist` VALUES ('25082', '1', '88512', '140576', '-3483', '0', '43200', '129600', '0', '206753', '1062'); INSERT INTO `raidboss_spawnlist` VALUES ('25085', '1', '66944', '67504', '-3704', '0', '43200', '129600', '0', '371721', '1355'); INSERT INTO `raidboss_spawnlist` VALUES ('25088', '1', '90848', '16368', '-5296', '0', '43200', '129600', '0', '702418', '2039'); INSERT INTO `raidboss_spawnlist` VALUES ('25089', '1', '165424', '93776', '-2992', '0', '43200', '129600', '0', '512194', '2301'); INSERT INTO `raidboss_spawnlist` VALUES ('25092', '1', '116151', '16227', '1944', '0', '43200', '129600', '0', '888658', '3058'); INSERT INTO `raidboss_spawnlist` VALUES ('25095', '1', '-37856', '198128', '-2672', '0', '43200', '129600', '0', '121941', '731'); INSERT INTO `raidboss_spawnlist` VALUES ('25098', '1', '-5937', '175004', '-2940', '59144', '43200', '129600', '0', '330579', '927'); INSERT INTO `raidboss_spawnlist` VALUES ('25098', '1', '123536', '133504', '-3584', '0', '43200', '129600', '0', '330579', '927'); INSERT INTO `raidboss_spawnlist` VALUES ('25099', '1', '64048', '16048', '-3536', '0', '43200', '129600', '0', '273375', '1355'); INSERT INTO `raidboss_spawnlist` VALUES ('25102', '1', '113840', '84256', '-2480', '0', '43200', '129600', '0', '576831', '1722'); INSERT INTO `raidboss_spawnlist` VALUES ('25103', '1', '135872', '94592', '-3735', '0', '43200', '129600', '0', '451391', '2039'); INSERT INTO `raidboss_spawnlist` VALUES ('25106', '1', '173880', '-11412', '-2880', '0', '43200', '129600', '0', '526218', '2570'); INSERT INTO `raidboss_spawnlist` VALUES ('25109', '1', '152660', '110387', '-5520', '0', '43200', '129600', '0', '935092', '3347'); INSERT INTO `raidboss_spawnlist` VALUES ('25112', '1', '116128', '139392', '-3640', '0', '43200', '129600', '0', '127782', '763'); INSERT INTO `raidboss_spawnlist` VALUES ('25115', '1', '94000', '197500', '-3300', '0', '43200', '129600', '0', '294846', '1120'); INSERT INTO `raidboss_spawnlist` VALUES ('25118', '1', '50896', '146576', '-3645', '0', '43200', '129600', '0', '330579', '1415'); INSERT INTO `raidboss_spawnlist` VALUES ('25119', '1', '121872', '64032', '-3536', '0', '43200', '129600', '0', '507285', '1722'); INSERT INTO `raidboss_spawnlist` VALUES ('25122', '1', '86300', '-8200', '-3000', '0', '43200', '129600', '0', '467209', '2235'); INSERT INTO `raidboss_spawnlist` VALUES ('25125', '1', '170656', '85184', '-2000', '0', '43200', '129600', '0', '1637918', '2707'); INSERT INTO `raidboss_spawnlist` VALUES ('25126', '1', '116263', '15916', '6992', '0', '43200', '129600', '0', '829807', '1493'); INSERT INTO `raidboss_spawnlist` VALUES ('25127', '1', '-47552', '219232', '-2413', '0', '43200', '129600', '0', '198734', '763'); INSERT INTO `raidboss_spawnlist` VALUES ('25128', '1', '17696', '179056', '-3520', '0', '43200', '129600', '0', '148507', '860'); INSERT INTO `raidboss_spawnlist` VALUES ('25131', '1', '75488', '-9360', '-2720', '0', '43200', '129600', '0', '369009', '1415'); INSERT INTO `raidboss_spawnlist` VALUES ('25134', '1', '87536', '75872', '-3591', '0', '43200', '129600', '0', '218810', '1722'); INSERT INTO `raidboss_spawnlist` VALUES ('25137', '1', '125280', '102576', '-3305', '0', '43200', '129600', '0', '451391', '2039'); INSERT INTO `raidboss_spawnlist` VALUES ('25140', '1', '191975', '56959', '-7616', '0', '43200', '129600', '0', '818959', '2707'); INSERT INTO `raidboss_spawnlist` VALUES ('25143', '1', '113102', '16002', '6992', '0', '43200', '129600', '0', '977229', '3718'); INSERT INTO `raidboss_spawnlist` VALUES ('25146', '1', '-13056', '215680', '-3760', '0', '43200', '129600', '0', '90169', '485'); INSERT INTO `raidboss_spawnlist` VALUES ('25149', '1', '-12656', '138176', '-3584', '0', '43200', '129600', '0', '103092', '606'); INSERT INTO `raidboss_spawnlist` VALUES ('25152', '1', '43872', '123968', '-2928', '0', '43200', '129600', '0', '165289', '927'); INSERT INTO `raidboss_spawnlist` VALUES ('25155', '1', '73520', '66912', '-3728', '0', '43200', '129600', '0', '294846', '1120'); INSERT INTO `raidboss_spawnlist` VALUES ('25158', '1', '77104', '5408', '-3088', '0', '43200', '129600', '0', '920790', '1722'); INSERT INTO `raidboss_spawnlist` VALUES ('25159', '1', '124984', '43200', '-3625', '0', '43200', '129600', '0', '435256', '1975'); INSERT INTO `raidboss_spawnlist` VALUES ('25162', '1', '194107', '53884', '-4368', '0', '43200', '129600', '0', '1461912', '2368'); INSERT INTO `raidboss_spawnlist` VALUES ('25163', '1', '130500', '59098', '3584', '0', '43200', '129600', '0', '888658', '3058'); INSERT INTO `raidboss_spawnlist` VALUES ('25166', '1', '-21800', '152000', '-2900', '0', '43200', '129600', '0', '134813', '606'); INSERT INTO `raidboss_spawnlist` VALUES ('25169', '1', '-54464', '170288', '-3136', '0', '43200', '129600', '0', '336732', '763'); INSERT INTO `raidboss_spawnlist` VALUES ('25170', '1', '26064', '121808', '-3738', '0', '43200', '129600', '0', '195371', '1028'); INSERT INTO `raidboss_spawnlist` VALUES ('25173', '1', '75968', '110784', '-2512', '0', '43200', '129600', '0', '288415', '1415'); INSERT INTO `raidboss_spawnlist` VALUES ('25176', '1', '92544', '115232', '-3200', '0', '43200', '129600', '0', '451391', '2039'); INSERT INTO `raidboss_spawnlist` VALUES ('25179', '1', '181814', '52379', '-4344', '0', '43200', '129600', '0', '526218', '2368'); INSERT INTO `raidboss_spawnlist` VALUES ('25182', '1', '41966', '215417', '-3728', '0', '43200', '129600', '0', '512194', '2707'); INSERT INTO `raidboss_spawnlist` VALUES ('25185', '1', '88123', '166312', '-3412', '0', '43200', '129600', '0', '165289', '927'); INSERT INTO `raidboss_spawnlist` VALUES ('25188', '1', '88256', '176208', '-3488', '0', '43200', '129600', '0', '255564', '763'); INSERT INTO `raidboss_spawnlist` VALUES ('25189', '1', '68832', '203024', '-3547', '0', '43200', '129600', '0', '156584', '893'); INSERT INTO `raidboss_spawnlist` VALUES ('25192', '1', '125920', '190208', '-3291', '0', '43200', '129600', '0', '258849', '1296'); INSERT INTO `raidboss_spawnlist` VALUES ('25198', '1', '102656', '157424', '-3735', '0', '43200', '129600', '0', '1777317', '2639'); INSERT INTO `raidboss_spawnlist` VALUES ('25199', '1', '108096', '157408', '-3688', '0', '43200', '129600', '0', '912634', '2707'); INSERT INTO `raidboss_spawnlist` VALUES ('25202', '1', '119760', '157392', '-3744', '0', '43200', '129600', '0', '935092', '2777'); INSERT INTO `raidboss_spawnlist` VALUES ('25205', '1', '123808', '153408', '-3671', '0', '43200', '129600', '0', '956490', '3274'); INSERT INTO `raidboss_spawnlist` VALUES ('25208', '1', '73776', '201552', '-3760', '0', '43200', '129600', '0', '218810', '1722'); INSERT INTO `raidboss_spawnlist` VALUES ('25211', '1', '76352', '193216', '-3648', '0', '43200', '129600', '0', '174646', '1975'); INSERT INTO `raidboss_spawnlist` VALUES ('25214', '1', '112112', '209936', '-3616', '0', '43200', '129600', '0', '218810', '2368'); INSERT INTO `raidboss_spawnlist` VALUES ('25217', '1', '89904', '105712', '-3292', '0', '43200', '129600', '0', '369009', '1722'); INSERT INTO `raidboss_spawnlist` VALUES ('25220', '1', '113551', '17083', '-2120', '0', '43200', '129600', '0', '388245', '1312'); INSERT INTO `raidboss_spawnlist` VALUES ('25223', '1', '43152', '152352', '-2848', '0', '43200', '129600', '0', '165289', '1237'); INSERT INTO `raidboss_spawnlist` VALUES ('25226', '1', '104240', '-3664', '-3392', '0', '43200', '129600', '0', '768537', '2502'); INSERT INTO `raidboss_spawnlist` VALUES ('25229', '1', '137568', '-19488', '-3552', '0', '43200', '129600', '0', '1891801', '3420'); INSERT INTO `raidboss_spawnlist` VALUES ('25230', '1', '66672', '46704', '-3920', '0', '43200', '129600', '0', '482650', '2169'); INSERT INTO `raidboss_spawnlist` VALUES ('25233', '1', '185800', '-26500', '-2000', '0', '43200', '129600', '0', '1256671', '3643'); INSERT INTO `raidboss_spawnlist` VALUES ('25234', '1', '120080', '111248', '-3047', '0', '43200', '129600', '0', '1052436', '2707'); INSERT INTO `raidboss_spawnlist` VALUES ('25235', '1', '116400', '-62528', '-3264', '0', '43200', '129600', '0', '912634', '3202'); INSERT INTO `raidboss_spawnlist` VALUES ('25238', '1', '155000', '85400', '-3200', '0', '43200', '129600', '0', '512194', '2846'); INSERT INTO `raidboss_spawnlist` VALUES ('25241', '1', '165984', '88048', '-2384', '0', '43200', '129600', '0', '624464', '2639'); INSERT INTO `raidboss_spawnlist` VALUES ('25244', '1', '187360', '45840', '-5856', '0', '43200', '129600', '0', '1891801', '3420'); INSERT INTO `raidboss_spawnlist` VALUES ('25245', '1', '172000', '55000', '-5400', '0', '43200', '129600', '0', '977229', '3643'); INSERT INTO `raidboss_spawnlist` VALUES ('25248', '1', '127903', '-13399', '-3720', '0', '43200', '129600', '0', '1825269', '3274'); INSERT INTO `raidboss_spawnlist` VALUES ('25249', '1', '147104', '-20560', '-3377', '0', '43200', '129600', '0', '945900', '3420'); INSERT INTO `raidboss_spawnlist` VALUES ('25252', '1', '192376', '22087', '-3608', '0', '43200', '129600', '0', '888658', '3058'); INSERT INTO `raidboss_spawnlist` VALUES ('25255', '1', '170048', '-24896', '-3440', '0', '43200', '129600', '0', '1637918', '2707'); INSERT INTO `raidboss_spawnlist` VALUES ('25256', '1', '170320', '42640', '-4832', '0', '43200', '129600', '0', '526218', '2368'); INSERT INTO `raidboss_spawnlist` VALUES ('25259', '1', '42050', '208107', '-3752', '0', '43200', '129600', '0', '1248928', '2039'); INSERT INTO `raidboss_spawnlist` VALUES ('25260', '1', '93120', '19440', '-3607', '0', '43200', '129600', '0', '392985', '1722'); INSERT INTO `raidboss_spawnlist` VALUES ('25263', '1', '144400', '-28192', '-1920', '0', '43200', '129600', '0', '848789', '2846'); INSERT INTO `raidboss_spawnlist` VALUES ('25266', '1', '188983', '13647', '-2672', '0', '43200', '129600', '0', '945900', '3420'); INSERT INTO `raidboss_spawnlist` VALUES ('25269', '1', '123504', '-23696', '-3481', '0', '43200', '129600', '0', '888658', '3058'); INSERT INTO `raidboss_spawnlist` VALUES ('25272', '1', '49248', '127792', '-3552', '0', '43200', '129600', '0', '233163', '1415'); INSERT INTO `raidboss_spawnlist` VALUES ('25276', '1', '154088', '-14116', '-3736', '0', '43200', '129600', '0', '1891801', '3420'); INSERT INTO `raidboss_spawnlist` VALUES ('25277', '1', '54651', '180269', '-4976', '0', '43200', '129600', '0', '507285', '1722'); INSERT INTO `raidboss_spawnlist` VALUES ('25280', '1', '85622', '88766', '-5120', '0', '43200', '129600', '0', '1248928', '2039'); INSERT INTO `raidboss_spawnlist` VALUES ('25281', '1', '151053', '88124', '-5424', '0', '43200', '129600', '0', '1777317', '3058'); INSERT INTO `raidboss_spawnlist` VALUES ('25282', '1', '179311', '-7632', '-4896', '0', '43200', '129600', '0', '1891801', '3420'); INSERT INTO `raidboss_spawnlist` VALUES ('25293', '1', '134672', '-115600', '-1216', '0', '43200', '129600', '0', '977229', '3718'); INSERT INTO `raidboss_spawnlist` VALUES ('25299', '1', '148160', '-73808', '-4919', '0', '43200', '129600', '0', '300327', '1524'); INSERT INTO `raidboss_spawnlist` VALUES ('25302', '1', '145504', '-81664', '-6016', '0', '43200', '129600', '0', '325022', '1715'); INSERT INTO `raidboss_spawnlist` VALUES ('25305', '1', '145008', '-84992', '-6240', '0', '43200', '129600', '0', '689061', '1866'); INSERT INTO `raidboss_spawnlist` VALUES ('25309', '1', '115552', '-39200', '-2480', '0', '43200', '129600', '0', '300327', '1524'); INSERT INTO `raidboss_spawnlist` VALUES ('25312', '1', '109216', '-36160', '-938', '0', '43200', '129600', '0', '325022', '1715'); INSERT INTO `raidboss_spawnlist` VALUES ('25315', '1', '105584', '-43024', '-1728', '0', '43200', '129600', '0', '689061', '1866'); INSERT INTO `raidboss_spawnlist` VALUES ('25319', '1', '184542', '-106330', '-6304', '0', '43200', '129600', '0', '462603', '1764'); INSERT INTO `raidboss_spawnlist` VALUES ('25322', '1', '93296', '-75104', '-1824', '0', '43200', '129600', '0', '834231', '3718'); INSERT INTO `raidboss_spawnlist` VALUES ('25325', '1', '91008', '-85904', '-2736', '0', '43200', '129600', '0', '888658', '3718'); INSERT INTO `raidboss_spawnlist` VALUES ('25328', '1', '59331', '-42403', '-3003', '0', '7200', '10800', '0', '900867', '3718'); INSERT INTO `raidboss_spawnlist` VALUES ('25352', '1', '-16912', '174912', '-3264', '0', '43200', '129600', '0', '127782', '3718'); INSERT INTO `raidboss_spawnlist` VALUES ('25354', '1', '-16096', '184288', '-3817', '0', '43200', '129600', '0', '165289', '3718'); INSERT INTO `raidboss_spawnlist` VALUES ('25357', '1', '-3456', '112864', '-3456', '0', '43200', '129600', '0', '90169', '3718'); INSERT INTO `raidboss_spawnlist` VALUES ('25360', '1', '29216', '179280', '-3624', '0', '43200', '129600', '0', '107186', '3718'); INSERT INTO `raidboss_spawnlist` VALUES ('25362', '1', '-55920', '186768', '-3336', '0', '43200', '129600', '0', '95986', '3718'); INSERT INTO `raidboss_spawnlist` VALUES ('25365', '1', '-62000', '190256', '-3687', '0', '43200', '129600', '0', '214372', '3718'); INSERT INTO `raidboss_spawnlist` VALUES ('25366', '1', '-62368', '179440', '-3594', '0', '43200', '129600', '0', '95986', '3718'); INSERT INTO `raidboss_spawnlist` VALUES ('25369', '1', '-45616', '111024', '-3808', '0', '43200', '129600', '0', '103092', '3718'); INSERT INTO `raidboss_spawnlist` VALUES ('25372', '1', '48000', '243376', '-6611', '0', '43200', '129600', '0', '175392', '3718'); INSERT INTO `raidboss_spawnlist` VALUES ('25373', '1', '9649', '77467', '-3808', '0', '43200', '129600', '0', '90169', '3718'); INSERT INTO `raidboss_spawnlist` VALUES ('25375', '1', '22500', '80300', '-2772', '0', '43200', '129600', '0', '87696', '3718'); INSERT INTO `raidboss_spawnlist` VALUES ('25378', '1', '-54096', '84288', '-3512', '0', '43200', '129600', '0', '87696', '3718'); INSERT INTO `raidboss_spawnlist` VALUES ('25380', '1', '-47367', '51548', '-5904', '0', '43200', '129600', '0', '90169', '3718'); INSERT INTO `raidboss_spawnlist` VALUES ('25383', '1', '51632', '153920', '-3552', '0', '43200', '129600', '0', '156584', '3718'); INSERT INTO `raidboss_spawnlist` VALUES ('25385', '1', '53600', '143472', '-3872', '0', '43200', '129600', '0', '174646', '3718'); INSERT INTO `raidboss_spawnlist` VALUES ('25388', '1', '40128', '101920', '-1241', '0', '43200', '129600', '0', '165289', '3718'); INSERT INTO `raidboss_spawnlist` VALUES ('25391', '1', '45600', '120592', '-2455', '0', '43200', '129600', '0', '297015', '3718'); INSERT INTO `raidboss_spawnlist` VALUES ('25392', '1', '29928', '107160', '-3708', '0', '43200', '129600', '0', '141034', '3718'); INSERT INTO `raidboss_spawnlist` VALUES ('25394', '1', '101888', '200224', '-3680', '0', '43200', '129600', '0', '390743', '3718'); INSERT INTO `raidboss_spawnlist` VALUES ('25395', '1', '15000', '119000', '-11900', '0', '43200', '129600', '0', '288415', '3718'); INSERT INTO `raidboss_spawnlist` VALUES ('25398', '1', '5000', '189000', '-3728', '0', '43200', '129600', '0', '165289', '3718'); INSERT INTO `raidboss_spawnlist` VALUES ('25401', '1', '117808', '102880', '-3600', '0', '43200', '129600', '0', '141034', '3718'); INSERT INTO `raidboss_spawnlist` VALUES ('25404', '1', '35992', '191312', '-3104', '0', '43200', '129600', '0', '148507', '3718'); INSERT INTO `raidboss_spawnlist` VALUES ('25407', '1', '115072', '112272', '-3018', '0', '43200', '129600', '0', '526218', '3718'); INSERT INTO `raidboss_spawnlist` VALUES ('25410', '1', '72192', '125424', '-3657', '0', '43200', '129600', '0', '218810', '3718'); INSERT INTO `raidboss_spawnlist` VALUES ('25412', '1', '81920', '113136', '-3056', '0', '43200', '129600', '0', '319791', '3718'); INSERT INTO `raidboss_spawnlist` VALUES ('25415', '1', '128352', '138464', '-3467', '0', '43200', '129600', '0', '218810', '3718'); INSERT INTO `raidboss_spawnlist` VALUES ('25418', '1', '62416', '8096', '-3376', '0', '43200', '129600', '0', '273375', '3718'); INSERT INTO `raidboss_spawnlist` VALUES ('25420', '1', '42032', '24128', '-4704', '0', '43200', '129600', '0', '335987', '3718'); INSERT INTO `raidboss_spawnlist` VALUES ('25423', '1', '113600', '47120', '-4640', '0', '43200', '129600', '0', '539706', '3718'); INSERT INTO `raidboss_spawnlist` VALUES ('25426', '1', '-18048', '-101264', '-2112', '0', '43200', '129600', '0', '103092', '3718'); INSERT INTO `raidboss_spawnlist` VALUES ('25429', '1', '172064', '-214752', '-3565', '0', '43200', '129600', '0', '103092', '3718'); INSERT INTO `raidboss_spawnlist` VALUES ('25431', '1', '79648', '18320', '-5232', '0', '43200', '129600', '0', '273375', '3718'); INSERT INTO `raidboss_spawnlist` VALUES ('25434', '1', '104096', '-16896', '-1803', '0', '43200', '129600', '0', '451391', '3718'); INSERT INTO `raidboss_spawnlist` VALUES ('25437', '1', '67296', '64128', '-3723', '0', '43200', '129600', '0', '576831', '3718'); INSERT INTO `raidboss_spawnlist` VALUES ('25438', '1', '107000', '92000', '-2272', '0', '43200', '129600', '0', '273375', '3718'); INSERT INTO `raidboss_spawnlist` VALUES ('25441', '1', '111440', '82912', '-2912', '0', '43200', '129600', '0', '288415', '3718'); INSERT INTO `raidboss_spawnlist` VALUES ('25444', '1', '113232', '17456', '-4384', '0', '43200', '129600', '0', '588136', '3718'); INSERT INTO `raidboss_spawnlist` VALUES ('25447', '1', '113200', '17552', '-1424', '0', '43200', '129600', '0', '645953', '3718'); INSERT INTO `raidboss_spawnlist` VALUES ('25450', '1', '113600', '15104', '9559', '0', '43200', '129600', '0', '987470', '3718'); INSERT INTO `raidboss_spawnlist` VALUES ('25453', '1', '156704', '-6096', '-4185', '0', '43200', '129600', '0', '888658', '3718'); INSERT INTO `raidboss_spawnlist` VALUES ('25456', '1', '133632', '87072', '-3623', '0', '43200', '129600', '0', '352421', '3718'); INSERT INTO `raidboss_spawnlist` VALUES ('25460', '1', '150304', '67776', '-3688', '0', '43200', '129600', '0', '385670', '3718'); INSERT INTO `raidboss_spawnlist` VALUES ('25463', '1', '166288', '68096', '-3264', '0', '43200', '129600', '0', '467209', '3718'); INSERT INTO `raidboss_spawnlist` VALUES ('25467', '1', '186192', '61472', '-4160', '0', '43200', '129600', '0', '576851', '3718'); INSERT INTO `raidboss_spawnlist` VALUES ('25470', '1', '186896', '56276', '-4576', '0', '43200', '129600', '0', '598898', '3718'); INSERT INTO `raidboss_spawnlist` VALUES ('25473', '1', '175712', '29856', '-3776', '0', '43200', '129600', '0', '402319', '3718'); INSERT INTO `raidboss_spawnlist` VALUES ('25475', '1', '183568', '24560', '-3184', '0', '43200', '129600', '0', '451391', '3718'); INSERT INTO `raidboss_spawnlist` VALUES ('25478', '1', '168288', '28368', '-3632', '0', '43200', '129600', '0', '588136', '3718'); INSERT INTO `raidboss_spawnlist` VALUES ('25481', '1', '53517', '205413', '-3728', '0', '43200', '129600', '0', '66938', '3718'); INSERT INTO `raidboss_spawnlist` VALUES ('25484', '1', '43160', '220463', '-3680', '0', '43200', '129600', '0', '369009', '3718'); INSERT INTO `raidboss_spawnlist` VALUES ('25487', '1', '83056', '183232', '-3616', '0', '43200', '129600', '0', '218810', '3718'); INSERT INTO `raidboss_spawnlist` VALUES ('25490', '1', '86528', '216864', '-3584', '0', '43200', '129600', '0', '218810', '3718'); INSERT INTO `raidboss_spawnlist` VALUES ('25493', '1', '83174', '254428', '-10873', '0', '43200', '129600', '0', '451391', '3718'); INSERT INTO `raidboss_spawnlist` VALUES ('25496', '1', '88300', '258000', '-10200', '0', '43200', '129600', '0', '402319', '3718'); INSERT INTO `raidboss_spawnlist` VALUES ('25498', '1', '126624', '174448', '-3056', '0', '43200', '129600', '0', '288415', '3718'); INSERT INTO `raidboss_spawnlist` VALUES ('25514', '1', '79635', '-55434', '-6135', '0', '43200', '129600', '0', '300327', '1524'); INSERT INTO `raidboss_spawnlist` VALUES ('25517', '1', '113000', '-76000', '200', '0', '43200', '129600', '0', '480891', '3718'); INSERT INTO `raidboss_spawnlist` VALUES ('25523', '1', '170000', '-60000', '-3500', '0', '43200', '129600', '0', '776490', '1312'); INSERT INTO `raidboss_spawnlist` VALUES ('25524', '1', '144143', '-5731', '-4722', '0', '43200', '129600', '0', '956490', '3247'); INSERT INTO `raidboss_spawnlist` VALUES ('25527', '1', '3776', '-6768', '-3288', '0', '43200', '129600', '0', '675863', '1851'); INSERT INTO `raidboss_spawnlist` VALUES ('29095', '1', '141569', '-45908', '-2387', '0', '43200', '129600', '0', '2289038', '2746'); Você não citou sua revisão, caso seja frozen, basta salvar como sql e executar.
  14. Amigo, provavelmente o problema esta no seu arquivo itenname.
  15. Sim 2 restarts rapidos, notei o seguinte. Se usar a skill e atualizar a db com o char logado, não aparece que a skill foi salva, não mostra systime, reuse essas coisas, ai quando dou o primeiro restart com o char e atualizo a db, mostra os dados salvos corretamente, systime e tudo. Assim que dou o segundo restart, as informações que foram salvas na db somem. Ai a skill volta do 100%
  16. Muito Obrigado mesmo KhayrusS!!! Me ajudou demais ❤️ Porém fiz algumas alterações nos códigos ficando da seguinte forma: Adicionei a linha final long systime = rset.getLong("systime"); abaixo das linhas final int effectCount = rset.getInt("effect_count"); final int effectCurTime = rset.getInt("effect_cur_time"); final long reuseDelay = rset.getLong("reuse_delay"); Troquei esse parte código if (reuseDelay > 10) { final L2Skill skill = SkillTable.getInstance().getInfo(skillId, skillLvl); if (skill == null) continue; disableSkill(skill, reuseDelay); addTimeStamp(new TimeStamp(skill, reuseDelay)); } por esta final long remainingTime = systime - System.currentTimeMillis(); if (remainingTime > 10) { final L2Skill skill = SkillTable.getInstance().getInfo(skillId, skillLvl); if (skill == null) continue; disableSkill(skill, remainingTime); addTimeStamp(new TimeStamp(skill, reuseDelay, systime)); } E segui a mesma logica para os codigos abaixo. O meu problema era no RestoreEffects, dessa forma se eu usar a skill e ele tiver 50%, se eu tomar dc ou der restart a skill continua carregando normalmente 😄 e quando voltar a skill vai continuar de onde ela estiver. Mas com isso tambem apareceu um novo bug, que nao tinha como saber com a skill voltando do 0 toda vez. Se eu usar uma skill (ex: Heroic) e der 2 restarts seguidos, a skill volta carregada 100%. Pode me ajudar a arrumar isso também?
  17. Chaazy

    PvP e PK

    Amigo, no meu caso que utilizo a frozen fica em functions/pvp.properties. # Anti Farm System AntiFarmEnabled=False Ativar Bloqueio Anti Farm? AntiFarmParty = False - Ativar Bloqueio para Players em Mesma Party ? AntiFarmIP = False - Ativar Bloqueio para Players com o Mesmo IP ? AntiFarmClanAlly = False - Ativar Bloqueio para Players do Mesmo Clan ou Ally? Não conheço a jnet.
  18. Com o cooltime baseado no tempo real, pois assim resolve o problema de logar bom tempo depois e a skill começando do 0. Dessa forma se o player tomar dc e voltar 1 minuto depois, a skill vai continuar seu cooltime normalmente? Exemplo: Tomei dc com heroic 50%, demorei 1 minuto pra logar novamente e o mesmo vai estar 60%.
  19. Chaazy

    Melhor Revisão.

    Amigo você tem que criar uma Variável ambiente com o nome JAVA_HOME com diretório do java que você esta utilizando. Clique com botão direito do mause em "Meu computador" e vá em propriedades. Depois em "Configurações avançadas do sistema" e em seguida "Variáveis de Ambiente" Em "Variáveis de usurário" clique em "Novo" Coloque o nome "JAVA_HOME" e em seguida seleciono o diretório do seu java, no meu caso "C:\PROGRA~2\Java\JDK18~1.0_1\bin"
  20. Poste sua config do Crystal Enchant.
  21. Chaazy

    PvP e PK

    Amigo isso acontece quando você mata o mesmo player 2 vezes seguidas ou do mesmo ip? Se for, pode ser que seja uma proteção que existe no seu servidor para não haver free kill, muito comum em servidores que contem recompensa por pvp.
  22. Código da TimeStamp public static class TimeStamp { public long getStamp() { return stamp; } public L2Skill getSkill() { return skill; } public long getReuse() { return reuse; } public long getRemaining() { return Math.max(stamp - System.currentTimeMillis(), 0L); } protected boolean hasNotPassed() { return System.currentTimeMillis() < stamp; } private final L2Skill skill; private final long reuse; private final long stamp; protected TimeStamp(final L2Skill _skill, final long _reuse) { skill = _skill; reuse = _reuse; stamp = System.currentTimeMillis() + reuse; } protected TimeStamp(final L2Skill _skill, final long _reuse, final long _systime) { skill = _skill; reuse = _reuse; stamp = _systime; } } Valor da Constant ADD_SKILL_SAVE seria isso? /** The Constant ADD_SKILL_SAVE. */ // private static final String ADD_SKILL_SAVE = "INSERT INTO character_skills_save (char_obj_id,skill_id,skill_level,effect_count,effect_cur_time,reuse_delay,restore_type,class_index,buff_index) VALUES (?,?,?,?,?,?,?,?,?)"; private static final String ADD_SKILL_SAVE = "INSERT INTO character_skills_save (char_obj_id,skill_id,skill_level,effect_count,effect_cur_time,reuse_delay,systime,restore_type,class_index,buff_index) VALUES (?,?,?,?,?,?,?,?,?,?)";
  23. @SuppressWarnings("null") private synchronized void storeEffect() { if (!Config.STORE_SKILL_COOLTIME) return; Connection con = null; try { con = L2DatabaseFactory.getInstance().getConnection(false); PreparedStatement statement; // Delete all current stored effects for char to avoid dupe statement = con.prepareStatement(DELETE_SKILL_SAVE); statement.setInt(1, getObjectId()); statement.setInt(2, getClassIndex()); statement.execute(); DatabaseUtils.close(statement); // Store all effect data along with calulated remaining // reuse delays for matching skills. 'restore_type'= 0. final L2Effect[] effects = getAllEffects(); statement = con.prepareStatement(ADD_SKILL_SAVE); final List<Integer> storedSkills = new FastList<>(); int buff_index = 0; for (final L2Effect effect : effects) { final int skillId = effect.getSkill().getId(); if (storedSkills.contains(skillId)) continue; storedSkills.add(skillId); if (effect != null && effect.getInUse() && !effect.getSkill().isToggle() && !effect.getStackType().equals("BattleForce") && !effect.getStackType().equals("SpellForce") && effect.getSkill().getSkillType() != SkillType.FORCE_BUFF) { statement.setInt(1, getObjectId()); statement.setInt(2, skillId); statement.setInt(3, effect.getSkill().getLevel()); statement.setInt(4, effect.getCount()); statement.setInt(5, effect.getTime()); if (ReuseTimeStamps.containsKey(effect.getSkill().getReuseHashCode())) { final TimeStamp t = ReuseTimeStamps.get(effect.getSkill().getReuseHashCode()); statement.setLong(6, t.hasNotPassed() ? t.getReuse() : 0); statement.setLong(7, t.hasNotPassed() ? t.getStamp() : 0); } else { statement.setLong(6, 0); statement.setLong(7, 0); } statement.setInt(8, 0); statement.setInt(9, getClassIndex()); statement.setInt(10, ++buff_index); statement.execute(); } } // Store the reuse delays of remaining skills which // lost effect but still under reuse delay. 'restore_type' 1. for (final TimeStamp t : ReuseTimeStamps.values()) { if (t.hasNotPassed()) { final int skillId = t.getSkill().getId(); final int skillLvl = t.getSkill().getLevel(); if (storedSkills.contains(skillId)) continue; storedSkills.add(skillId); statement.setInt(1, getObjectId()); statement.setInt(2, skillId); statement.setInt(3, skillLvl); statement.setInt(4, -1); statement.setInt(5, -1); statement.setLong(6, t.getReuse()); statement.setLong(7, t.getStamp()); statement.setInt(8, 1); statement.setInt(9, getClassIndex()); statement.setInt(10, ++buff_index); statement.execute(); } } DatabaseUtils.close(statement); } catch (final Exception e) { LOGGER.warn("Could not store char effect data: "); e.printStackTrace(); } finally { CloseUtil.close(con); } } Seria isso?
×
×
  • Create New...