Examples of doSpawn()

  • l2p.gameserver.model.L2Spawn.doSpawn()
  • lineage2.gameserver.model.SimpleSpawner.doSpawn()
    Method doSpawn. @param spawn boolean @return NpcInstance
  • net.sf.l2j.gameserver.model.L2Spawn.doSpawn()
    Create the L2NpcInstance, add it to the world and launch its OnSpawn action.

    Concept :

    L2NpcInstance can be spawned either in a random position into a location area (if Lox=0 and Locy=0), either at an exact position. The heading of the L2NpcInstance can be a random heading if not defined (value= -1) or an exact heading (ex : merchant...).

    Actions for an random spawn into location area : (if Locx=0 and Locy=0)

  • Get L2NpcInstance Init parameters and its generate an Identifier
  • Call the constructor of the L2NpcInstance
  • Calculate the random position in the location area (if Locx=0 and Locy=0) or get its exact position from the L2Spawn
  • Set the position of the L2NpcInstance
  • Set the HP and MP of the L2NpcInstance to the max
  • Set the heading of the L2NpcInstance (random heading if not defined : value=-1)
  • Link the L2NpcInstance to this L2Spawn
  • Init other values of the L2NpcInstance (ex : from its L2CharTemplate for INT, STR, DEX...) and add it in the world
  • Launch the action OnSpawn fo the L2NpcInstance


  • Increase the current number of L2NpcInstance managed by this L2Spawn


  • @return

    Examples of com.l2jfrozen.gameserver.model.spawn.L2Spawn.doSpawn()

            // Needed as doSpawn() is required to be called also for the NpcInstance it returns.
            npcSpawn.startRespawn();

            SpawnTable.getInstance().addNewSpawn(npcSpawn, false);
            _witchInst = npcSpawn.doSpawn();

            if(Config.DEBUG)
            {
              _log.fine("SevenSignsFestival: Spawned the Festival Witch " + npcSpawn.getNpcid() + " at " + _witchSpawn._x + " " + _witchSpawn._y + " " + _witchSpawn._z);
            }
    View Full Code Here

    Examples of com.l2jfrozen.gameserver.model.spawn.L2Spawn.doSpawn()

              // Needed as doSpawn() is required to be called also for the NpcInstance it returns.
              npcSpawn.startRespawn();

              SpawnTable.getInstance().addNewSpawn(npcSpawn, false);
              L2FestivalMonsterInstance festivalMob = (L2FestivalMonsterInstance) npcSpawn.doSpawn();

              // Set the offering bonus to 2x or 5x the amount per kill,
              // if this spawn is part of an increased challenge or is a festival chest.
              if(spawnType == 1)
              {
    View Full Code Here

    Examples of com.l2jfrozen.gameserver.model.spawn.L2Spawn.doSpawn()

            spawn.setLocy(_fisher.GetFishy());
            spawn.setLocz(_fisher.GetFishz());
            spawn.setAmount(1);
            spawn.setHeading(_fisher.getHeading());
            spawn.stopRespawn();
            ((L2PenaltyMonsterInstance) spawn.doSpawn()).setPlayerToKill(_fisher);
            spawn = null;
          }
          catch(Exception e)
          {
            // Nothing
    View Full Code Here

    Examples of com.l2jfrozen.gameserver.model.spawn.L2Spawn.doSpawn()

          return;

        L2Spawn spawnDat = _mysteriousBoxSpawns.get(npcId);
        if(spawnDat != null)
        {
          _allMobs.add(spawnDat.doSpawn());
          spawnDat.stopRespawn();
        }
        spawnDat = null;
      }
    View Full Code Here

    Examples of com.l2jfrozen.gameserver.model.spawn.L2Spawn.doSpawn()

                  keyBoxMobSpawn.setLocy(spawnDat.getLocy());
                  keyBoxMobSpawn.setLocz(spawnDat.getLocz());
                  keyBoxMobSpawn.setHeading(spawnDat.getHeading());
                  keyBoxMobSpawn.setRespawnDelay(3600);
                  SpawnTable.getInstance().addNewSpawn(keyBoxMobSpawn, false);
                  mob = (L2SepulcherMonsterInstance) keyBoxMobSpawn.doSpawn();
                  keyBoxMobSpawn.stopRespawn();
                }
                else
                {
                  _log.warning("FourSepulchersManager.SpawnMonster: Data missing in NPC table for ID: 18149");
    View Full Code Here

    Examples of com.l2jfrozen.gameserver.model.spawn.L2Spawn.doSpawn()

          spawnDat.setLocx(activeChar.getX());
          spawnDat.setLocy(activeChar.getY());
          spawnDat.setLocz(activeChar.getZ());
          spawnDat.setHeading(activeChar.getHeading());
          spawnDat.setRespawnDelay(3600);
          _allMobs.add(spawnDat.doSpawn());
          spawnDat.stopRespawn();

          spawnDat = null;
        }
      }
    View Full Code Here

    Examples of com.l2jfrozen.gameserver.model.spawn.L2Spawn.doSpawn()

          spawnDat.setLocx(activeChar.getX());
          spawnDat.setLocy(activeChar.getY());
          spawnDat.setLocz(activeChar.getZ());
          spawnDat.setHeading(activeChar.getHeading());
          spawnDat.setRespawnDelay(3600);
          _allMobs.add(spawnDat.doSpawn());
          spawnDat.stopRespawn();

          spawnDat = null;
        }
      }
    View Full Code Here

    Examples of com.l2jfrozen.gameserver.model.spawn.L2Spawn.doSpawn()

          return;

        L2Spawn spawnDat = _shadowSpawns.get(npcId);
        if(spawnDat != null)
        {
          L2SepulcherMonsterInstance mob = (L2SepulcherMonsterInstance) spawnDat.doSpawn();
          spawnDat.stopRespawn();

          if(mob != null)
          {
            mob.mysteriousBoxId = npcId;
    View Full Code Here

    Examples of com.l2jfrozen.gameserver.model.spawn.L2Spawn.doSpawn()

              else
                npcId = 29067; // normal
             
              // Do spawn.
              antharasSpawn = _monsterSpawn.get(npcId);
              _antharas = (L2GrandBossInstance) antharasSpawn.doSpawn();
              GrandBossManager.getInstance().addBoss(_antharas);
             
              _monsters.add(_antharas);
              _antharas.setIsImobilised(true);
             
    View Full Code Here

    Examples of com.l2jfrozen.gameserver.model.spawn.L2Spawn.doSpawn()

              tempSpawn.setHeading(0);
              tempSpawn.setAmount(1);
              tempSpawn.setRespawnDelay(FWA_ACTIVITYTIMEOFANTHARAS * 2);
              SpawnTable.getInstance().addNewSpawn(tempSpawn, false);
              // Do spawn.
              _monsters.add(tempSpawn.doSpawn());
            }
          }
          catch (Exception e)
          {
            _log.warning(e.getMessage());
    View Full Code Here
    TOP
    Copyright © 2018 www.massapi.com. All rights reserved.
    All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.