A Project for Chronicle 4 based on L2JServer.


    Zaken exploit fix

    Share
    avatar
    Karakan

    Posts : 421
    Join date : 2013-10-04

    Zaken exploit fix

    Post  Karakan on 24th January 2015, 21:29

    Code:
    Index: D:/workspace/Lisvus_GameServer/java/net/sf/l2j/gameserver/model/L2Character.java
    ===================================================================
    --- D:/workspace/Lisvus_GameServer/java/net/sf/l2j/gameserver/model/L2Character.java   (revision 507)
    +++ D:/workspace/Lisvus_GameServer/java/net/sf/l2j/gameserver/model/L2Character.java   (working copy)
    @@ -53,6 +53,7 @@
     import net.sf.l2j.gameserver.model.actor.instance.L2DoorInstance;
     import net.sf.l2j.gameserver.model.actor.instance.L2FriendlyMobInstance;
     import net.sf.l2j.gameserver.model.actor.instance.L2GuardInstance;
    +import net.sf.l2j.gameserver.model.actor.instance.L2GrandBossInstance;
     import net.sf.l2j.gameserver.model.actor.instance.L2MinionInstance;
     import net.sf.l2j.gameserver.model.actor.instance.L2MonsterInstance;
     import net.sf.l2j.gameserver.model.actor.instance.L2NpcInstance;
    @@ -615,6 +616,20 @@
                sendPacket(new ActionFailed());
                return;
            }
    +      
    +      /*
    +       * TEMPFIX: Check client Z coordinate instead of server
    +       *  z to avoid exploit killing Zaken from others floor
    +       */
    +      if ((target instanceof L2GrandBossInstance)
    +         && ((L2GrandBossInstance) target).getNpcId() == 12374) {
    +         if (Math.abs(this.getClientZ() - target.getZ()) > 200) {
    +            sendPacket(new SystemMessage(SystemMessage.CANT_SEE_TARGET));
    +            getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
    +            sendPacket(new ActionFailed());
    +            return;
    +         }
    +      }
     
            // GeoData Los Check here (or dz > 1000)
            if (!GeoData.getInstance().canSeeTarget(this, target))

      Current date/time is 24th September 2017, 11:25