Package net.sf.l2j.gameserver.serverpackets

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


    addClanMember(member);
    member.setPlayerInstance(player);
    player.setClan(this);
    player.setPledgeClass(member.calculatePledgeClass(player));
    player.sendPacket(new PledgeShowMemberListUpdate(player));
    player.sendPacket(new UserInfo(player));
    }
View Full Code Here


                if (cm.isOnline())
                    if (cm.getPowerGrade() == rank)
                        if (cm.getPlayerInstance() != null)
                        {
                            cm.getPlayerInstance().setClanPrivileges(privs);
                            cm.getPlayerInstance().sendPacket(new UserInfo(cm.getPlayerInstance()));
                        }
            }
            broadcastClanStatus();
        }
        else
View Full Code Here

        setAllyId(getClanId());
        setAllyName(allyName.trim());
        setAllyPenaltyExpiryTime(0, 0);
        updateClanInDB();

        player.sendPacket(new UserInfo(player));

        //TODO: Need correct message id
        player.sendMessage("Alliance " + allyName + " has been created.");
    }
View Full Code Here

      character.setRunning()// running is default
      character.standUp();    // standing is default

      character.refreshOverloaded();
      character.refreshExpertisePenalty();
      character.sendPacket(new UserInfo(character));
      character.broadcastKarma();
            character.setOnlineStatus(true);
    }
    else
    {
View Full Code Here

    _clans.put(new Integer(clan.getClanId()), clan);

        //should be update packet only
        player.sendPacket(new PledgeShowInfoUpdate(clan));
        player.sendPacket(new PledgeShowMemberListAll(clan, player));
        player.sendPacket(new UserInfo(player));
        player.sendPacket(new PledgeShowMemberListUpdate(player));
        player.sendPacket(new SystemMessage(SystemMessageId.CLAN_CREATED));
        return clan;
    }
View Full Code Here

                        iu = new InventoryUpdate();
                        iu.addRemovedItem(item);
                        player.sendPacket(iu);
                    }

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

        if (newHeroes.size() == 0)
        {
            _heroes.clear();
            return;
        }

        Map<Integer, StatsSet> heroes = new FastMap<Integer, StatsSet>();

        for (StatsSet hero : newHeroes)
        {
            int charId = hero.getInteger(Olympiad.CHAR_ID);

            if (_completeHeroes != null && _completeHeroes.containsKey(charId))
            {
                StatsSet oldHero = _completeHeroes.get(charId);
                int count = oldHero.getInteger(COUNT);
                oldHero.set(COUNT, count + 1);
                oldHero.set(PLAYED, 1);

                heroes.put(charId, oldHero);
            }
            else
            {
                StatsSet newHero = new StatsSet();
                newHero.set(Olympiad.CHAR_NAME, hero.getString(Olympiad.CHAR_NAME));
                newHero.set(Olympiad.CLASS_ID, hero.getInteger(Olympiad.CLASS_ID));
                newHero.set(COUNT, 1);
                newHero.set(PLAYED, 1);

                heroes.put(charId, newHero);
            }
        }

        deleteItemsInDb();

        _heroes.clear();
        _heroes.putAll(heroes);
        heroes.clear();

        updateHeroes(false);

        for (StatsSet hero : _heroes.values())
        {
            String name = hero.getString(Olympiad.CHAR_NAME);

            L2PcInstance player = L2World.getInstance().getPlayer(name);

            if (player != null)
            {
                player.setHero(true);
                L2Clan clan = player.getClan();
                if (clan != null)
                {
                    clan.setReputationScore(clan.getReputationScore()+1000, true);
                    clan.broadcastToOnlineMembers(new PledgeShowInfoUpdate(clan));
            SystemMessage sm = new SystemMessage(SystemMessageId.CLAN_MEMBER_S1_BECAME_HERO_AND_GAINED_S2_REPUTATION_POINTS);
                    sm.addString(name);
                    sm.addNumber(1000);
            clan.broadcastToOnlineMembers(sm);
                }
                player.sendPacket(new UserInfo(player));
                player.broadcastUserInfo();

            }
            else
            {
View Full Code Here

  {
    L2PcInstance activeChar = getClient().getActiveChar();
        if(activeChar == null) return;
        if (activeChar.isTeleporting()) activeChar.onTeleported();

        sendPacket(new UserInfo(activeChar));
  }
View Full Code Here

    {
      return;
    }
    player.setPvpFlag(value);
   
    player.sendPacket(new UserInfo(player));
    for (L2PcInstance target : getKnownList().getKnownPlayers().values())
    {
      target.sendPacket(new RelationChanged(player, player.getRelation(player), player.isAutoAttackable(target)));
    }
  }
View Full Code Here

             clan = ClanTable.getInstance().getClan(siegeclan.getClanId());
             for (L2PcInstance member : clan.getOnlineMembers(""))
             {
                 if (clear) member.setSiegeState((byte)0);
                 else member.setSiegeState((byte)1);
                 member.sendPacket(new UserInfo(member));
                 for (L2PcInstance player : member.getKnownList().getKnownPlayers().values()) {
              player.sendPacket(new RelationChanged(member, member.getRelation(player), member.isAutoAttackable(player)));
                 }
             }
        }
      for(L2SiegeClan siegeclan : getDefenderClans())
        {
            clan = ClanTable.getInstance().getClan(siegeclan.getClanId());
            for (L2PcInstance member : clan.getOnlineMembers(""))
            {
                if (clear) member.setSiegeState((byte)0);
                else member.setSiegeState((byte)2);
                member.sendPacket(new UserInfo(member));
                for (L2PcInstance player : member.getKnownList().getKnownPlayers().values()) {
              player.sendPacket(new RelationChanged(member, member.getRelation(player), member.isAutoAttackable(player)));
                }
            }
        }
View Full Code Here

    sm = new SystemMessage(SystemMessageId.YOU_HAVE_BEEN_RECOMMENDED);
    sm.addString(activeChar.getName());
    target.sendPacket(sm);
    sm =null;

        activeChar.sendPacket(new UserInfo(activeChar));
    target.broadcastUserInfo();
  }
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.