A Project for Chronicle 4 based on L2JServer.


    Raid Boss protection (vs. high lvl players)

    Share
    avatar
    Karakan

    Posts : 428
    Join date : 2013-10-04

    Raid Boss protection (vs. high lvl players)

    Post  Karakan on 25th January 2015, 02:25

    High level players who get to close to a raid boss now gets magical/physical silenced.

    This is to prevent bishop/healers "tank" low level raids.


    Code:
    Index: D:/workspace/Lisvus_GameServer/java/net/sf/l2j/gameserver/ai/L2AttackableAI.java
    ===================================================================
    --- D:/workspace/Lisvus_GameServer/java/net/sf/l2j/gameserver/ai/L2AttackableAI.java   (revision 507)
    +++ D:/workspace/Lisvus_GameServer/java/net/sf/l2j/gameserver/ai/L2AttackableAI.java   (working copy)
    @@ -29,6 +29,7 @@
     import net.sf.l2j.gameserver.GeoData;
     import net.sf.l2j.gameserver.Territory;
     import net.sf.l2j.gameserver.ThreadPoolManager;
    +import net.sf.l2j.gameserver.datatables.SkillTable;
     import net.sf.l2j.gameserver.instancemanager.DimensionalRiftManager;
     import net.sf.l2j.gameserver.lib.Rnd;
     import net.sf.l2j.gameserver.model.L2Attackable;

    @@ -55,6 +56,7 @@
     import net.sf.l2j.gameserver.model.actor.instance.L2RiftInvaderInstance;
     import net.sf.l2j.gameserver.templates.L2Weapon;
     import net.sf.l2j.gameserver.templates.L2WeaponType;
    +import net.sf.l2j.gameserver.util.Util;
      /**
      * This class manages AI of L2Attackable.<BR><BR>



    @@ -396,7 +403,28 @@
     
                        if (!(targetPlayer.isFestivalParticipant())) continue;
                    }
    -
    +            // Raid curse      
    +            if (_actor.isRaid() && obj instanceof L2Summon)
    +            {
    +               if ((((L2Summon)obj).getLevel() > _actor.getLevel() + 8)
    +                  && (Util.checkIfInRange(200, _actor, obj, true)))
    +               {
    +                  L2Skill tempSkill = SkillTable.getInstance().getInfo(4215, 1);
    +                  if(tempSkill != null)
    +                     tempSkill.getEffects(_actor, (L2Character)obj);
    +               }
    +            }
    +            if (_actor.isRaid() && obj instanceof L2PcInstance)
    +            {
    +               if ((((L2PcInstance)obj).getLevel() > _actor.getLevel() + 8)
    +                  && (Util.checkIfInRange(200, _actor, obj, true)))
    +               {   
    +                  L2Skill tempSkill = SkillTable.getInstance().getInfo(4215, 1);
    +                  if(tempSkill != null)
    +                     tempSkill.getEffects(_actor, (L2Character)obj);
    +               }
    +            }            
    +            
                    // For each L2Character check if the target is autoattackable
                    if (autoAttackCondition(target)) // check aggression
                    {

      Current date/time is 18th November 2017, 19:25