Examples of CharInfo


Examples of net.sf.l2j.gameserver.serverpackets.CharInfo

            {
                L2PcInstance otherPlayer = (L2PcInstance) object;
                if(otherPlayer.isInBoat())
                {
                  otherPlayer.getPosition().setWorldPosition(otherPlayer.getBoat().getPosition().getWorldPosition());
                  getActiveChar().sendPacket(new CharInfo(otherPlayer));
                  int relation = otherPlayer.getRelation(getActiveChar());
                  if (otherPlayer.getKnownList().getKnownRelations().get(getActiveChar().getObjectId()) != null && otherPlayer.getKnownList().getKnownRelations().get(getActiveChar().getObjectId()) != relation)
                    getActiveChar().sendPacket(new RelationChanged(otherPlayer, relation, getActiveChar().isAutoAttackable(otherPlayer)));
                  getActiveChar().sendPacket(new GetOnVehicle(otherPlayer, otherPlayer.getBoat(), otherPlayer.getInBoatPosition().getX(), otherPlayer.getInBoatPosition().getY(), otherPlayer.getInBoatPosition().getZ()));
                  /*if(otherPlayer.getBoat().GetVehicleDeparture() == null)
                  {

                    int xboat = otherPlayer.getBoat().getX();
                    int yboat= otherPlayer.getBoat().getY();
                    double modifier = Math.PI/2;
                    if (yboat == 0)
                    {
                      yboat = 1;
                    }
                    if(yboat < 0)
                    {
                      modifier = -modifier;
                    }
                    double angleboat = modifier - Math.atan(xboat/yboat);
                    int xp = otherPlayer.getX();
                    int yp = otherPlayer.getY();
                    modifier = Math.PI/2;
                    if (yp == 0)
                    {
                      yboat = 1;
                    }
                    if(yboat < 0)
                    {
                      modifier = -modifier;
                    }
                    double anglep = modifier - Math.atan(yp/xp);

                    double finx = Math.cos(anglep - angleboat)*Math.sqrt(xp *xp +yp*yp ) + Math.cos(angleboat)*Math.sqrt(xboat *xboat +yboat*yboat );
                    double finy = Math.sin(anglep - angleboat)*Math.sqrt(xp *xp +yp*yp ) + Math.sin(angleboat)*Math.sqrt(xboat *xboat +yboat*yboat );
                    //otherPlayer.getPosition().setWorldPosition(otherPlayer.getBoat().getX() - otherPlayer.getInBoatPosition().x,otherPlayer.getBoat().getY() - otherPlayer.getInBoatPosition().y,otherPlayer.getBoat().getZ()- otherPlayer.getInBoatPosition().z);
                    otherPlayer.getPosition().setWorldPosition((int)finx,(int)finy,otherPlayer.getBoat().getZ()- otherPlayer.getInBoatPosition().z);

                  }*/
                }
                else
                {
                  getActiveChar().sendPacket(new CharInfo(otherPlayer));
                  int relation = otherPlayer.getRelation(getActiveChar());
                  if (otherPlayer.getKnownList().getKnownRelations().get(getActiveChar().getObjectId()) != null && otherPlayer.getKnownList().getKnownRelations().get(getActiveChar().getObjectId()) != relation)
                    getActiveChar().sendPacket(new RelationChanged(otherPlayer, relation, getActiveChar().isAutoAttackable(otherPlayer)));
                }

View Full Code Here

Examples of net.sf.l2j.gameserver.serverpackets.CharInfo

          " HP: "+hpval+" MP: "+mpval+" CP: " + cpval +
          " PvP: "+pvpflagval+" / "+pvpkillsval);

    showCharacterInfo(activeChar, null); //Back to start

    player.broadcastPacket(new CharInfo(player));
    player.sendPacket(new UserInfo(player));
    player.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
    player.decayMe();
    player.spawnMe(activeChar.getX(),activeChar.getY(),activeChar.getZ());
  }
View Full Code Here

Examples of net.sf.l2j.gameserver.serverpackets.CharInfo

            // send packets
            InventoryUpdate iu = new InventoryUpdate();
            iu.addModifiedItem(itemInstance);
            player.sendPacket(iu);
            player.broadcastPacket(new CharInfo(player));
            player.sendPacket(new UserInfo(player));

            // informations
            activeChar.sendMessage("Changed enchantment of " + player.getName() + "'s "
                + itemInstance.getItem().getName() + " from " + curEnchant + " to " + ench + ".");
View Full Code Here

Examples of net.sf.l2j.gameserver.serverpackets.CharInfo

          L2PcInstance otherPlayer = (L2PcInstance) object;

          if (otherPlayer.isInBoat())
          {
            otherPlayer.getPosition().setWorldPosition(otherPlayer.getBoat().getPosition().getWorldPosition());
            _activeChar.sendPacket(new CharInfo(otherPlayer));
            int relation = otherPlayer.getRelation(_activeChar);
            if (otherPlayer.getKnownList().getKnownRelations().get(_activeChar.getObjectId()) != null && otherPlayer.getKnownList().getKnownRelations().get(_activeChar.getObjectId()) != relation)
              _activeChar.sendPacket(new RelationChanged(otherPlayer, relation, _activeChar.isAutoAttackable(otherPlayer)));
            _activeChar.sendPacket(new GetOnVehicle(otherPlayer, otherPlayer.getBoat(), otherPlayer.getInBoatPosition().getX(), otherPlayer.getInBoatPosition().getY(), otherPlayer.getInBoatPosition().getZ()));
          }
          else
          {
            _activeChar.sendPacket(new CharInfo(otherPlayer));
            int relation = otherPlayer.getRelation(_activeChar);
            if (otherPlayer.getKnownList().getKnownRelations().get(_activeChar.getObjectId()) != null && otherPlayer.getKnownList().getKnownRelations().get(_activeChar.getObjectId()) != relation)
              _activeChar.sendPacket(new RelationChanged(otherPlayer, relation, _activeChar.isAutoAttackable(otherPlayer)));
          }
        }
View Full Code Here

Examples of net.sf.l2j.gameserver.serverpackets.CharInfo

        {
          super.removeSkill(getKnownSkill(4270));
        }
       
        sendPacket(new EtcStatusUpdate(this));
        Broadcast.toKnownPlayers(this, new CharInfo(this));
      }
    }
  }
View Full Code Here

Examples of net.sf.l2j.gameserver.serverpackets.CharInfo

    if (Config.DEBUG)
    {
      _log.fine("players to notify:" + getKnownList().getKnownPlayers().size() + " packet: [S] 03 CharInfo");
    }
   
    Broadcast.toKnownPlayers(this, new CharInfo(this));
  }
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.