L2J_CE

Вы хотите отреагировать на этот пост ? Создайте аккаунт всего в несколько кликов или войдите на форум.
L2J_CE

L2J_CE Server


    Масс Update

    Owned
    Owned


    Сообщения : 148
    Дата регистрации : 2010-03-22

    Масс Update Empty Масс Update

    Сообщение  Owned Ср Мар 24, 2010 11:57 am

    Олимпеада была описана ниже
    Bug Fixes : Warehouse enchant / pet enchant / multisell enchant / l2walker / olympiad clan skills / olympiad fake death / cp weapon exploit / trade exploits




    Код:
    Index: /trunk/L2JHC-Game/src/main/java/net/sf/l2j/gameserver/network/serverpackets/DoorInfo.java
    ===================================================================
    --- /trunk/L2JHC-Game/src/main/java/net/sf/l2j/gameserver/network/serverpackets/DoorInfo.java (revision 275)
    +++ /trunk/L2JHC-Game/src/main/java/net/sf/l2j/gameserver/network/serverpackets/DoorInfo.java (revision 276)
    @@ -20,4 +20,6 @@
     
     import net.sf.l2j.gameserver.model.actor.instance.L2DoorInstance;
    +import net.sf.l2j.gameserver.model.actor.instance.L2StaticObjectInstance;
    +import net.sf.l2j.gameserver.network.serverpackets.StaticObject;
     
     /**
    @@ -38,8 +40,26 @@
        private static final String _S__60_DOORINFO = "[S] 4c DoorInfo";
        private L2DoorInstance _door;
    -
    -   public DoorInfo(L2DoorInstance door)
    +   private final int _staticObjectId;
    +   private final int _objectId;
    +   private final int _type;
    +   private final boolean _isTargetable;
    +   private final boolean _isEnemyOf;
    +   private final int _maxHp;
    +   private final int _currentHp;
    +   private final boolean _showHp;
    +   private final int _damageGrade;
    +   
    +   public DoorInfo(L2DoorInstance door, boolean showHp)
        {
    +      _staticObjectId = door.getDoorId();
    +      _objectId = door.getObjectId();
    +      _type = 1;
           _door=door;
    +      _isTargetable = true;
    +      _isEnemyOf = door.isEnemyOf(_door);
    +      _maxHp = door.getMaxHp();
    +      _currentHp = (int) door.getCurrentHp();
    +      _showHp = showHp;
    +      _damageGrade = door.getDamage();
        }
     
    @@ -50,4 +70,11 @@
           writeD(_door.getObjectId());
           writeD(_door.getDoorId());
    +      writeD(_type);
    +      writeD(_isTargetable ? 1 : 0);
    +      writeD(_door.isEnemyOf(getClient().getActiveChar()) ? 1 : 0);
    +      writeD(_currentHp);
    +      writeD(_maxHp);
    +      writeD(_showHp ? 1 : 0);
    +      writeD(_damageGrade);
        }
     
    Index: /trunk/L2JHC-Game/src/main/java/net/sf/l2j/gameserver/network/SystemMessageId.java
    ===================================================================
    --- /trunk/L2JHC-Game/src/main/java/net/sf/l2j/gameserver/network/SystemMessageId.java (revision 249)
    +++ /trunk/L2JHC-Game/src/main/java/net/sf/l2j/gameserver/network/SystemMessageId.java (revision 276)
    @@ -4746,4 +4746,10 @@
     
        /**
    +    * ID: 769<br>
    +    * Message: A hacking tool has been discovered. Please try again after closing unnecessary programs.
    +    */
    +   HACKING_TOOL(769),
    +   
    +   /**
         * ID: 781<br>
         * Message: Observers cannot participate.
    Index: /trunk/L2JHC-Game/src/main/java/net/sf/l2j/gameserver/network/clientpackets/TradeRequest.java
    ===================================================================
    --- /trunk/L2JHC-Game/src/main/java/net/sf/l2j/gameserver/network/clientpackets/TradeRequest.java (revision 275)
    +++ /trunk/L2JHC-Game/src/main/java/net/sf/l2j/gameserver/network/clientpackets/TradeRequest.java (revision 276)
    @@ -114,4 +114,11 @@
            }
     
    +        if (partner.getAllowTrade() == false)
    +        {
    +           player.sendMessage("Target is not allowed to receive more than one trade request at the same time.");
    +           return;
    +        }
    +        partner.setAllowTrade(false);
    +        player.setAllowTrade(false);
           player.onTransactionRequest(partner);
           partner.sendPacket(new SendTradeRequest(player.getObjectId()));
    Index: /trunk/L2JHC-Game/src/main/java/net/sf/l2j/gameserver/network/clientpackets/MultiSellChoose.java
    ===================================================================
    --- /trunk/L2JHC-Game/src/main/java/net/sf/l2j/gameserver/network/clientpackets/MultiSellChoose.java (revision 275)
    +++ /trunk/L2JHC-Game/src/main/java/net/sf/l2j/gameserver/network/clientpackets/MultiSellChoose.java (revision 276)
    @@ -90,4 +90,6 @@
           PcInventory inv = player.getInventory();
     
    +       boolean maintainItemFound = false;
    +       
            // given the template entry and information about maintaining enchantment and applying taxes
            // re-create the instance of the entry that will be used for this exchange
    @@ -126,8 +128,26 @@
              if(newIng)
              {
    +             // If there is a maintainIngredient, then we do not need to check the enchantment parameter
    +             //  as the enchant level will be checked elsewhere
    +             if (maintainEnchantment || e.getMantainIngredient())
    +             {
    +                maintainItemFound = true;
    +             }
    +
                 // if it's a new ingredient, just store its info directly (item id, count, enchantment)
                 _ingredientsList.add(L2Multisell.getInstance().new MultiSellIngredient(e));
              }
           }
    +             
    +       // If there is no maintainIngredient, then we must make sure that the
    +       //  enchantment is not kept from the client packet, as it may have been forged
    +       if (!maintainItemFound)
    +       {
    +          for (MultiSellIngredient product : entry.getProducts())
    +             {
    +                product.setEnchantmentLevel(0);
    +             }
    +       }
    +
           // now check if the player has sufficient items in the inventory to cover the ingredients' expences
           for(MultiSellIngredient e : _ingredientsList)
    Index: /trunk/L2JHC-Game/src/main/java/net/sf/l2j/gameserver/network/clientpackets/SendWareHouseDepositList.java
    ===================================================================
    --- /trunk/L2JHC-Game/src/main/java/net/sf/l2j/gameserver/network/clientpackets/SendWareHouseDepositList.java (revision 275)
    +++ /trunk/L2JHC-Game/src/main/java/net/sf/l2j/gameserver/network/clientpackets/SendWareHouseDepositList.java (revision 276)
    @@ -34,4 +34,6 @@
     import net.sf.l2j.gameserver.network.serverpackets.SystemMessage;
     import net.sf.l2j.gameserver.templates.L2EtcItemType;
    +import net.sf.l2j.gameserver.util.IllegalPlayerAction;
    +import net.sf.l2j.gameserver.util.Util;
     
     /**
    @@ -93,4 +95,10 @@
            }
     
    +        if (player.getActiveEnchantItem() != null)
    +        {
    +          Util.handleIllegalPlayerAction(player,"Player "+player.getName()+" Tried To Use Enchant Exploit And Got Banned!", IllegalPlayerAction.PUNISH_KICKBAN);
    +          return;
    +        }
    +       
            // Alt game - Karma punishment
            if (!Config.ALT_GAME_KARMA_PLAYER_CAN_USE_WAREHOUSE && player.getKarma() > 0) return;
    Index: /trunk/L2JHC-Game/src/main/java/net/sf/l2j/gameserver/network/clientpackets/MoveBackwardToLocation.java
    ===================================================================
    --- /trunk/L2JHC-Game/src/main/java/net/sf/l2j/gameserver/network/clientpackets/MoveBackwardToLocation.java (revision 275)
    +++ /trunk/L2JHC-Game/src/main/java/net/sf/l2j/gameserver/network/clientpackets/MoveBackwardToLocation.java (revision 276)
    @@ -26,7 +26,11 @@
     import net.sf.l2j.gameserver.model.L2CharPosition;
     import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
    +import net.sf.l2j.gameserver.network.SystemMessageId;
     import net.sf.l2j.gameserver.network.serverpackets.ActionFailed;
     import net.sf.l2j.gameserver.network.serverpackets.PartyMemberPosition;
    +import net.sf.l2j.gameserver.network.serverpackets.SystemMessage;
     import net.sf.l2j.gameserver.templates.L2WeaponType;
    +import net.sf.l2j.gameserver.util.IllegalPlayerAction;
    +import net.sf.l2j.gameserver.util.Util;
     
     /**
    @@ -77,4 +81,7 @@
           {
              // ignore for now
    +         L2PcInstance activeChar = getClient().getActiveChar();
    +         activeChar.sendPacket(new SystemMessage(SystemMessageId.HACKING_TOOL));
    +         Util.handleIllegalPlayerAction(activeChar, "Player " + activeChar.getName() + " Tried to use L2Walker and Got Kicked!", IllegalPlayerAction.PUNISH_KICK);
           }
        }
    Index: /trunk/L2JHC-Game/src/main/java/net/sf/l2j/gameserver/network/clientpackets/AnswerTradeRequest.java
    ===================================================================
    --- /trunk/L2JHC-Game/src/main/java/net/sf/l2j/gameserver/network/clientpackets/AnswerTradeRequest.java (revision 275)
    +++ /trunk/L2JHC-Game/src/main/java/net/sf/l2j/gameserver/network/clientpackets/AnswerTradeRequest.java (revision 276)
    @@ -67,9 +67,16 @@
                player.sendPacket(msg);
              player.setActiveRequester(null);
    -         msg = null;
    +         player.setAllowTrade(true);
    +         partner.setAllowTrade(true);
    +         player.sendPacket(new ActionFailed());
                return;
            }
     
    -      if (_response == 1) player.startTrade(partner);
    +        if (_response == 1)
    +        {
    +           player.startTrade(partner);
    +           partner.setAllowTrade(true);
    +           player.setAllowTrade(true);
    +        }
           else
           {
    @@ -77,5 +84,6 @@
              msg.addString(player.getName());
              partner.sendPacket(msg);
    -         msg = null;
    +         player.setAllowTrade(true);
    +         player.sendPacket(new ActionFailed());
           }
     
    Index: /trunk/L2JHC-Game/src/main/java/net/sf/l2j/gameserver/network/clientpackets/RequestGiveItemToPet.java
    ===================================================================
    --- /trunk/L2JHC-Game/src/main/java/net/sf/l2j/gameserver/network/clientpackets/RequestGiveItemToPet.java (revision 275)
    +++ /trunk/L2JHC-Game/src/main/java/net/sf/l2j/gameserver/network/clientpackets/RequestGiveItemToPet.java (revision 276)
    @@ -26,4 +26,6 @@
     import net.sf.l2j.gameserver.network.SystemMessageId;
     import net.sf.l2j.gameserver.network.serverpackets.SystemMessage;
    +import net.sf.l2j.gameserver.util.IllegalPlayerAction;
    +import net.sf.l2j.gameserver.util.Util;
     
     /**
    @@ -53,4 +55,10 @@
            if (player == null || player.getPet() == null || !(player.getPet() instanceof L2PetInstance)) return;
     
    +        if (player.getActiveEnchantItem() != null)
    +        {
    +          Util.handleIllegalPlayerAction(player,"Player "+player.getName()+" Tried To Use Enchant Exploit And Got Banned!", IllegalPlayerAction.PUNISH_KICKBAN);
    +          return;
    +        }
    +       
            // Alt game - Karma punishment
            if (!Config.ALT_GAME_KARMA_PLAYER_CAN_TRADE && player.getKarma() > 0) return;
    Index: /trunk/L2JHC-Game/src/main/java/net/sf/l2j/gameserver/network/clientpackets/RequestRecordInfo.java
    ===================================================================
    --- /trunk/L2JHC-Game/src/main/java/net/sf/l2j/gameserver/network/clientpackets/RequestRecordInfo.java (revision 275)
    +++ /trunk/L2JHC-Game/src/main/java/net/sf/l2j/gameserver/network/clientpackets/RequestRecordInfo.java (revision 276)
    @@ -81,5 +81,5 @@
                 else if (object instanceof L2DoorInstance)
                 {
    -               _activeChar.sendPacket(new DoorInfo((L2DoorInstance) object));
    +               _activeChar.sendPacket(new DoorInfo((L2DoorInstance) object, false));
                    _activeChar.sendPacket(new DoorStatusUpdate((L2DoorInstance) object));
                 }
    Index: /trunk/L2JHC-Game/src/main/java/net/sf/l2j/gameserver/model/actor/instance/L2VillageMasterInstance.java
    ===================================================================
    --- /trunk/L2JHC-Game/src/main/java/net/sf/l2j/gameserver/model/actor/instance/L2VillageMasterInstance.java (revision 275)
    +++ /trunk/L2JHC-Game/src/main/java/net/sf/l2j/gameserver/model/actor/instance/L2VillageMasterInstance.java (revision 276)
    @@ -558,5 +558,5 @@
              return;
           }
    -      clan.setNewLeader(member);
    +      clan.setNewLeader(member,player);
        }
     
    Index: /trunk/L2JHC-Game/src/main/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java
    ===================================================================
    --- /trunk/L2JHC-Game/src/main/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (revision 275)
    +++ /trunk/L2JHC-Game/src/main/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (revision 276)
    @@ -506,5 +506,7 @@
        private int _apprentice = 0;
        private int _sponsor = 0;
    -
    +   
    +    public boolean _allowTrade = true;
    +   
        private long _clanJoinExpiryTime;
        private long _clanCreateExpiryTime;
    @@ -6829,4 +6831,6 @@
              if (isInOlympiadMode() && isOlympiadStart() && ((L2PcInstance)attacker).getOlympiadGameId()==getOlympiadGameId())
                 return true;
    +         if (isFakeDeath())
    +            return false;
              else
                 return false;
    @@ -7816,5 +7820,15 @@
           _clanPrivileges = n;
        }
    -
    +   
    +   public boolean getAllowTrade()
    +   {
    +      return _allowTrade;
    +   }
    +      
    +   public void setAllowTrade(boolean a)
    +   {
    +      _allowTrade = a;
    +   }
    +   
        // baron etc
        public void setPledgeClass(int classId)
    Index: /trunk/L2JHC-Game/src/main/java/net/sf/l2j/gameserver/model/actor/knownlist/PcKnownList.java
    ===================================================================
    --- /trunk/L2JHC-Game/src/main/java/net/sf/l2j/gameserver/model/actor/knownlist/PcKnownList.java (revision 275)
    +++ /trunk/L2JHC-Game/src/main/java/net/sf/l2j/gameserver/model/actor/knownlist/PcKnownList.java (revision 276)
    @@ -114,5 +114,5 @@
                else if (object instanceof L2DoorInstance)
                {
    -                getActiveChar().sendPacket(new DoorInfo((L2DoorInstance) object));
    +                getActiveChar().sendPacket(new DoorInfo((L2DoorInstance) object, false));
                    getActiveChar().sendPacket(new DoorStatusUpdate((L2DoorInstance) object));
                }
    Index: /trunk/L2JHC-Game/src/main/java/net/sf/l2j/gameserver/model/actor/stat/CharStat.java
    ===================================================================
    --- /trunk/L2JHC-Game/src/main/java/net/sf/l2j/gameserver/model/actor/stat/CharStat.java (revision 249)
    +++ /trunk/L2JHC-Game/src/main/java/net/sf/l2j/gameserver/model/actor/stat/CharStat.java (revision 276)
    @@ -238,5 +238,5 @@
        }
     
    -   public final int getMaxCp()
    +   public int getMaxCp()
        {
           if (_activeChar == null)
    Index: /trunk/L2JHC-Game/src/main/java/net/sf/l2j/gameserver/model/actor/stat/PcStat.java
    ===================================================================
    --- /trunk/L2JHC-Game/src/main/java/net/sf/l2j/gameserver/model/actor/stat/PcStat.java (revision 275)
    +++ /trunk/L2JHC-Game/src/main/java/net/sf/l2j/gameserver/model/actor/stat/PcStat.java (revision 276)
    @@ -45,5 +45,6 @@
        private int _oldMaxHp;      // stats watch
        private int _oldMaxMp;      // stats watch
    -
    +    private int _oldMaxCp;      // stats watch
    +   
        // =========================================================
        // Constructor
    @@ -304,4 +305,19 @@
     
        @Override
    +    public final int getMaxCp()
    +    {
    +       int val = super.getMaxCp();
    +       if (val != _oldMaxCp)
    +       {
    +          _oldMaxCp = val;
    +          if (getActiveChar().getStatus().getCurrentCp() != val)
    +          {
    +             getActiveChar().getStatus().setCurrentCp(getActiveChar().getStatus().getCurrentCp());
    +          }
    +       }
    +       return val;
    +    }
    +
    +    @Override
        public final int getMaxHp()
        {
    Index: /trunk/L2JHC-Game/src/main/java/net/sf/l2j/gameserver/model/L2Clan.java
    ===================================================================
    --- /trunk/L2JHC-Game/src/main/java/net/sf/l2j/gameserver/model/L2Clan.java (revision 275)
    +++ /trunk/L2JHC-Game/src/main/java/net/sf/l2j/gameserver/model/L2Clan.java (revision 276)
    @@ -37,4 +37,5 @@
     import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
     import net.sf.l2j.gameserver.network.SystemMessageId;
    +import net.sf.l2j.gameserver.network.serverpackets.ActionFailed;
     import net.sf.l2j.gameserver.network.serverpackets.ItemList;
     import net.sf.l2j.gameserver.network.serverpackets.L2GameServerPacket;
    @@ -221,6 +222,12 @@
        }
     
    -   public void setNewLeader(L2ClanMember member)
    -   {
    +   public void setNewLeader(L2ClanMember member, L2PcInstance activeChar)
    +   {
    +      if (activeChar.isRiding() || activeChar.isFlying() || activeChar.isMounted())
    +      {
    +      activeChar.sendMessage("You Cannot set a New Leader now!");
    +      activeChar.sendPacket(new ActionFailed());
    +      }
    +      
            if (!getLeader().isOnline())
            {
    @@ -299,4 +306,5 @@
           member.setPlayerInstance(player);
           player.setClan(this);
    +      player.rewardSkills();
           player.setPledgeClass(member.calculatePledgeClass(player));
           player.sendPacket(new PledgeShowMemberListUpdate(player));
    @@ -384,4 +392,6 @@
                   player.setClanCreateExpiryTime(System.currentTimeMillis() + Config.ALT_CLAN_CREATE_DAYS * 86400000L); //24*60*60*1000 = 86400000
              }
    +         for (L2Skill skill : player.getClan().getAllSkills()) 
    +              player.removeSkill(skill, false);
              player.setClan(null);
              player.setClanJoinExpiryTime(clanJoinExpiryTime);

      Текущее время Чт Ноя 21, 2024 12:04 am