A Project for Chronicle 4 based on L2JServer.


    [Patch] [Done] RB with minions or another pack mobs ignore agr

    Share
    avatar
    Pret

    Posts : 63
    Join date : 2013-11-04
    Age : 31

    [Patch] [Done] RB with minions or another pack mobs ignore agr

    Post  Pret on 16th June 2014, 15:47

    Problem: when we use agr on RB or Minions another party mob ignore this agr.

    Solved:
    Code:

    Index: java/net/sf/l2j/gameserver/handler/skillhandlers/Disablers.java
    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
    ===================================================================
    --- java/net/sf/l2j/gameserver/handler/skillhandlers/Disablers.java   (revision 484)
    +++ java/net/sf/l2j/gameserver/handler/skillhandlers/Disablers.java   (revision )
    @@ -30,7 +30,7 @@
     import net.sf.l2j.gameserver.model.actor.instance.L2MonsterInstance;
     import net.sf.l2j.gameserver.model.actor.instance.L2NpcInstance;
     import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
    -import net.sf.l2j.gameserver.model.actor.instance.L2PlayableInstance;
    +import net.sf.l2j.gameserver.model.actor.instance.L2MinionInstance;
     import net.sf.l2j.gameserver.serverpackets.SystemMessage;
     import net.sf.l2j.gameserver.skills.Formulas;
     import net.sf.l2j.gameserver.skills.Stats;
    @@ -278,7 +278,31 @@
                     case AGGDAMAGE:
                     {
                         if (target instanceof L2MonsterInstance)
    +                    {
    +                        if (((L2MonsterInstance) target).hasMinions())
    +                        {
    +                            for (L2MinionInstance l2MinionInstance : ((L2MonsterInstance) target).getSpawnedMinions())
    +                            {
    +                                l2MinionInstance.getAI()
    +                                        .notifyEvent(CtrlEvent.EVT_AGGRESSION, activeChar, (int) skill.getPower());
    +                            }
    +                        }
    +                        else if (target instanceof L2MinionInstance)
    +                        {
    +                            for (L2MinionInstance l2MinionInstance : ((L2MinionInstance) target).getLeader()
    +                                    .getSpawnedMinions())
    +                            {
    +                                l2MinionInstance.getAI()
    +                                        .notifyEvent(CtrlEvent.EVT_AGGRESSION, activeChar, (int) skill.getPower());
    +                            }
    +                            ((L2MinionInstance) target).getLeader().getAI()
    +                                    .notifyEvent(CtrlEvent.EVT_AGGRESSION, activeChar, (int) skill.getPower());
    +                        }
    +                        else
    +                        {
    -                        target.getAI().notifyEvent(CtrlEvent.EVT_AGGRESSION, activeChar, (int) skill.getPower());
    +                            target.getAI().notifyEvent(CtrlEvent.EVT_AGGRESSION, activeChar, (int) skill.getPower());
    +                        }
    +                    }
     
                         skill.getEffects(activeChar, target);
     


    Last edited by Pret on 2nd July 2014, 13:49; edited 1 time in total
    avatar
    DnR
    Admin
    Admin

    Posts : 1027
    Join date : 2012-12-03

    Re: [Patch] [Done] RB with minions or another pack mobs ignore agr

    Post  DnR on 21st June 2014, 15:16

    This code could work, but you missed AGGDEBUFF type.
    Anyway, it's not just aggression, but all spells.
    I figured out that putting the old code for damage to the right place solves the problem.
    Thanks a lot for reporting. Smile
    avatar
    Pret

    Posts : 63
    Join date : 2013-11-04
    Age : 31

    Re: [Patch] [Done] RB with minions or another pack mobs ignore agr

    Post  Pret on 21st June 2014, 23:29

    Thanks.

    Sponsored content

    Re: [Patch] [Done] RB with minions or another pack mobs ignore agr

    Post  Sponsored content


      Current date/time is 22nd October 2017, 01:52