Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: config/functions/l2jfrozen.properties
- ===================================================================
- --- config/functions/l2jfrozen.properties (revision 936)
- +++ config/functions/l2jfrozen.properties (working copy)
- @@ -280,4 +280,9 @@
- ProtectorSkillLevel = 13
- ProtectorSkillTime = 600
- # Npc Protector Message
- -ProtectorMessage = Hey You!, Never Kill On This Area, Go Read The Rules!
- \ No newline at end of file
- +ProtectorMessage = Hey You!, Never Kill On This Area, Go Read The Rules!
- +
- +# Lista dos Bosses que dao status hero ao player que der o ultimo hit.
- +HeroBossList = 29001,29019,29020,29022,29028
- +# Tempo de status hero que o player ira ganhar.
- +HeroBossDays = 1
- Index: head-src/com/l2jfrozen/gameserver/model/actor/instance/L2RaidBossInstance.java
- ===================================================================
- --- head-src/com/l2jfrozen/gameserver/model/actor/instance/L2RaidBossInstance.java (revision 936)
- +++ head-src/com/l2jfrozen/gameserver/model/actor/instance/L2RaidBossInstance.java (working copy)
- @@ -25,6 +25,7 @@
- import com.l2jfrozen.gameserver.model.L2Summon;
- import com.l2jfrozen.gameserver.model.spawn.L2Spawn;
- import com.l2jfrozen.gameserver.network.SystemMessageId;
- +import com.l2jfrozen.gameserver.network.serverpackets.SocialAction;
- import com.l2jfrozen.gameserver.network.serverpackets.SystemMessage;
- import com.l2jfrozen.gameserver.templates.L2NpcTemplate;
- import com.l2jfrozen.gameserver.thread.ThreadPoolManager;
- @@ -99,6 +100,16 @@
- if(player != null)
- {
- + if (Config.RH_HERO_BOSS_LIST.contains(getNpcId()) && !player.isHero())
- + {
- + player.broadcastPacket(new SocialAction(player.getObjectId(), 16));
- + player.setIsHero(true);
- + player.setHeroEndTime(Config.RH_HERO_BOSS_DAYS * 24L * 60L * 60L * 1000L);
- + player.sendMessage("You Are Now a Hero! You Are Granted With Hero Status, Skills, Aura.");
- + player.broadcastUserInfo();
- + player.getInventory().addItem("Wings of Destiny", 6842, 1, player, null);
- + }
- +
- SystemMessage msg = new SystemMessage(SystemMessageId.RAID_WAS_SUCCESSFUL);
- broadcastPacket(msg);
- msg = null;
- Index: head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java
- ===================================================================
- --- head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java (revision 936)
- +++ head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java (working copy)
- @@ -14035,6 +14035,38 @@
- sendSkillList();
- }
- + public void setHeroEndTime(long heroTime)
- + {
- + Connection con = null;
- + try
- + {
- + con = L2DatabaseFactory.getInstance().getConnection(false);
- + PreparedStatement stmt = con.prepareStatement("REPLACE INTO characters_custom_data (obj_Id, char_name, hero, noble, donator, hero_end_date) VALUES (?,?,?,?,?,?)");
- +
- + stmt.setInt(1, getObjectId());
- + stmt.setString(2, getName());
- + stmt.setInt(3, 1);
- + stmt.setInt(4, isNoble() ? 1 : 0);
- + stmt.setInt(5, isDonator() ? 1 : 0);
- + stmt.setLong(6, heroTime == 0 ? 0 : System.currentTimeMillis() + heroTime);
- + stmt.execute();
- + stmt.close();
- + stmt = null;
- + }
- + catch(Exception e)
- + {
- + if(Config.ENABLE_ALL_EXCEPTIONS)
- + e.printStackTrace();
- +
- + _log.log(Level.SEVERE, "Error: could not update database: ", e);
- + }
- + finally
- + {
- + CloseUtil.close(con);
- + con = null;
- + }
- + }
- +
- /**
- * Sets the donator.
- *
- Index: head-src/com/l2jfrozen/gameserver/model/actor/instance/L2GrandBossInstance.java
- ===================================================================
- --- head-src/com/l2jfrozen/gameserver/model/actor/instance/L2GrandBossInstance.java (revision 936)
- +++ head-src/com/l2jfrozen/gameserver/model/actor/instance/L2GrandBossInstance.java (working copy)
- @@ -21,6 +21,7 @@
- import com.l2jfrozen.gameserver.model.L2Summon;
- import com.l2jfrozen.gameserver.model.spawn.L2Spawn;
- import com.l2jfrozen.gameserver.network.SystemMessageId;
- +import com.l2jfrozen.gameserver.network.serverpackets.SocialAction;
- import com.l2jfrozen.gameserver.network.serverpackets.SystemMessage;
- import com.l2jfrozen.gameserver.templates.L2NpcTemplate;
- import com.l2jfrozen.gameserver.thread.ThreadPoolManager;
- @@ -67,6 +68,16 @@
- if(player != null)
- {
- + if (Config.RH_HERO_BOSS_LIST.contains(getNpcId()) && !player.isHero())
- + {
- + player.broadcastPacket(new SocialAction(player.getObjectId(), 16));
- + player.setIsHero(true);
- + player.setHeroEndTime(Config.RH_HERO_BOSS_DAYS * 24L * 60L * 60L * 1000L);
- + player.sendMessage("You Are Now a Hero! You Are Granted With Hero Status, Skills, Aura.");
- + player.broadcastUserInfo();
- + player.getInventory().addItem("Wings of Destiny", 6842, 1, player, null);
- + }
- +
- SystemMessage msg = new SystemMessage(SystemMessageId.RAID_WAS_SUCCESSFUL);
- broadcastPacket(msg);
- msg = null;
- Index: head-src/com/l2jfrozen/Config.java
- ===================================================================
- --- head-src/com/l2jfrozen/Config.java (revision 936)
- +++ head-src/com/l2jfrozen/Config.java (working copy)
- @@ -2379,6 +2379,10 @@
- public static String PVP1_CUSTOM_MESSAGE;
- public static String PVP2_CUSTOM_MESSAGE;
- + public static String RH_HERO_BOSS_ID;
- + public static List<Integer> RH_HERO_BOSS_LIST = new FastList<Integer>();
- + public static int RH_HERO_BOSS_DAYS;
- +
- //============================================================
- public static void loadL2JFrozenConfig()
- {
- @@ -2391,6 +2395,11 @@
- L2JFrozenSettings.load(is);
- is.close();
- + RH_HERO_BOSS_ID = L2JFrozenSettings.getProperty("HeroBossList", "0");
- + for(String bossId : RH_HERO_BOSS_ID.split(","))
- + RH_HERO_BOSS_LIST.add(Integer.parseInt(bossId));
- + RH_HERO_BOSS_DAYS = Integer.parseInt(L2JFrozenSettings.getProperty("HeroBossDays", "1"));
- +
- /** Custom Tables **/
- CUSTOM_SPAWNLIST_TABLE = Boolean.valueOf(L2JFrozenSettings.getProperty("CustomSpawnlistTable", "True"));
- SAVE_GMSPAWN_ON_CUSTOM = Boolean.valueOf(L2JFrozenSettings.getProperty("SaveGmSpawnOnCustom", "True"));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement