Пример #1
0
  /**
   * Launching method for GameServer
   *
   * @param args arguments, not used
   */
  public static void main(String[] args) {
    long start = System.currentTimeMillis();

    initUtilityServicesAndConfig();

    GameServer gs = new GameServer();
    gs.spawnMonsters();

    // Loading quests
    QuestParser.getInstance();

    // Ininitialize skill engine
    SkillEngine.getInstance().registerAllSkills(gs.injector);

    // Drop list

    DropList.getInstance();

    Util.printMemoryUsage(log);
    log.info("###########################################################################");
    log.info(
        "AE Game Server started in " + (System.currentTimeMillis() - start) / 1000 + " seconds.");
    log.info("###########################################################################");

    gs.startServers();
    GameTimeManager.startClock();

    Runtime.getRuntime().addShutdownHook(new Thread(new ShutdownHook()));

    // gs.injector.getInstance(com.aionemu.gameserver.utils.chathandlers.ChatHandlers.class);
  }
 @Override
 public void handleUseItemFinish(Player player, Npc npc) {
   switch (npc.getNpcId()) {
     case 701644:
       sendMsg(1401879);
       if (canUseLever() && echec == 0) {
         doors.get(47).setOpen(true);
         despawnNpc(npc);
         despawnNpc(instance.getNpc(701155));
         break;
       }
       break;
     case 701646:
       SkillEngine.getInstance().getSkill(npc, 21434, 60, player).useNoAnimationSkill();
       NpcActions.scheduleRespawn(npc);
       despawnNpc(npc);
       for (Player p : instance.getPlayersInside()) {
         if (p.getEffectController().hasAbnormalEffect(21434)) {
           StartSpawn(p);
           break;
         }
       }
       break;
     case 701647:
       SkillEngine.getInstance().getSkill(npc, 21435, 60, player).useNoAnimationSkill();
       NpcActions.scheduleRespawn(npc);
       despawnNpc(npc);
       for (Player p : instance.getPlayersInside()) {
         if (p.getEffectController().hasAbnormalEffect(21435)) {
           StartSpawn(p);
           break;
         }
       }
       break;
   }
 }
Пример #3
0
 private void apllyEffect(Creature creature, int skillId) {
   SkillEngine.getInstance().applyEffectDirectly(skillId, getOwner(), creature, 0);
 }
 private void VritraGeneralBless(int skillId) {
   SkillEngine.getInstance().getSkill(getOwner(), skillId, 60, getOwner()).useNoAnimationSkill();
 }
Пример #5
0
  /** Penalty success skill */
  private void startPenaltySkill() {
    int penaltySkill = skillTemplate.getPenaltySkillId();
    if (penaltySkill == 0) return;

    SkillEngine.getInstance().applyEffectDirectly(penaltySkill, firstTarget, effector, 0);
  }