Exemplo n.º 1
0
 private boolean isInSiege(L2Npc npc) {
   if ((npc.getConquerableHall() != null) && npc.getConquerableHall().isInSiege()) {
     return true;
   } else if (npc.getCastle().getSiege().isInProgress()) {
     return true;
   }
   return false;
 }
Exemplo n.º 2
0
 @Override
 public String onFirstTalk(L2Npc npc, L2PcInstance player) {
   String htmltext = null;
   if (player.isClanLeader() && (player.getClanId() == npc.getCastle().getOwnerId())) {
     if (isInSiege(npc)) {
       htmltext = "CastleSiegeManager.html";
     } else {
       htmltext = "CastleSiegeManager-01.html";
     }
   } else if (isInSiege(npc)) {
     htmltext = "CastleSiegeManager-02.html";
   } else {
     if (npc.getConquerableHall() != null) {
       npc.getConquerableHall().showSiegeInfo(player);
     } else {
       npc.getCastle().getSiege().listRegisterClan(player);
     }
   }
   return htmltext;
 }