Package net.sf.l2j.gameserver.serverpackets

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


        // Remove the item from inventory.
    activeChar.destroyItem("Consume", item.getObjectId(), 1, null, false);

    // Broadcast the changes to the char and all those nearby.
    UserInfo ui = new UserInfo(activeChar);
    activeChar.broadcastPacket(ui);
  }
View Full Code Here


        String id = st.nextToken();
        activeChar.getPoly().setPolyInfo("npc", id);
        activeChar.teleToLocation(activeChar.getX(), activeChar.getY(), activeChar.getZ(), false);
        CharInfo info1 = new CharInfo(activeChar);
        activeChar.broadcastPacket(info1);
        UserInfo info2 = new UserInfo(activeChar);
        activeChar.sendPacket(info2);
      }
      catch(Exception e)
      {
      }
    }
    else if (command.startsWith("admin_unpolyself"))
    {
      activeChar.getPoly().setPolyInfo(null, "1");
      activeChar.decayMe();
      activeChar.spawnMe(activeChar.getX(),activeChar.getY(),activeChar.getZ());
      CharInfo info1 = new CharInfo(activeChar);
      activeChar.broadcastPacket(info1);
      UserInfo info2 = new UserInfo(activeChar);
      activeChar.sendPacket(info2);
    }
    else if (command.startsWith("admin_changename"))
    {
      try
      {
        String name = st.nextToken();
        String oldName = "null";
        try
        {
          L2Object target = activeChar.getTarget();
          L2Character player = null;
          if (target instanceof L2Character)
          {
            player = (L2Character)target;
            oldName = player.getName();
          }
          else if (target == null)
          {
            player = activeChar;
            oldName = activeChar.getName();
          }
          if (player instanceof L2PcInstance)
            L2World.getInstance().removeFromAllPlayers((L2PcInstance)player);
          player.setName(name);
          if (player instanceof L2PcInstance)
            L2World.getInstance().addVisibleObject(player, null, null);
          if (player instanceof L2PcInstance)
          {
            CharInfo info1 = new CharInfo((L2PcInstance)player);
            player.broadcastPacket(info1);
            UserInfo info2 = new UserInfo((L2PcInstance)player);
            player.sendPacket(info2);
          }
          else if(player instanceof L2NpcInstance)
          {
            NpcInfo info1 = new NpcInfo((L2NpcInstance)player, null);
View Full Code Here

        try{   L2PcInstance target = L2World.getInstance().getPlayer(it.next().toString());
        target.getPoly().setPolyInfo("npc", id);
        target.teleToLocation(target.getX(), target.getY(), target.getZ(), true);
        CharInfo info1 = new CharInfo(target);
        target.broadcastPacket(info1);
            UserInfo info2 = new UserInfo(target);
            target.sendPacket(info2);}catch(Exception e){}
       }

   }
View Full Code Here

           target.getPoly().setPolyInfo(null, "1");
        target.decayMe();
        target.spawnMe(target.getX(),target.getY(),target.getZ());
        CharInfo info1 = new CharInfo(target);
        target.broadcastPacket(info1);
            UserInfo info2 = new UserInfo(target);
            target.sendPacket(info2);}catch(Exception e){}
       }

   }
View Full Code Here

          " 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

    public void onTimeElapsed(ExecutedTask task)
    {
        for (L2PcInstance player: L2World.getInstance().getAllPlayers())
        {
            player.restartRecom();
            player.sendPacket(new UserInfo(player));
        }
        _log.config("Recommendation Global Task: launched.");
    }
View Full Code Here

            // 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 + ".");
            player.sendMessage("Admin has changed the enchantment of your "
View Full Code Here

        ExStorageMaxCount esmc = new ExStorageMaxCount(activeChar);
        activeChar.sendPacket(esmc);

        activeChar.getMacroses().sendUpdate();

        sendPacket(new UserInfo(activeChar));

        sendPacket(new HennaInfo(activeChar));

        sendPacket(new FriendList(activeChar));
View Full Code Here

    /* Micht : Use of UserInfo for C5
        StatusUpdate su = new StatusUpdate(activeChar.getObjectId());
        su.addAttribute(StatusUpdate.EXP, getExp());
        activeChar.sendPacket(su);
        */
        activeChar.sendPacket(new UserInfo(activeChar));

        return true;
    }
View Full Code Here

        // Update the overloaded status of the L2PcInstance
        getActiveChar().refreshOverloaded();
        // Update the expertise status of the L2PcInstance
        getActiveChar().refreshExpertisePenalty();
        // Send a Server->Client packet UserInfo to the L2PcInstance
        getActiveChar().sendPacket(new UserInfo(getActiveChar()));

        return levelIncreased;
    }
View Full Code Here

TOP

Related Classes of net.sf.l2j.gameserver.serverpackets.UserInfo

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.