Examples of broadcastUserInfo()

  • l2p.gameserver.model.L2Player.broadcastUserInfo()
    Отправляет UserInfo даному игроку и CharInfo всем окружающим.

    Концепт :

    Сервер шлет игроку UserInfo. Сервер вызывает метод {@link L2Player#broadcastPacketToOthers(l2p.gameserver.serverpackets.L2GameServerPacket)} для рассылки CharInfo

    Действия :

  • Отсылка игроку UserInfo(личные и общие данные)
  • Отсылка другим игрокам CharInfo(Public data only)


  • Внимание : НЕ ПОСЫЛАЙТЕ UserInfo другим игрокам либо CharInfo даному игроку.
    НЕ ВЫЗЫВАЕЙТЕ ЭТОТ МЕТОД КРОМЕ ОСОБЫХ ОБСТОЯТЕЛЬСТВ(смена сабкласса к примеру)!!! Траффик дико кушается у игроков и начинаются лаги.
    Используйте метод {@link l2p.gameserver.model.L2Player#sendChanges()}


  • l2p.gameserver.model.instances.L2NpcInstance.broadcastUserInfo()
  • lineage2.gameserver.model.Player.broadcastUserInfo()
    Method broadcastUserInfo. @param force boolean
  • net.sf.l2j.gameserver.model.L2Character.broadcastUserInfo()
  • net.sf.l2j.gameserver.model.actor.instance.L2PcInstance.broadcastUserInfo()
    Send a Server->Client packet UserInfo to this L2PcInstance and CharInfo to all L2PcInstance in its _KnownPlayers.
    Concept :
    Others L2PcInstance in the detection area of the L2PcInstance are identified in _knownPlayers. In order to inform other players of this L2PcInstance state modifications, server just need to go through _knownPlayers to send Server->Client Packet
    Actions :
  • Send a Server->Client packet UserInfo to this L2PcInstance (Public and Private Data)
  • Send a Server->Client packet CharInfo to all L2PcInstance in _KnownPlayers of the L2PcInstance (Public data only)

  • Caution : DON'T SEND UserInfo packet to other players instead of CharInfo packet. Indeed, UserInfo packet contains PRIVATE DATA as MaxHP, STR, DEX...

    Examples of net.sf.l2j.gameserver.model.actor.instance.L2PcInstance.broadcastUserInfo()

            getClient().sendPacket(new ActionFailed());
            return;
          }
          if(activeChar.getPrivateStoreType() != 0){
            activeChar.setPrivateStoreType(L2PcInstance.STORE_PRIVATE_NONE);
            activeChar.broadcastUserInfo();
              }
          if (activeChar.isSitting())
            activeChar.standUp();

          if (activeChar.getCreateList() == null)
    View Full Code Here

    Examples of net.sf.l2j.gameserver.model.actor.instance.L2PcInstance.broadcastUserInfo()

                            iu.addRemovedItem(item);
                            player.sendPacket(iu);
                        }

                        player.sendPacket(new UserInfo(player));
                        player.broadcastUserInfo();
                    } catch (NullPointerException e) {}
                }
            }

            if (newHeroes.size() == 0)
    View Full Code Here

    Examples of net.sf.l2j.gameserver.model.actor.instance.L2PcInstance.broadcastUserInfo()

                        sm.addString(name);
                        sm.addNumber(1000);
                clan.broadcastToOnlineMembers(sm);
                    }
                    player.sendPacket(new UserInfo(player));
                    player.broadcastUserInfo();

                }
                else
                {
                  java.sql.Connection con = null;
    View Full Code Here

    Examples of net.sf.l2j.gameserver.model.actor.instance.L2PcInstance.broadcastUserInfo()

        }

        activeChar.sendPacket(iu);

        activeChar.abortAttack();
        activeChar.broadcastUserInfo();

        // this can be 0 if the user pressed the right mousebutton twice very fast
        if (unequiped.length > 0)
        {
    View Full Code Here

    Examples of net.sf.l2j.gameserver.model.actor.instance.L2PcInstance.broadcastUserInfo()

                        {
                            iu.addModifiedItem(unequiped[i]);
                        }
                        activeChar.sendPacket(iu);
                   
                        activeChar.broadcastUserInfo();
                    }
                   
                    int count = item.getCrystalCount() - (item.getItem().getCrystalCount() +1) / 2;
                    if (count < 1) count = 1;
       
    View Full Code Here

    Examples of net.sf.l2j.gameserver.model.actor.instance.L2PcInstance.broadcastUserInfo()

               
                    StatusUpdate su = new StatusUpdate(activeChar.getObjectId());
                    su.addAttribute(StatusUpdate.CUR_LOAD, activeChar.getCurrentLoad());
                    activeChar.sendPacket(su);
               
                    activeChar.broadcastUserInfo();
               
                    L2World world = L2World.getInstance();
                    world.removeObject(destroyItem);
                }
                else
    View Full Code Here

    Examples of net.sf.l2j.gameserver.model.actor.instance.L2PcInstance.broadcastUserInfo()

            activeChar.sendPacket(su);     
            su = null;
           
            activeChar.sendPacket(new EnchantResult(item.getEnchantLevel())); //FIXME i'm really not sure about this...
            activeChar.sendPacket(new ItemList(activeChar, false)); //TODO update only the enchanted item
            activeChar.broadcastUserInfo();
        }
       
        /* (non-Javadoc)
         * @see net.sf.l2j.gameserver.clientpackets.ClientBasePacket#getType()
         */
     
    View Full Code Here

    Examples of net.sf.l2j.gameserver.model.actor.instance.L2PcInstance.broadcastUserInfo()

            }

            if (_count <= 0)
            {
                player.setPrivateStoreType(L2PcInstance.STORE_PRIVATE_NONE);
          player.broadcastUserInfo();
                return;
            }

            // Check maximum number of allowed slots for pvt shops
            if (_count > player.GetPrivateSellStoreLimit())
    View Full Code Here

    Examples of net.sf.l2j.gameserver.model.actor.instance.L2PcInstance.broadcastUserInfo()

        player.sitDown();
        if (_packageSale)
          player.setPrivateStoreType(L2PcInstance.STORE_PRIVATE_PACKAGE_SELL);
        else
          player.setPrivateStoreType(L2PcInstance.STORE_PRIVATE_SELL);
        player.broadcastUserInfo();
        player.broadcastPacket(new PrivateStoreMsgSell(player));
      }

      @Override
      public String getType()
    View Full Code Here

    Examples of net.sf.l2j.gameserver.model.actor.instance.L2PcInstance.broadcastUserInfo()

            activeChar.checkSSMatch(null, unequiped[i]);

            iu.addModifiedItem(unequiped[i]);
          }
          activeChar.sendPacket(iu);
          activeChar.broadcastUserInfo();

          ItemList il = new ItemList(activeChar, true);
          activeChar.sendPacket(il);
        }
    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.