@Override
 protected void handleDied() {
   cancelPhaseTask();
   if (getNpcId() == 217309) {
     sendMsg(1500390);
     spawn(217310, 238.160f, 598.624f, 178.480f, (byte) 0);
     deleteHelpers();
     AI2Actions.deleteOwner(this);
   } else {
     sendMsg(1500391);
     final WorldMapInstance instance = getPosition().getWorldMapInstance();
     if (instance != null) {
       final Npc ariana = instance.getNpc(799668);
       if (ariana != null) {
         ariana.getEffectController().removeEffect(19921);
         ThreadPoolManager.getInstance()
             .schedule(
                 new Runnable() {
                   @Override
                   public void run() {
                     ariana.getSpawn().setWalkerId("30028000016");
                     WalkManager.startWalking((NpcAI2) ariana.getAi2());
                   }
                 },
                 1000);
         NpcShoutsService.getInstance().sendMsg(ariana, 1500415, ariana.getObjectId(), 0, 4000);
         NpcShoutsService.getInstance().sendMsg(ariana, 1500416, ariana.getObjectId(), 0, 13000);
         ThreadPoolManager.getInstance()
             .schedule(
                 new Runnable() {
                   @Override
                   public void run() {
                     if (instance != null) {
                       SkillEngine.getInstance()
                           .getSkill(ariana, 19358, 60, ariana)
                           .useNoAnimationSkill();
                       instance.getDoors().get(145).setOpen(true);
                       deleteNpcs(instance.getNpcs(701156));
                       ThreadPoolManager.getInstance()
                           .schedule(
                               new Runnable() {
                                 @Override
                                 public void run() {
                                   if (ariana != null && !NpcActions.isAlreadyDead(ariana)) {
                                     NpcActions.delete(ariana);
                                   }
                                 }
                               },
                               13000);
                     }
                   }
                 },
                 13000);
       }
     }
   }
   super.handleDied();
 }
 @Override
 protected void handleUseItemFinish(Player player) {
   switch (getNpcId()) {
     case 730770:
       player.getLifeStats().increaseHp(SM_ATTACK_STATUS.TYPE.HP, 5000);
       AI2Actions.deleteOwner(this);
       break;
   }
 }
Esempio n. 3
0
 @Override
 public boolean onDialogSelect(
     final Player player, int dialogId, int questId, int extendedRewardIndex) {
   if (dialogId == DialogAction.SETPRO1.id()) {
     AI2Actions.deleteOwner(this);
   } else if (dialogId == DialogAction.SELECT_ACTION_1012.id())
     PacketSendUtility.sendPacket(player, new SM_DIALOG_WINDOW(getObjectId(), 1012));
   return true;
 }
Esempio n. 4
0
 @Override
 protected void handleDied() {
   super.handleDied();
   AI2Actions.deleteOwner(this);
 }