Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * This program is free software: you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation, either version 3 of the License, or (at your option) any later
- * version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- * details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program. If not, see <http://www.gnu.org/licenses/>.
- */
- package net.sf.l2j.gameserver.model.actor.instance;
- import net.sf.l2j.gameserver.datatables.NpcTable;
- import net.sf.l2j.gameserver.instancemanager.GrandBossManager;
- import net.sf.l2j.gameserver.instancemanager.RaidBossSpawnManager;
- import net.sf.l2j.gameserver.instancemanager.RaidBossSpawnManager.StatusEnum;
- import net.sf.l2j.gameserver.model.actor.template.NpcTemplate;
- import net.sf.l2j.gameserver.network.serverpackets.NpcHtmlMessage;
- /**
- * @author Devlin
- *
- */
- public class L2BossStatusManagerInstance extends L2NpcInstance
- {
- public L2BossStatusManagerInstance(int objectId, NpcTemplate template)
- {
- super(objectId, template);
- }
- @Override
- public void showChatWindow(L2PcInstance player, int val)
- {
- NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
- StringBuilder sb = new StringBuilder("");
- sb.append("<html><body>");
- sb.append("<center>");
- sb.append("<img src=\"l2ui_ch3.herotower_deco\" width=256 height=32 align=center>");
- sb.append("<br>");
- sb.append("</center>");
- sb.append("<center>");
- int[] grandBosses = { 2142, 12412, 412412 };
- for (int grandBoss : grandBosses)
- {
- long delay = GrandBossManager.getInstance().getStatsSet(grandBoss).getLong("respawn_time");
- if (delay <= System.currentTimeMillis())
- sb.append(NpcTable.getInstance().getTemplate(grandBoss).getName()+" <font color=\"00FF00\">is alive!</font><br1>");
- else
- sb.append(NpcTable.getInstance().getTemplate(grandBoss).getName()+" <font color=\"0000FF\">is dead!</font><br1>");
- }
- int raidBossId1 = 25299;
- if (RaidBossSpawnManager.getInstance().getRaidBossStatusId(raidBossId1) == StatusEnum.ALIVE)
- sb.append(NpcTable.getInstance().getTemplate(raidBossId1).getName()+" <font color=\"00FF00\">is alive!</font><br1>");
- else
- sb.append(NpcTable.getInstance().getTemplate(raidBossId1).getName()+" <font color=\"0000FF\">is dead!</font><br1>");
- int raidBossId2 = 25309;
- if (RaidBossSpawnManager.getInstance().getRaidBossStatusId(raidBossId2) == StatusEnum.ALIVE)
- sb.append(NpcTable.getInstance().getTemplate(raidBossId2).getName()+" <font color=\"00FF00\">is alive!</font><br1>");
- else
- sb.append(NpcTable.getInstance().getTemplate(raidBossId2).getName()+" <font color=\"0000FF\">is dead!</font><br1>");
- sb.append("<br>");
- sb.append("<img src=\"l2ui_ch3.herotower_deco\" width=256 height=32 align=center>");
- sb.append("<br>");
- sb.append("Powered by <font color=\"CD853F\">L2Quintus</font>");
- sb.append("</center>");
- sb.append("</body></html>");
- html.setHtml(sb.toString());
- player.sendPacket(html);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement