Package lineage2.gameserver.model.instances

Examples of lineage2.gameserver.model.instances.TrapInstance.spawnMe()


    try
    {
      final NpcInstance npc = NpcHolder.getInstance().getTemplate(CHIEFTAINS_TREASURE_CHEST).getNewInstance();
      npc.setSpawnedLoc(actor.getLoc());
      npc.setCurrentHpMp(npc.getMaxHp(), npc.getMaxMp(), true);
      npc.spawnMe(npc.getSpawnedLoc());
    }
    catch (Exception e)
    {
      e.printStackTrace();
    }
View Full Code Here


    final NpcTemplate template = NpcHolder.getInstance().getTemplate(npcId);
    final NpcInstance npc = template.getNewInstance();
    npc.setSpawnedLoc(loc);
    npc.setLoc(loc);
    npc.setHeading(h);
    npc.spawnMe();
    return npc;
  }
 
  /**
   * Method getZone.
View Full Code Here

    final NpcInstance npc = template.getNewInstance();
    npc.setSpawnedLoc(loc);
    npc.setHeading(loc.h);
    npc.setLoc(loc);
    npc.setReflection(currentReflection);
    npc.spawnMe();
    return npc;
  }
 
  /**
   * @author Mobius
View Full Code Here

        else
        {
          npc = new SepulcherNpcInstance(IdFactory.getInstance().getNextId(), template);
        }
        npc.setSpawnedLoc(loc);
        npc.spawnMe(loc);
        _allMobs.add(npc);
      }
    }
  }
 
View Full Code Here

            for (int i = 0; i < count; i++)
            {
              NpcInstance npc = template.getNewInstance();
              npc.setSpawnedLoc(target.getLoc());
              npc.setCurrentHpMp(npc.getMaxHp(), npc.getMaxMp(), true);
              npc.spawnMe(npc.getSpawnedLoc());
            }
          }
          else
          {
            if (target == null)
View Full Code Here

          return false;
        }
        npc = (NpcInstance) obj;
        npc.setHeading(activeChar.getHeading());
        npc.decayMe();
        npc.spawnMe();
        activeChar.sendMessage("New heading : " + activeChar.getHeading());
        spawn = npc.getSpawn();
        if (spawn == null)
        {
          activeChar.sendMessage("Spawn for this npc == null!");
View Full Code Here

    NpcInstance npc = template.getNewInstance();
    npc.setHeading(loc.h < 0 ? Rnd.get(0xFFFF) : loc.h);
    npc.setSpawnedLoc(loc);
    npc.setReflection(reflection);
    npc.setCurrentHpMp(npc.getMaxHp(), npc.getMaxMp(), true);
    npc.spawnMe(npc.getSpawnedLoc());
    if (despawnTime > 0)
    {
      ThreadPoolManager.getInstance().schedule(new GameObjectTasks.DeleteTask(npc), despawnTime);
    }
    return npc;
View Full Code Here

    }
    pet.getInventory().restore();
    activeChar.getSummonList().addSummon(pet);
    pet.setHeading(activeChar.getHeading());
    pet.setReflection(activeChar.getReflection());
    pet.spawnMe(Location.findAroundPosition(activeChar, 50, 70));
    pet.setRunning();
    pet.setFollowMode(true);
    if (activeChar.isInOlympiadMode())
    {
      pet.getEffectList().stopAllEffects();
View Full Code Here

   * @return StaticObjectInstance
   */
  public StaticObjectInstance newInstance()
  {
    StaticObjectInstance instance = new StaticObjectInstance(IdFactory.getInstance().getNextId(), this);
    instance.spawnMe(new Location(getX(), getY(), getZ()));
    return instance;
  }
}
View Full Code Here

        activeChar.getSummonList().addSummon(summon);
        summon.setExpPenalty(_expPenalty);
        summon.setExp(Experience.LEVEL[Math.min(summon.getLevel(), Experience.LEVEL.length - 1)]);
        summon.setHeading(activeChar.getHeading());
        summon.setReflection(activeChar.getReflection());
        summon.spawnMe(loc == null ? Location.findAroundPosition(activeChar, 50, 70) : loc);
        summon.setRunning();
        summon.setFollowMode(true);
        if (summon.getSkillLevel(4140) > 0)
        {
          summon.altUseSkill(SkillTable.getInstance().getInfo(4140, summon.getSkillLevel(4140)), activeChar);
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.