Package com.l2client.component

Examples of com.l2client.component.L2JComponent


  public Entity createPCComponents(EntityData e, VisibleModel visible) {
   
    EntityManager em = Singleton.get().getEntityManager();
    final Entity ent = em.createEntity(e.getObjectId());
    PositioningComponent pos = new PositioningComponent();
    L2JComponent l2j = new L2JComponent();
    VisualComponent vis = new VisualComponent();
    EnvironmentComponent env = new EnvironmentComponent();
    TargetComponent tgt = new TargetComponent();
    LoggingComponent log = new LoggingComponent();
   
View Full Code Here


//    //update position
//    SimplePositionComponent pos = (SimplePositionComponent) Singleton.get().getEntityManager().getComponent(id.getId(), SimplePositionComponent.class);
//    //update l2j
System.out.println("updateNPC called for Ent "+id.getId());
    L2JComponent l2j = (L2JComponent) Singleton.get().getEntityManager().getComponent(id.getId(), L2JComponent.class);
    if(l2j != null){
      l2j.l2jEntity.updateFrom(e);
    } else {
      log.severe("FIXME update of NPC "+id+"received, but no L2JComponent found");
    }
View Full Code Here

  private void createNpc(NpcData e) {
   
    EntityManager em = Singleton.get().getEntityManager();
    PositioningComponent pos = new PositioningComponent();
    L2JComponent l2j = new L2JComponent();
    VisualComponent vis = new VisualComponent();
    EnvironmentComponent env = new EnvironmentComponent();
    //FIXME parallel create problems, synchronize creation and essential components or at least create/check of components
System.out.println("createNpc pre createEntity "+e.getObjectId());
    Entity ent = em.createEntity(e.getObjectId());
View Full Code Here

  {
    log.finer("Read from Server "+this.getClass().getSimpleName());
        int id = readD();
        int attributes = readD();
       
        L2JComponent co = (L2JComponent) Singleton.get().getEntityManager().getComponent(id, L2JComponent.class);
        if(co != null) {
          EntityData e = co.l2jEntity;
        for (int i=0;i<attributes;i++)
        {
            int attrID = readD();
View Full Code Here

  @Override
  public void handlePacket() {
    log.finer("Read from Server "+this.getClass().getSimpleName());
    int obj = readD();
    Singleton s = Singleton.get();
    L2JComponent l2j = (L2JComponent) s.getEntityManager().getComponent(obj, L2JComponent.class);
    if(l2j != null){
      //TODO refactor item/npc handling, only components which should themselves know where to remove from, also refactor item/npc/pc instancing
      if(l2j.l2jItem != null) {
        _client.getItemHandler().removeItem(obj);
        log.fine("Delete of item id "+obj);
View Full Code Here

      //signal animation death
        Singleton.get().getAnimSystem().callAction(CallActions.Die, id);
     
      EntityManager ent = Singleton.get().getEntityManager();
      //update health properly
      L2JComponent com = (L2JComponent) ent.getComponent(id, L2JComponent.class);
      com.l2jEntity.setCurrentHp(0);
     
      //player died
      int playerId = _client.getCharHandler().getSelectedObjectId();
        if(id == playerId) {
View Full Code Here

TOP

Related Classes of com.l2client.component.L2JComponent

Copyright © 2018 www.massapicom. 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.