Package l2p.gameserver.model.instances

Examples of l2p.gameserver.model.instances.L2NpcInstance.onSpawn()


  private static L2NpcInstance spawn(Location loc)
  {
    L2NpcTemplate template = NpcTable.getTemplate(loc.id);
    L2NpcInstance npc = template.getNewInstance();
    npc.setSpawnedLoc(loc);
    npc.onSpawn();
    npc.setHeading(loc.h);
    npc.setXYZInvisible(loc);
    npc.spawnMe();
    return npc;
  }
View Full Code Here


        try
        {
          L2NpcInstance npc = NpcTable.getTemplate(bro).getNewInstance();
          npc.setSpawnedLoc(((L2MonsterInstance) actor).getMinionPosition());
          npc.setReflection(actor.getReflection());
          npc.onSpawn();
          npc.spawnMe(npc.getSpawnedLoc());
          npc.getAI().notifyEvent(CtrlEvent.EVT_AGGRESSION, attacker, Rnd.get(1, 100));
        }
        catch(Exception e)
        {
View Full Code Here

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

  public static L2NpcInstance spawn(Location loc, int npcId)
  {
    L2NpcTemplate template = NpcTable.getTemplate(loc.id);
    L2NpcInstance npc = template.getNewInstance();
    npc.setSpawnedLoc(loc);
    npc.onSpawn();
    npc.setHeading(loc.h);
    npc.setXYZInvisible(loc);
    npc.setReflection(currentReflection);
    npc.spawnMe();
    return npc;
View Full Code Here

        try
        {
          L2NpcInstance npc = NpcTable.getTemplate(bro).getNewInstance();
          npc.setSpawnedLoc(((L2MonsterInstance) actor).getMinionPosition());
          npc.setReflection(actor.getReflection());
          npc.onSpawn();
          npc.spawnMe(npc.getSpawnedLoc());
          npc.getAI().notifyEvent(CtrlEvent.EVT_AGGRESSION, attacker, Rnd.get(1, 1000));
        }
        catch(Exception e)
        {
View Full Code Here

      if(template != null)
      {
        L2NpcInstance npc = NpcTable.getTemplate(npcId).getNewInstance();
        npc.setReflection(refId);
        npc.setSpawnedLoc(randomOffset > 50 ? loc.rnd(50, randomOffset, false) : loc);
        npc.onSpawn();
        npc.spawnMe(npc.getSpawnedLoc());
        return npc;
      }
    }
    catch(Exception e1)
View Full Code Here

  {
    try
    {
      L2NpcInstance npc = NpcTable.getTemplate(npcId).getNewInstance();
      npc.setSpawnedLoc(loc.correctGeoZ());
      npc.onSpawn();
      npc.spawnMe(npc.getSpawnedLoc());
      return npc;
    }
    catch(Exception e)
    {
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.