Guest User

Untitled

a guest
Jan 27th, 2011
539
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 91.41 KB | None | 0 0
  1. Index: java/net/sf/l2j/gameserver/skills/effects/EffectMute.java
  2. ===================================================================
  3. --- java/net/sf/l2j/gameserver/skills/effects/EffectMute.java   (revision 4415)
  4. +++ java/net/sf/l2j/gameserver/skills/effects/EffectMute.java   (working copy)
  5. @@ -35,8 +35,10 @@
  6.     }
  7.  
  8.     @Override
  9. -   public void onStart() {
  10. +   public boolean onStart()
  11. +   {
  12.         getEffected().startMuted();
  13. +                return true;
  14.     }
  15.  
  16.     @Override
  17. Index: java/net/sf/l2j/gameserver/skills/effects/EffectSignetEffect.java
  18. ===================================================================
  19. --- java/net/sf/l2j/gameserver/skills/effects/EffectSignetEffect.java   (revision 0)
  20. +++ java/net/sf/l2j/gameserver/skills/effects/EffectSignetEffect.java   (revision 0)
  21. @@ -0,0 +1,46 @@
  22. +/*
  23. + * This program is free software; you can redistribute it and/or modify
  24. + * it under the terms of the GNU General Public License as published by
  25. + * the Free Software Foundation; either version 2, or (at your option)
  26. + * any later version.
  27. + *
  28. + * This program is distributed in the hope that it will be useful,
  29. + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  30. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  31. + * GNU General Public License for more details.
  32. + *
  33. + * You should have received a copy of the GNU General Public License
  34. + * along with this program; if not, write to the Free Software
  35. + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  36. + * 02111-1307, USA.
  37. + *
  38. + * http://www.gnu.org/copyleft/gpl.html
  39. + */
  40. +package net.sf.l2j.gameserver.skills.effects;
  41. +
  42. +import net.sf.l2j.gameserver.model.L2Effect;
  43. +import net.sf.l2j.gameserver.skills.Env;
  44. +
  45. +/**
  46. + * @author Forsaiken
  47. + */
  48. +
  49. +public class EffectSignetEffect extends L2Effect
  50. +{
  51. +   public EffectSignetEffect(Env env, EffectTemplate template)
  52. +   {
  53. +       super(env, template);
  54. +   }
  55. +  
  56. +   @Override
  57. +   public EffectType getEffectType()
  58. +   {
  59. +       return EffectType.SIGNET_EFFECT;
  60. +   }
  61. +  
  62. +   @Override
  63. +   public boolean onActionTime()
  64. +        {
  65. +              return true;
  66. +        }
  67. +}
  68. Index: java/net/sf/l2j/gameserver/skills/effects/EffectProtectionBlessing.java
  69. ===================================================================
  70. --- java/net/sf/l2j/gameserver/skills/effects/EffectProtectionBlessing.java (revision 0)
  71. +++ java/net/sf/l2j/gameserver/skills/effects/EffectProtectionBlessing.java (revision 0)
  72. @@ -0,0 +1,67 @@
  73. +/* This program is free software; you can redistribute it and/or modify
  74. + * it under the terms of the GNU General Public License as published by
  75. + * the Free Software Foundation; either version 2, or (at your option)
  76. + * any later version.
  77. + *
  78. + * This program is distributed in the hope that it will be useful,
  79. + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  80. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  81. + * GNU General Public License for more details.
  82. + *
  83. + * You should have received a copy of the GNU General Public License
  84. + * along with this program; if not, write to the Free Software
  85. + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  86. + * 02111-1307, USA.
  87. + *
  88. + * http://www.gnu.org/copyleft/gpl.html
  89. + */
  90. +package net.sf.l2j.gameserver.skills.effects;
  91. +    
  92. +import net.sf.l2j.gameserver.model.L2Effect;
  93. +import net.sf.l2j.gameserver.model.actor.instance.L2PlayableInstance;
  94. +import net.sf.l2j.gameserver.skills.Env;
  95. +    
  96. +/**
  97. + * @author kerberos_20
  98. + *
  99. + */
  100. +public class EffectProtectionBlessing extends L2Effect
  101. +{
  102. +       public EffectProtectionBlessing(Env env, EffectTemplate template)
  103. +       {
  104. +              super(env, template);
  105. +       }
  106. +
  107. +       @Override
  108. +       public EffectType getEffectType()
  109. +       {
  110. +              return EffectType.PROTECTION_BLESSING;
  111. +       }
  112. +      
  113. +       /** Notify started */
  114. +       @Override
  115. +       public boolean onStart()
  116. +       {
  117. +       if (getEffected() instanceof L2PlayableInstance)
  118. +       {
  119. +           ((L2PlayableInstance) getEffected()).startProtectionBlessing();
  120. +           return true;
  121. +       }
  122. +       return false;
  123. +       }
  124. +      
  125. +       /** Notify exited */
  126. +       @Override
  127. +       public void onExit()
  128. +       {
  129. +              if (getEffected() instanceof L2PlayableInstance)
  130. +                     ((L2PlayableInstance)getEffected()).stopProtectionBlessing (this);
  131. +       }
  132. +      
  133. +      @Override
  134. +       public boolean onActionTime()
  135. +       {
  136. +         // just stop this effect
  137. +         return false;
  138. +       }
  139. +}
  140. \ No newline at end of file
  141. Index: java/net/sf/l2j/gameserver/skills/effects/EffectFakeDeath.java
  142. ===================================================================
  143. --- java/net/sf/l2j/gameserver/skills/effects/EffectFakeDeath.java  (revision 4415)
  144. +++ java/net/sf/l2j/gameserver/skills/effects/EffectFakeDeath.java  (working copy)
  145. @@ -29,7 +29,8 @@
  146.   * TODO To change the template for this generated type comment go to
  147.   * Window - Preferences - Java - Code Style - Code Templates
  148.   */
  149. -final class EffectFakeDeath extends L2Effect {
  150. +public class EffectFakeDeath extends L2Effect
  151. +{
  152.  
  153.     public EffectFakeDeath(Env env, EffectTemplate template)
  154.     {
  155. @@ -44,19 +45,22 @@
  156.  
  157.     /** Notify started */
  158.     @Override
  159. -   public void onStart() {
  160. +   public boolean onStart()
  161. +   {
  162.         getEffected().startFakeDeath();
  163. +                return true;
  164.     }
  165.  
  166.     /** Notify exited */
  167.     @Override
  168. -   public void onExit() {
  169. +   public void onExit()
  170. +        {
  171.         getEffected().stopFakeDeath(this);
  172.     }
  173.  
  174. -    @Override
  175. +        @Override
  176.     public boolean onActionTime()
  177. -    {
  178. +        {
  179.         if(getEffected().isDead())
  180.             return false;
  181.  
  182. @@ -74,7 +78,7 @@
  183.  
  184.         getEffected().reduceCurrentMp(manaDam);
  185.         return true;
  186. -    }
  187. +        }
  188.  }
  189.  
  190.  
  191. Index: java/net/sf/l2j/gameserver/skills/effects/EffectFear.java
  192. ===================================================================
  193. --- java/net/sf/l2j/gameserver/skills/effects/EffectFear.java   (revision 4415)
  194. +++ java/net/sf/l2j/gameserver/skills/effects/EffectFear.java   (working copy)
  195. @@ -34,7 +34,7 @@
  196.   *
  197.   * Implementation of the Fear Effect
  198.   */
  199. -final class EffectFear extends L2Effect
  200. +public class EffectFear extends L2Effect
  201.  {
  202.     public static final int FEAR_RANGE = 500;
  203.  
  204. @@ -51,14 +51,15 @@
  205.  
  206.     /** Notify started */
  207.     @Override
  208. -   public void onStart()
  209. +   public boolean onStart()
  210.     {
  211. -       if (!getEffected().isAfraid())
  212. -       {
  213. -           getEffected().startFear();
  214. -           onActionTime();
  215. +           if (!getEffected().isAfraid())
  216. +           {
  217. +               getEffected().startFear();
  218. +               onActionTime();
  219. +           }
  220. +           return true;
  221.         }
  222. -   }
  223.    
  224.     /** Notify exited */
  225.     @Override
  226. @@ -96,4 +97,4 @@
  227.         getEffected().getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO,new L2CharPosition(posX,posY,posZ,0));
  228.         return true;
  229.     }
  230. -}
  231. +}
  232. \ No newline at end of file
  233. Index: java/net/sf/l2j/gameserver/skills/effects/EffectBluff.java
  234. ===================================================================
  235. --- java/net/sf/l2j/gameserver/skills/effects/EffectBluff.java  (revision 4415)
  236. +++ java/net/sf/l2j/gameserver/skills/effects/EffectBluff.java  (working copy)
  237. @@ -24,6 +24,8 @@
  238.  import net.sf.l2j.gameserver.model.actor.instance.L2FolkInstance;
  239.  import net.sf.l2j.gameserver.model.actor.instance.L2NpcInstance;
  240.  import net.sf.l2j.gameserver.model.actor.instance.L2SiegeSummonInstance;
  241. +import net.sf.l2j.gameserver.serverpackets.BeginRotation;
  242. +import net.sf.l2j.gameserver.serverpackets.StopRotation;
  243.  import net.sf.l2j.gameserver.serverpackets.SystemMessage;
  244.  import net.sf.l2j.gameserver.skills.Env;
  245.  
  246. @@ -32,7 +34,8 @@
  247.   *
  248.   * Implementation of the Bluff Effect
  249.   */
  250. -final class EffectBluff extends L2Effect {
  251. +public class EffectBluff extends L2Effect
  252. +{
  253.  
  254.      public EffectBluff(Env env, EffectTemplate template)
  255.      {
  256. @@ -40,54 +43,37 @@
  257.      }
  258.  
  259.      @Override
  260. -   public EffectType getEffectType()
  261. +    public EffectType getEffectType()
  262.      {
  263.          return EffectType.BLUFF; //test for bluff effect
  264.      }
  265.  
  266.      /** Notify started */
  267.      @Override
  268. -   public void onStart()
  269. +    public boolean onStart()
  270.      {
  271. -        getEffected().startFear();
  272. -       if(getEffected() instanceof L2FolkInstance) return;
  273. -       // if(getEffected() instanceof L2SiegeGuardInstance) return;
  274. +       if (getEffected() instanceof L2FolkInstance) return false;
  275. +       // if (getEffected() instanceof L2SiegeGuardInstance) return;
  276.         // Cannot be used on Headquarters Flag.
  277.         // bluff now is a PVE PVP skill
  278. -       if(getEffected() instanceof L2NpcInstance && ((L2NpcInstance)getEffected()).getNpcId() == 35062 || getSkill().getId() != 358) return;
  279. +       if (getEffected() instanceof L2NpcInstance && ((L2NpcInstance)getEffected()).getNpcId() == 35062 || getSkill().getId() != 358)
  280. +           return false;
  281.  
  282. -       if(getEffected() instanceof L2SiegeSummonInstance)
  283. -       {
  284. -           return;
  285. -       }
  286. -        int posX = getEffected().getX();
  287. -        int posY = getEffected().getY();
  288. -        int posZ = getEffected().getZ();
  289. -        int signx=-1;
  290. -        int signy=-1;
  291. -        if (getEffected().getX()>getEffector().getX())
  292. -            signx=1;
  293. -        if (getEffected().getY()>getEffector().getY())
  294. -            signy=1;
  295. -
  296. -        //posX += signx*40; //distance less than melee attacks (40)
  297. -        //posY += signy*40;
  298. -
  299. -        getEffected().setRunning();
  300. -        getEffected().getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO,
  301. -                              new L2CharPosition(posX +(signx*40),posY + (signy*40),posZ,0));
  302. -        getEffected().sendPacket(SystemMessage.sendString("You can feel Bluff's effect"));
  303. -        getEffected().setTarget(null);
  304. -        onActionTime();
  305. +       if (getEffected() instanceof L2SiegeSummonInstance)
  306. +           return false;
  307. +      
  308. +       getEffected().broadcastPacket(new BeginRotation(getEffected().getObjectId(), getEffected().getHeading(), 1, 65535));
  309. +   getEffected().broadcastPacket(new StopRotation(getEffected().getObjectId(), getEffector().getHeading(), 65535));
  310. +   getEffected().setHeading(getEffector().getHeading());  
  311. +           return true;
  312.      }
  313.      @Override
  314. -   public void onExit()
  315. +    public void onExit()
  316.      {
  317.          getEffected().stopFear(this);
  318. -
  319.      }
  320.      @Override
  321. -   public boolean onActionTime()
  322. +    public boolean onActionTime()
  323.      {
  324.          return false;
  325.      }
  326. Index: java/net/sf/l2j/gameserver/skills/effects/EffectSignetNoise.java
  327. ===================================================================
  328. --- java/net/sf/l2j/gameserver/skills/effects/EffectSignetNoise.java    (revision 0)
  329. +++ java/net/sf/l2j/gameserver/skills/effects/EffectSignetNoise.java    (revision 0)
  330. @@ -0,0 +1,56 @@
  331. +/*
  332. + * This program is free software; you can redistribute it and/or modify
  333. + * it under the terms of the GNU General Public License as published by
  334. + * the Free Software Foundation; either version 2, or (at your option)
  335. + * any later version.
  336. + *
  337. + * This program is distributed in the hope that it will be useful,
  338. + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  339. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  340. + * GNU General Public License for more details.
  341. + *
  342. + * You should have received a copy of the GNU General Public License
  343. + * along with this program; if not, write to the Free Software
  344. + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  345. + * 02111-1307, USA.
  346. + *
  347. + * http://www.gnu.org/copyleft/gpl.html
  348. + */
  349. +package net.sf.l2j.gameserver.skills.effects;
  350. +
  351. +import net.sf.l2j.gameserver.model.L2Effect;
  352. +import net.sf.l2j.gameserver.model.L2Character;
  353. +import net.sf.l2j.gameserver.skills.Env;
  354. +
  355. +/**
  356. + * @author Forsaiken
  357. + */
  358. +
  359. +public class EffectSignetNoise extends EffectSignet
  360. +{
  361. +    public EffectSignetNoise(Env env, EffectTemplate template)
  362. +    {
  363. +        super(env, template);
  364. +    }
  365. +    
  366. +    @Override
  367. +    public EffectType getEffectType()
  368. +    {
  369. +        return EffectType.SIGNET_GROUND;
  370. +    }
  371. +    
  372. +    @Override
  373. +    public boolean onActionTime()
  374. +    {
  375. +       for (L2Character character : zone.getCharactersInZone())
  376. +       {
  377. +           for (L2Effect effect : character.getAllEffects())
  378. +            {
  379. +                if (effect.getSkill().isDance())
  380. +                    effect.exit();
  381. +            }
  382. +       }
  383. +        
  384. +        return true;
  385. +    }
  386. +}
  387. \ No newline at end of file
  388. Index: java/net/sf/l2j/gameserver/skills/effects/EffectConfuseMob.java
  389. ===================================================================
  390. --- java/net/sf/l2j/gameserver/skills/effects/EffectConfuseMob.java (revision 4415)
  391. +++ java/net/sf/l2j/gameserver/skills/effects/EffectConfuseMob.java (working copy)
  392. @@ -35,7 +35,8 @@
  393.   *
  394.   * Implementation of the Confusion Effect
  395.   */
  396. -final class EffectConfuseMob extends L2Effect {
  397. +public class EffectConfuseMob extends L2Effect
  398. +{
  399.  
  400.     public EffectConfuseMob(Env env, EffectTemplate template)
  401.     {
  402. @@ -50,19 +51,22 @@
  403.  
  404.     /** Notify started */
  405.     @Override
  406. -   public void onStart() {
  407. +   public boolean onStart()
  408. +   {
  409.         getEffected().startConfused();
  410.         onActionTime();
  411. +                return true;
  412.     }
  413.  
  414.     /** Notify exited */
  415.     @Override
  416. -   public void onExit() {
  417. +   public void onExit()
  418. +        {
  419.         getEffected().stopConfused(this);
  420.     }
  421.  
  422.      @Override
  423. -   public boolean onActionTime()
  424. +    public boolean onActionTime()
  425.      {
  426.         List<L2Character> targetList = new FastList<L2Character>();
  427.  
  428. Index: java/net/sf/l2j/gameserver/skills/effects/EffectBetray.java
  429. ===================================================================
  430. --- java/net/sf/l2j/gameserver/skills/effects/EffectBetray.java (revision 4415)
  431. +++ java/net/sf/l2j/gameserver/skills/effects/EffectBetray.java (working copy)
  432. @@ -44,27 +44,29 @@
  433.  
  434.      /** Notify started */
  435.      @Override
  436. -    public void onStart()
  437. +    public boolean onStart()
  438.      {
  439. -        if ( getEffected() != null && getEffector() instanceof L2PcInstance && getEffected() instanceof L2Summon)
  440. +        if (getEffected() != null && getEffector() instanceof L2PcInstance && getEffected() instanceof L2Summon)
  441.          {
  442.              L2PcInstance targetOwner = null;
  443.              targetOwner = ((L2Summon)getEffected()).getOwner();
  444.              getEffected().getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK,targetOwner);
  445.              targetOwner.setIsBetrayed(true);
  446.              onActionTime();
  447. +            return true;
  448.          }
  449. -        }
  450. +        return false;
  451. +    }
  452.       /** Notify exited */
  453.      @Override
  454.      public void onExit()
  455.      {
  456. -        if ( getEffected() != null && getEffector() instanceof L2PcInstance && getEffected() instanceof L2Summon)
  457. +        if (getEffected() != null && getEffector() instanceof L2PcInstance && getEffected() instanceof L2Summon)
  458.          {
  459.              L2PcInstance targetOwner = null;
  460.              targetOwner = ((L2Summon)getEffected()).getOwner();
  461.              targetOwner.setIsBetrayed(false);
  462. -        getEffected().getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
  463. +            getEffected().getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
  464.          }
  465.      }
  466.  
  467. Index: java/net/sf/l2j/gameserver/skills/effects/EffectDamOverTime.java
  468. ===================================================================
  469. --- java/net/sf/l2j/gameserver/skills/effects/EffectDamOverTime.java    (revision 4415)
  470. +++ java/net/sf/l2j/gameserver/skills/effects/EffectDamOverTime.java    (working copy)
  471. @@ -25,7 +25,7 @@
  472.  import net.sf.l2j.gameserver.serverpackets.SystemMessage;
  473.  import net.sf.l2j.gameserver.skills.Env;
  474.  
  475. -class EffectDamOverTime extends L2Effect
  476. +public class EffectDamOverTime extends L2Effect
  477.  {
  478.     public EffectDamOverTime(Env env, EffectTemplate template)
  479.     {
  480. @@ -44,9 +44,19 @@
  481.         if (getEffected().isDead())
  482.             return false;
  483.  
  484. +                if (!getSkill().isToggle())
  485. +       {
  486. +           L2Effect[] effects = getEffected().getAllEffects();
  487. +           for (L2Effect e : effects)
  488. +           {
  489. +               if (e.getStackType().equals("sleep"))
  490. +                   e.exit();
  491. +           }
  492. +       }
  493. +
  494.         double damage = calc();
  495.  
  496. -       if (damage >= getEffected().getCurrentHp())
  497. +       if (damage >= getEffected().getCurrentHp()-1)
  498.         {
  499.             if (getSkill().isToggle())
  500.             {
  501. @@ -61,11 +71,8 @@
  502.              if (getSkill().getId() != 4082) damage = getEffected().getCurrentHp() - 1;
  503.         }
  504.  
  505. -        boolean awake = !(getEffected() instanceof L2Attackable)
  506. -                           && !(getSkill().getTargetType() == SkillTargetType.TARGET_SELF
  507. -                                   && getSkill().isToggle());
  508. +        boolean awake = !(getEffected() instanceof L2Attackable) && !(getSkill().getTargetType() == SkillTargetType.TARGET_SELF && getSkill().isToggle());
  509.  
  510. -
  511.          getEffected().reduceCurrentHp(damage, getEffector(),awake);
  512.  
  513.         return true;
  514. Index: java/net/sf/l2j/gameserver/skills/effects/EffectDebuff.java
  515. ===================================================================
  516. --- java/net/sf/l2j/gameserver/skills/effects/EffectDebuff.java (revision 0)
  517. +++ java/net/sf/l2j/gameserver/skills/effects/EffectDebuff.java (revision 0)
  518. @@ -0,0 +1,40 @@
  519. +/*
  520. + * This program is free software: you can redistribute it and/or modify it under
  521. + * the terms of the GNU General Public License as published by the Free Software
  522. + * Foundation, either version 3 of the License, or (at your option) any later
  523. + * version.
  524. + *
  525. + * This program is distributed in the hope that it will be useful, but WITHOUT
  526. + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  527. + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
  528. + * details.
  529. + *
  530. + * You should have received a copy of the GNU General Public License along with
  531. + * this program. If not, see <http://www.gnu.org/licenses/>.
  532. + */
  533. +package net.sf.l2j.gameserver.skills.effects;
  534. +
  535. +import net.sf.l2j.gameserver.model.L2Effect;
  536. +import net.sf.l2j.gameserver.skills.Env;
  537. +
  538. +public class EffectDebuff extends L2Effect
  539. +{
  540. +
  541. +   public EffectDebuff(Env env, EffectTemplate template)
  542. +   {
  543. +       super(env, template);
  544. +   }
  545. +
  546. +   @Override
  547. +   public EffectType getEffectType()
  548. +   {
  549. +       return EffectType.DEBUFF;
  550. +   }
  551. +
  552. +   @Override
  553. +   public boolean onActionTime()
  554. +   {
  555. +       // just stop this effect
  556. +       return false;
  557. +   }
  558. +}
  559. Index: java/net/sf/l2j/gameserver/skills/effects/EffectGrow.java
  560. ===================================================================
  561. --- java/net/sf/l2j/gameserver/skills/effects/EffectGrow.java   (revision 4415)
  562. +++ java/net/sf/l2j/gameserver/skills/effects/EffectGrow.java   (working copy)
  563. @@ -5,7 +5,8 @@
  564.  import net.sf.l2j.gameserver.model.actor.instance.L2NpcInstance;
  565.  import net.sf.l2j.gameserver.skills.Env;
  566.  
  567. -public class EffectGrow extends L2Effect {
  568. +public class EffectGrow extends L2Effect
  569. +{
  570.  
  571.    
  572.     public EffectGrow(Env env, EffectTemplate template)
  573. @@ -20,7 +21,7 @@
  574.     }
  575.    
  576.     @Override
  577. -   public void onStart()
  578. +   public boolean onStart()
  579.     {
  580.         if(getEffected() instanceof L2NpcInstance)
  581.         {
  582. @@ -29,7 +30,9 @@
  583.             npc.setCollisionRadius((int)(npc.getCollisionRadius()*1.19));
  584.            
  585.             getEffected().startAbnormalEffect(L2Character.ABNORMAL_EFFECT_GROW);
  586. +                        return true;
  587.         }
  588. +                return false;
  589.     }
  590.    
  591.     @Override
  592. Index: java/net/sf/l2j/gameserver/skills/effects/EffectCancelTarget.java
  593. ===================================================================
  594. --- java/net/sf/l2j/gameserver/skills/effects/EffectCancelTarget.java   (revision 0)
  595. +++ java/net/sf/l2j/gameserver/skills/effects/EffectCancelTarget.java   (revision 0)
  596. @@ -0,0 +1,71 @@
  597. +/*
  598. + * This program is free software; you can redistribute it and/or modify
  599. + * it under the terms of the GNU General Public License as published by
  600. + * the Free Software Foundation; either version 2, or (at your option)
  601. + * any later version.
  602. + *
  603. + * This program is distributed in the hope that it will be useful,
  604. + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  605. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  606. + * GNU General Public License for more details.
  607. + *
  608. + * You should have received a copy of the GNU General Public License
  609. + * along with this program; if not, write to the Free Software
  610. + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  611. + * 02111-1307, USA.
  612. + *
  613. + * http://www.gnu.org/copyleft/gpl.html
  614. + */
  615. +package net.sf.l2j.gameserver.skills.effects;
  616. +
  617. +import net.sf.l2j.gameserver.ai.CtrlIntention;
  618. +import net.sf.l2j.gameserver.model.L2Effect;
  619. +import net.sf.l2j.gameserver.skills.Env;
  620. +
  621. +
  622. +/**
  623. + * @author decad
  624. + *
  625. + * Implementation of the CANCEL TARGET
  626. + */
  627. +public class EffectCancelTarget extends L2Effect
  628. +{
  629. +
  630. +    public EffectCancelTarget(Env env, EffectTemplate template)
  631. +    {
  632. +        super(env, template);
  633. +    }
  634. +
  635. +    @Override
  636. +    public EffectType getEffectType()
  637. +    {
  638. +        return EffectType.CANCEL_TARGET;
  639. +    }
  640. +    
  641. +    /** Notify started */
  642. +    @Override
  643. +    public boolean onStart()
  644. +    {
  645. +        getEffected().getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
  646. +        getEffected().setTarget(null);
  647. +        getEffected().breakAttack();
  648. +        getEffected().breakCast();
  649. +        getEffected().abortAttack();
  650. +        getEffected().abortCast();
  651. +        onActionTime();
  652. +        return true;
  653. +    }
  654. +    
  655. +    @Override
  656. +    public void onExit()
  657. +    {
  658. +       //nothing
  659. +    }
  660. +
  661. +    @Override
  662. +    public boolean onActionTime()
  663. +    {
  664. +       return false;
  665. +    }
  666. +}
  667. +
  668. Index: java/net/sf/l2j/gameserver/skills/effects/EffectDeflectBuff.java
  669. ===================================================================
  670. --- java/net/sf/l2j/gameserver/skills/effects/EffectDeflectBuff.java    (revision 0)
  671. +++ java/net/sf/l2j/gameserver/skills/effects/EffectDeflectBuff.java    (revision 0)
  672. @@ -0,0 +1,81 @@
  673. +package net.sf.l2j.gameserver.skills.effects;
  674. +
  675. +import net.sf.l2j.gameserver.model.L2Effect;
  676. +import net.sf.l2j.gameserver.model.L2Skill.SkillType;
  677. +import net.sf.l2j.gameserver.network.SystemMessageId;
  678. +import net.sf.l2j.gameserver.serverpackets.SystemMessage;
  679. +import net.sf.l2j.gameserver.skills.Env;
  680. +
  681. +/**
  682. + * @author Java
  683. + */
  684. +public final class EffectDeflectBuff extends L2Effect
  685. +{
  686. +   /**
  687. +    * @param env
  688. +    * @param template
  689. +    */
  690. +   public EffectDeflectBuff(Env env, EffectTemplate template)
  691. +   {
  692. +       super(env, template);
  693. +   }
  694. +
  695. +   /*
  696. +    * (non-Javadoc)
  697. +    *
  698. +    * @see net.sf.l2j.gameserver.model.L2Effect#getEffectType()
  699. +    */
  700. +   @Override
  701. +   public EffectType getEffectType()
  702. +   {
  703. +       return EffectType.PREVENT_BUFF;
  704. +   }
  705. +  
  706. +   /*
  707. +    * (non-Javadoc)
  708. +    *
  709. +    * @see net.sf.l2j.gameserver.model.L2Effect#onActionTime()
  710. +    */
  711. +   @Override
  712. +   public boolean onActionTime()
  713. +   {
  714. +       // Only cont skills shouldn't end
  715. +       if(getSkill().getSkillType() != SkillType.CONT)
  716. +           return false;
  717. +
  718. +       double manaDam = calc();
  719. +
  720. +       if(manaDam > getEffected().getCurrentMp())
  721. +       {
  722. +           SystemMessage sm = new SystemMessage(SystemMessageId.SKILL_REMOVED_DUE_LACK_MP);
  723. +           getEffected().sendPacket(sm);
  724. +           return false;
  725. +       }
  726. +
  727. +       getEffected().reduceCurrentMp(manaDam);
  728. +       return true;
  729. +   }
  730. +  
  731. +   /*
  732. +    * (non-Javadoc)
  733. +    *
  734. +    * @see net.sf.l2j.gameserver.model.L2Effect#onStart()
  735. +    */
  736. +   @Override
  737. +   public boolean onStart()
  738. +   {
  739. +       getEffected().setIsBuffProtected(true);
  740. +       return true;
  741. +   }
  742. +
  743. +   /*
  744. +    * (non-Javadoc)
  745. +    *
  746. +    * @see net.sf.l2j.gameserver.model.L2Effect#onExit()
  747. +    */
  748. +   @Override
  749. +   public void onExit()
  750. +   {
  751. +       getEffected().setIsBuffProtected(false);
  752. +   }
  753. +}
  754. Index: java/net/sf/l2j/gameserver/skills/effects/EffectImmobileBuff.java
  755. ===================================================================
  756. --- java/net/sf/l2j/gameserver/skills/effects/EffectImmobileBuff.java   (revision 0)
  757. +++ java/net/sf/l2j/gameserver/skills/effects/EffectImmobileBuff.java   (revision 0)
  758. @@ -0,0 +1,56 @@
  759. +/* This program is free software: you can redistribute it and/or modify it under
  760. + * the terms of the GNU General Public License as published by the Free Software
  761. + * Foundation, either version 3 of the License, or (at your option) any later
  762. + * version.
  763. + *
  764. + * This program is distributed in the hope that it will be useful, but WITHOUT
  765. + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  766. + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
  767. + * details.
  768. + *
  769. + * You should have received a copy of the GNU General Public License along with
  770. + * this program. If not, see <http://www.gnu.org/licenses/>.
  771. + */
  772. +package net.sf.l2j.gameserver.skills.effects;
  773. +
  774. +import net.sf.l2j.gameserver.model.L2Effect;
  775. +import net.sf.l2j.gameserver.skills.Env;
  776. +
  777. +/**
  778. + * @author mkizub TODO To change the template for this generated type comment go to Window - Preferences - Java - Code Style - Code Templates
  779. + */
  780. +public class EffectImmobileBuff extends L2Effect
  781. +{
  782. +   public EffectImmobileBuff(Env env, EffectTemplate template)
  783. +   {
  784. +       super(env, template);
  785. +   }
  786. +
  787. +   @Override
  788. +   public EffectType getEffectType()
  789. +   {
  790. +       return EffectType.BUFF;
  791. +   }
  792. +
  793. +   /** Notify started */
  794. +   @Override
  795. +   public boolean onStart()
  796. +   {
  797. +       getEffector().setIsImmobilized(true);
  798. +                return true;
  799. +   }
  800. +
  801. +   /** Notify exited */
  802. +   @Override
  803. +   public void onExit()
  804. +   {
  805. +       getEffector().setIsImmobilized(false);
  806. +   }
  807. +
  808. +   @Override
  809. +   public boolean onActionTime()
  810. +   {
  811. +       // just stop this effect
  812. +       return false;
  813. +   }
  814. +}
  815. Index: java/net/sf/l2j/gameserver/skills/effects/EffectSleep.java
  816. ===================================================================
  817. --- java/net/sf/l2j/gameserver/skills/effects/EffectSleep.java  (revision 4415)
  818. +++ java/net/sf/l2j/gameserver/skills/effects/EffectSleep.java  (working copy)
  819. @@ -27,7 +27,8 @@
  820.   * TODO To change the template for this generated type comment go to
  821.   * Window - Preferences - Java - Code Style - Code Templates
  822.   */
  823. -final class EffectSleep extends L2Effect {
  824. +public class EffectSleep extends L2Effect
  825. +{
  826.  
  827.     public EffectSleep(Env env, EffectTemplate template)
  828.     {
  829. @@ -42,22 +43,24 @@
  830.  
  831.     /** Notify started */
  832.     @Override
  833. -   public void onStart() {
  834. +   public boolean onStart()
  835. +   {
  836.         getEffected().startSleeping();
  837. +                return true;
  838.     }
  839.  
  840.     /** Notify exited */
  841.     @Override
  842. -   public void onExit() {
  843. +   public void onExit()
  844. +        {
  845.         getEffected().stopSleeping(this);
  846.     }
  847.  
  848.      @Override
  849. -   public boolean onActionTime()
  850. +    public boolean onActionTime()
  851.      {
  852.         getEffected().stopSleeping(this);
  853.         // just stop this effect
  854.         return false;
  855.      }
  856. -}
  857. -
  858. +}
  859. \ No newline at end of file
  860. Index: java/net/sf/l2j/gameserver/skills/effects/EffectLuckNoblesse.java
  861. ===================================================================
  862. --- java/net/sf/l2j/gameserver/skills/effects/EffectLuckNoblesse.java   (revision 0)
  863. +++ java/net/sf/l2j/gameserver/skills/effects/EffectLuckNoblesse.java   (revision 0)
  864. @@ -0,0 +1,63 @@
  865. +/* This program is free software; you can redistribute it and/or modify
  866. + * it under the terms of the GNU General Public License as published by
  867. + * the Free Software Foundation; either version 2, or (at your option)
  868. + * any later version.
  869. + *
  870. + * This program is distributed in the hope that it will be useful,
  871. + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  872. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  873. + * GNU General Public License for more details.
  874. + *
  875. + * You should have received a copy of the GNU General Public License
  876. + * along with this program; if not, write to the Free Software
  877. + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  878. + * 02111-1307, USA.
  879. + *
  880. + * http://www.gnu.org/copyleft/gpl.html
  881. + */
  882. +package net.sf.l2j.gameserver.skills.effects;
  883. +
  884. +import net.sf.l2j.gameserver.model.L2Effect;
  885. +import net.sf.l2j.gameserver.skills.Env;
  886. +
  887. +/**
  888. + * @author tomciaaa
  889. + *
  890. + */
  891. +public class EffectLuckNoblesse extends L2Effect
  892. +{
  893. +
  894. +    public EffectLuckNoblesse(Env env, EffectTemplate template)
  895. +    {
  896. +        super(env, template);
  897. +    }
  898. +
  899. +    @Override
  900. +    public EffectType getEffectType()
  901. +    {
  902. +        return EffectType.LUCKNOBLESSE;
  903. +    }
  904. +    
  905. +    /** Notify started */
  906. +    @Override
  907. +    public boolean onStart()
  908. +    {
  909. +        getEffected().startLuckNoblesse();
  910. +        return true;
  911. +    }
  912. +    
  913. +    /** Notify exited */
  914. +    @Override
  915. +    public void onExit()
  916. +    {
  917. +        getEffected().stopLuckNoblesse();
  918. +    }
  919. +    
  920. +    @Override
  921. +    public boolean onActionTime()
  922. +    {
  923. +        getEffected().stopLuckNoblesse();
  924. +        // just stop this effect
  925. +        return false;
  926. +    }
  927. +}
  928. \ No newline at end of file
  929. Index: java/net/sf/l2j/gameserver/skills/effects/EffectPsychicalMute.java
  930. ===================================================================
  931. --- java/net/sf/l2j/gameserver/skills/effects/EffectPsychicalMute.java  (revision 4415)
  932. +++ java/net/sf/l2j/gameserver/skills/effects/EffectPsychicalMute.java  (working copy)
  933. @@ -24,33 +24,39 @@
  934.   * @author -Nemesiss-
  935.   *
  936.   */
  937. -public class EffectPsychicalMute extends L2Effect {
  938. +public class EffectPsychicalMute extends L2Effect
  939. +{
  940.  
  941.  
  942. -    public EffectPsychicalMute(Env env, EffectTemplate template) {
  943. +    public EffectPsychicalMute(Env env, EffectTemplate template)
  944. +    {
  945.          super(env, template);
  946.      }
  947.  
  948. -
  949.      @Override
  950. -   public EffectType getEffectType() {
  951. +    public EffectType getEffectType()
  952. +    {
  953.          return L2Effect.EffectType.PSYCHICAL_MUTE;
  954.      }
  955.  
  956.      @Override
  957. -   public void onStart() {
  958. +    public boolean onStart()
  959. +    {
  960.          getEffected().startPsychicalMuted();
  961. +        return true;
  962.      }
  963.  
  964.      @Override
  965. -   public boolean onActionTime() {
  966. +    public boolean onActionTime()
  967. +    {
  968.          // Simply stop the effect
  969.          getEffected().stopPsychicalMuted(this);
  970.          return false;
  971.      }
  972.  
  973.      @Override
  974. -   public void onExit() {
  975. +    public void onExit()
  976. +    {
  977.          getEffected().stopPsychicalMuted(this);
  978.      }
  979.  }
  980. Index: java/net/sf/l2j/gameserver/skills/effects/EffectStun.java
  981. ===================================================================
  982. --- java/net/sf/l2j/gameserver/skills/effects/EffectStun.java   (revision 4415)
  983. +++ java/net/sf/l2j/gameserver/skills/effects/EffectStun.java   (working copy)
  984. @@ -27,7 +27,8 @@
  985.   * TODO To change the template for this generated type comment go to
  986.   * Window - Preferences - Java - Code Style - Code Templates
  987.   */
  988. -final class EffectStun extends L2Effect {
  989. +public class EffectStun extends L2Effect
  990. +{
  991.  
  992.     public EffectStun(Env env, EffectTemplate template)
  993.     {
  994. @@ -42,21 +43,24 @@
  995.  
  996.     /** Notify started */
  997.     @Override
  998. -   public void onStart() {
  999. +   public boolean onStart()
  1000. +   {
  1001.         getEffected().startStunning();
  1002. +                return true;
  1003.     }
  1004.  
  1005.     /** Notify exited */
  1006.     @Override
  1007. -   public void onExit() {
  1008. +   public void onExit()
  1009. +        {
  1010.         getEffected().stopStunning(this);
  1011.     }
  1012.  
  1013. -    @Override
  1014. +        @Override
  1015.     public boolean onActionTime()
  1016. -    {
  1017. -       // just stop this effect
  1018. -       return false;
  1019. -    }
  1020. +        {
  1021. +             // just stop this effect
  1022. +             return false;
  1023. +        }
  1024.  }
  1025.  
  1026. Index: java/net/sf/l2j/gameserver/skills/effects/EffectCombatPointHealOverTime.java
  1027. ===================================================================
  1028. --- java/net/sf/l2j/gameserver/skills/effects/EffectCombatPointHealOverTime.java    (revision 4415)
  1029. +++ java/net/sf/l2j/gameserver/skills/effects/EffectCombatPointHealOverTime.java    (working copy)
  1030. @@ -23,7 +23,7 @@
  1031.  import net.sf.l2j.gameserver.skills.Env;
  1032.  
  1033.  
  1034. -class EffectCombatPointHealOverTime extends L2Effect
  1035. +public class EffectCombatPointHealOverTime extends L2Effect
  1036.  {
  1037.      public EffectCombatPointHealOverTime(Env env, EffectTemplate template)
  1038.      {
  1039. @@ -31,15 +31,15 @@
  1040.      }
  1041.  
  1042.      @Override
  1043. -   public EffectType getEffectType()
  1044. +    public EffectType getEffectType()
  1045.      {
  1046.          return EffectType.COMBAT_POINT_HEAL_OVER_TIME;
  1047.      }
  1048.  
  1049.      @Override
  1050. -   public boolean onActionTime()
  1051. +    public boolean onActionTime()
  1052.      {
  1053. -        if(getEffected().isDead())
  1054. +        if (getEffected().isDead())
  1055.              return false;
  1056.  
  1057.          double cp = getEffected().getCurrentCp();
  1058. Index: java/net/sf/l2j/gameserver/skills/effects/EffectManaDamOverTime.java
  1059. ===================================================================
  1060. --- java/net/sf/l2j/gameserver/skills/effects/EffectManaDamOverTime.java    (revision 4415)
  1061. +++ java/net/sf/l2j/gameserver/skills/effects/EffectManaDamOverTime.java    (working copy)
  1062. @@ -24,7 +24,7 @@
  1063.  import net.sf.l2j.gameserver.skills.Env;
  1064.  
  1065.  
  1066. -class EffectManaDamOverTime extends L2Effect
  1067. +public class EffectManaDamOverTime extends L2Effect
  1068.  {
  1069.     public EffectManaDamOverTime(Env env, EffectTemplate template)
  1070.     {
  1071. Index: java/net/sf/l2j/gameserver/skills/effects/EffectTargetMe.java
  1072. ===================================================================
  1073. --- java/net/sf/l2j/gameserver/skills/effects/EffectTargetMe.java   (revision 4415)
  1074. +++ java/net/sf/l2j/gameserver/skills/effects/EffectTargetMe.java   (working copy)
  1075. @@ -17,48 +17,56 @@
  1076.   */
  1077.  package net.sf.l2j.gameserver.skills.effects;
  1078.  
  1079. +import net.sf.l2j.gameserver.ai.CtrlIntention;
  1080.  import net.sf.l2j.gameserver.model.L2Effect;
  1081.  import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
  1082.  import net.sf.l2j.gameserver.serverpackets.MyTargetSelected;
  1083.  import net.sf.l2j.gameserver.skills.Env;
  1084.  
  1085.  /**
  1086. - *
  1087.   * @author -Nemesiss-
  1088.   */
  1089.  public class EffectTargetMe extends L2Effect
  1090.  {
  1091. -   public EffectTargetMe(Env env, EffectTemplate template)
  1092. +    public EffectTargetMe(Env env, EffectTemplate template)
  1093.      {
  1094.          super(env, template);
  1095.      }
  1096.  
  1097.      @Override
  1098. -   public EffectType getEffectType()
  1099. +    public EffectType getEffectType()
  1100.      {
  1101.          return EffectType.TARGET_ME;
  1102.      }
  1103. -
  1104. +    
  1105. +    /**
  1106. +     *
  1107. +     * @see com.it.br.gameserver.model.L2Effect#onStart()
  1108. +     */
  1109.      /** Notify started */
  1110.      @Override
  1111. -   public void onStart() {
  1112. -       //Should only work on PC?
  1113. -       if (getEffected() instanceof L2PcInstance)
  1114. -       {
  1115. -           getEffected().setTarget(getEffector());
  1116. -           MyTargetSelected my = new MyTargetSelected(getEffector().getObjectId(), 0);
  1117. -           getEffected().sendPacket(my);
  1118. -       }
  1119. +    public boolean onStart()
  1120. +    {
  1121. +       getEffected().setTarget(getEffector());
  1122. +       MyTargetSelected my = new MyTargetSelected(getEffector().getObjectId(), 0);
  1123. +       getEffected().sendPacket(my);
  1124. +       getEffected().getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, getEffector());
  1125. +       return true;
  1126.      }
  1127.  
  1128. +    /**
  1129. +     *  
  1130. +     * @see com.it.br.gameserver.model.L2Effect#onExit()
  1131. +     */
  1132.      /** Notify exited */
  1133.      @Override
  1134. -   public void onExit() {
  1135. +    public void onExit()
  1136. +    {
  1137.          //nothing
  1138.      }
  1139.  
  1140.      @Override
  1141. -   public boolean onActionTime()
  1142. +    public boolean onActionTime()
  1143.      {
  1144.         //nothing
  1145.          return false;
  1146. Index: java/net/sf/l2j/gameserver/skills/effects/EffectInvincible.java
  1147. ===================================================================
  1148. --- java/net/sf/l2j/gameserver/skills/effects/EffectInvincible.java (revision 4415)
  1149. +++ java/net/sf/l2j/gameserver/skills/effects/EffectInvincible.java (working copy)
  1150. @@ -35,8 +35,10 @@
  1151.     }
  1152.  
  1153.     @Override
  1154. -   public void onStart() {
  1155. +   public boolean onStart()
  1156. +   {
  1157.         getEffected().setIsInvul(true);
  1158. +                return true;
  1159.     }
  1160.  
  1161.     @Override
  1162. Index: java/net/sf/l2j/gameserver/skills/effects/EffectRecoverForce.java
  1163. ===================================================================
  1164. --- java/net/sf/l2j/gameserver/skills/effects/EffectRecoverForce.java   (revision 0)
  1165. +++ java/net/sf/l2j/gameserver/skills/effects/EffectRecoverForce.java   (revision 0)
  1166. @@ -0,0 +1,53 @@
  1167. +/*
  1168. + * This program is free software; you can redistribute it and/or modify
  1169. + * it under the terms of the GNU General Public License as published by
  1170. + * the Free Software Foundation; either version 2, or (at your option)
  1171. + * any later version.
  1172. + *
  1173. + * This program is distributed in the hope that it will be useful,
  1174. + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  1175. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  1176. + * GNU General Public License for more details.
  1177. + *
  1178. + * You should have received a copy of the GNU General Public License
  1179. + * along with this program; if not, write to the Free Software
  1180. + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  1181. + * 02111-1307, USA.
  1182. + *
  1183. + * http://www.gnu.org/copyleft/gpl.html
  1184. + */
  1185. +package net.sf.l2j.gameserver.skills.effects;
  1186. +
  1187. +import net.sf.l2j.gameserver.model.L2Effect;
  1188. +import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
  1189. +import net.sf.l2j.gameserver.serverpackets.EtcStatusUpdate;
  1190. +import net.sf.l2j.gameserver.skills.Env;
  1191. +
  1192. +public class EffectRecoverForce extends L2Effect
  1193. +{
  1194. +    public EffectRecoverForce(Env env, EffectTemplate template)
  1195. +    {
  1196. +        super(env, template);
  1197. +    }
  1198. +
  1199. +    @Override
  1200. +    public EffectType getEffectType()
  1201. +    {
  1202. +        return EffectType.SIGNET_EFFECT;
  1203. +    }
  1204. +
  1205. +    @Override
  1206. +    public boolean onActionTime()
  1207. +    {
  1208. +        if (getEffected() instanceof L2PcInstance)
  1209. +        {
  1210. +            EffectCharge effect = (EffectCharge)getEffected().getFirstEffect(EffectType.CHARGE);
  1211. +            if (effect != null)
  1212. +            {
  1213. +                effect.addNumCharges(1);
  1214. +                getEffected().sendPacket(new EtcStatusUpdate((L2PcInstance)getEffected()));
  1215. +            }
  1216. +        }
  1217. +        return true;
  1218. +    }
  1219. +}
  1220. Index: java/net/sf/l2j/gameserver/skills/effects/EffectRoot.java
  1221. ===================================================================
  1222. --- java/net/sf/l2j/gameserver/skills/effects/EffectRoot.java   (revision 4415)
  1223. +++ java/net/sf/l2j/gameserver/skills/effects/EffectRoot.java   (working copy)
  1224. @@ -27,7 +27,8 @@
  1225.   * TODO To change the template for this generated type comment go to
  1226.   * Window - Preferences - Java - Code Style - Code Templates
  1227.   */
  1228. -final class EffectRoot extends L2Effect {
  1229. +public class EffectRoot extends L2Effect
  1230. +{
  1231.  
  1232.     public EffectRoot(Env env, EffectTemplate template)
  1233.     {
  1234. @@ -42,18 +43,21 @@
  1235.  
  1236.     /** Notify started */
  1237.     @Override
  1238. -   public void onStart() {
  1239. +   public boolean onStart()
  1240. +   {
  1241.         getEffected().startRooted();
  1242. +                return true;
  1243.     }
  1244.  
  1245.     /** Notify exited */
  1246.     @Override
  1247. -   public void onExit() {
  1248. +   public void onExit()
  1249. +        {
  1250.         getEffected().stopRooting(this);
  1251.     }
  1252.  
  1253.      @Override
  1254. -   public boolean onActionTime()
  1255. +    public boolean onActionTime()
  1256.      {
  1257.         // just stop this effect
  1258.         return false;
  1259. Index: java/net/sf/l2j/gameserver/skills/effects/EffectBuff.java
  1260. ===================================================================
  1261. --- java/net/sf/l2j/gameserver/skills/effects/EffectBuff.java   (revision 4415)
  1262. +++ java/net/sf/l2j/gameserver/skills/effects/EffectBuff.java   (working copy)
  1263. @@ -27,7 +27,8 @@
  1264.   * TODO To change the template for this generated type comment go to
  1265.   * Window - Preferences - Java - Code Style - Code Templates
  1266.   */
  1267. -final class EffectBuff extends L2Effect {
  1268. +final class EffectBuff extends L2Effect
  1269. +{
  1270.  
  1271.     public EffectBuff(Env env, EffectTemplate template)
  1272.     {
  1273. @@ -42,9 +43,9 @@
  1274.  
  1275.     @Override
  1276.     public boolean onActionTime()
  1277. -    {
  1278. -       // just stop this effect
  1279. -       return false;
  1280. -    }
  1281. +        {
  1282. +              // just stop this effect
  1283. +              return false;
  1284. +        }
  1285.  }
  1286.  
  1287. Index: java/net/sf/l2j/gameserver/skills/effects/EffectSignetAntiSummon.java
  1288. ===================================================================
  1289. --- java/net/sf/l2j/gameserver/skills/effects/EffectSignetAntiSummon.java   (revision 0)
  1290. +++ java/net/sf/l2j/gameserver/skills/effects/EffectSignetAntiSummon.java   (revision 0)
  1291. @@ -0,0 +1,85 @@
  1292. +/*
  1293. + * This program is free software; you can redistribute it and/or modify
  1294. + * it under the terms of the GNU General Public License as published by
  1295. + * the Free Software Foundation; either version 2, or (at your option)
  1296. + * any later version.
  1297. + *
  1298. + * This program is distributed in the hope that it will be useful,
  1299. + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  1300. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  1301. + * GNU General Public License for more details.
  1302. + *
  1303. + * You should have received a copy of the GNU General Public License
  1304. + * along with this program; if not, write to the Free Software
  1305. + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  1306. + * 02111-1307, USA.
  1307. + *
  1308. + * http://www.gnu.org/copyleft/gpl.html
  1309. + */
  1310. +package net.sf.l2j.gameserver.skills.effects;
  1311. +
  1312. +import net.sf.l2j.gameserver.ai.CtrlEvent;
  1313. +import net.sf.l2j.gameserver.model.L2Character;
  1314. +import net.sf.l2j.gameserver.model.actor.instance.L2PlayableInstance;
  1315. +import net.sf.l2j.gameserver.model.L2Summon;
  1316. +import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
  1317. +import net.sf.l2j.gameserver.network.SystemMessageId;
  1318. +import net.sf.l2j.gameserver.serverpackets.SystemMessage;
  1319. +import net.sf.l2j.gameserver.skills.Env;
  1320. +
  1321. +/**
  1322. + * @author Forsaiken
  1323. + */
  1324. +
  1325. +public class EffectSignetAntiSummon extends EffectSignet
  1326. +{
  1327. +    public EffectSignetAntiSummon(Env env, EffectTemplate template)
  1328. +    {
  1329. +        super(env, template);
  1330. +    }
  1331. +    
  1332. +    @Override
  1333. +    public EffectType getEffectType()
  1334. +    {
  1335. +        return EffectType.SIGNET_GROUND;
  1336. +    }
  1337. +    
  1338. +    @Override
  1339. +    public boolean onActionTime()
  1340. +    {
  1341. +        int mpConsume = getSkill().getMpConsume();
  1342. +        
  1343. +        L2PcInstance caster = (L2PcInstance)getEffected();
  1344. +        
  1345. +        for (L2Character cha : zone.getCharactersInZone())
  1346. +        {
  1347. +            if (cha == null)
  1348. +                continue;
  1349. +            
  1350. +            if (cha instanceof L2PlayableInstance)
  1351. +            {
  1352. +                L2PcInstance owner = null;
  1353. +                
  1354. +                if (cha instanceof L2Summon)
  1355. +                    owner = ((L2Summon)cha).getOwner();
  1356. +                else
  1357. +                    owner = (L2PcInstance)cha;
  1358. +                
  1359. +                if (owner != null && owner.getPet() != null)
  1360. +                {
  1361. +                    if (mpConsume > caster.getCurrentMp())
  1362. +                    {
  1363. +                        caster.sendPacket(new SystemMessage(SystemMessageId.SKILL_REMOVED_DUE_LACK_MP));
  1364. +                        return false;
  1365. +                    }
  1366. +                    else
  1367. +                        caster.reduceCurrentMp(mpConsume);
  1368. +                    
  1369. +                    owner.getPet().unSummon(owner);
  1370. +                    owner.getAI().notifyEvent(CtrlEvent.EVT_ATTACKED, caster);
  1371. +                }
  1372. +            }
  1373. +        }
  1374. +        return true;
  1375. +    }
  1376. +}
  1377. \ No newline at end of file
  1378. Index: java/net/sf/l2j/gameserver/skills/effects/EffectSilentMove.java
  1379. ===================================================================
  1380. --- java/net/sf/l2j/gameserver/skills/effects/EffectSilentMove.java (revision 4415)
  1381. +++ java/net/sf/l2j/gameserver/skills/effects/EffectSilentMove.java (working copy)
  1382. @@ -26,7 +26,7 @@
  1383.  import net.sf.l2j.gameserver.serverpackets.SystemMessage;
  1384.  import net.sf.l2j.gameserver.skills.Env;
  1385.  
  1386. -final class EffectSilentMove extends L2Effect
  1387. +public class EffectSilentMove extends L2Effect
  1388.  {
  1389.     public EffectSilentMove(Env env, EffectTemplate template)
  1390.     {
  1391. @@ -35,13 +35,17 @@
  1392.  
  1393.     /** Notify started */
  1394.     @Override
  1395. -   public void onStart()
  1396. +   public boolean onStart()
  1397.     {
  1398.         super.onStart();
  1399.  
  1400.         L2Character effected = getEffected();
  1401.         if (effected instanceof L2PcInstance)
  1402. -           ((L2PcInstance)effected).setSilentMoving(true);
  1403. +       {
  1404. +           ((L2PcInstance) effected).setSilentMoving(true);
  1405. +           return true;
  1406. +       }
  1407. +       return false;
  1408.     }
  1409.  
  1410.     /** Notify exited */
  1411. Index: java/net/sf/l2j/gameserver/skills/effects/EffectStunSelf.java
  1412. ===================================================================
  1413. --- java/net/sf/l2j/gameserver/skills/effects/EffectStunSelf.java   (revision 4415)
  1414. +++ java/net/sf/l2j/gameserver/skills/effects/EffectStunSelf.java   (working copy)
  1415. @@ -35,9 +35,10 @@
  1416.     }
  1417.  
  1418.     @Override
  1419. -   public void onStart()
  1420. +   public boolean onStart()
  1421.     {
  1422.         getEffector().startStunning();
  1423. +                return true;
  1424.     }
  1425.  
  1426.     @Override
  1427. Index: java/net/sf/l2j/gameserver/skills/effects/EffectPhoenixBless.java
  1428. ===================================================================
  1429. --- java/net/sf/l2j/gameserver/skills/effects/EffectPhoenixBless.java   (revision 0)
  1430. +++ java/net/sf/l2j/gameserver/skills/effects/EffectPhoenixBless.java   (revision 0)
  1431. @@ -0,0 +1,68 @@
  1432. +/*
  1433. + * This program is free software; you can redistribute it and/or modify
  1434. + * it under the terms of the GNU General Public License as published by
  1435. + * the Free Software Foundation; either version 2, or (at your option)
  1436. + * any later version.
  1437. + *
  1438. + * This program is distributed in the hope that it will be useful,
  1439. + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  1440. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  1441. + * GNU General Public License for more details.
  1442. + *
  1443. + * You should have received a copy of the GNU General Public License
  1444. + * along with this program; if not, write to the Free Software
  1445. + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  1446. + * 02111-1307, USA.
  1447. + *
  1448. + * http://www.gnu.org/copyleft/gpl.html
  1449. + */
  1450. +package net.sf.l2j.gameserver.skills.effects;
  1451. +
  1452. +import net.sf.l2j.gameserver.model.L2Effect;
  1453. +import net.sf.l2j.gameserver.model.actor.instance.L2PlayableInstance;
  1454. +import net.sf.l2j.gameserver.skills.Env;
  1455. +
  1456. +/**
  1457. + * @author Faror
  1458. + */
  1459. +
  1460. +public class EffectPhoenixBless extends L2Effect
  1461. +{
  1462. +    public EffectPhoenixBless(Env env, EffectTemplate template)
  1463. +    {
  1464. +       super(env, template);
  1465. +   }
  1466. +
  1467. +   @Override
  1468. +   public EffectType getEffectType()
  1469. +   {
  1470. +       return EffectType.PHOENIX_BLESSING;
  1471. +   }
  1472. +
  1473. +        /** Notify started */
  1474. +        @Override
  1475. +   public boolean onStart()
  1476. +   {
  1477. +       if (getEffected() instanceof L2PlayableInstance)
  1478. +       {
  1479. +           ((L2PlayableInstance) getEffected()).startPhoenixBlessing();
  1480. +           return true;
  1481. +       }
  1482. +       return false;
  1483. +   }
  1484. +
  1485. +   /** Notify exited */
  1486. +   @Override
  1487. +        public void onExit()
  1488. +   {
  1489. +       if (getEffected() instanceof L2PlayableInstance)
  1490. +       ((L2PlayableInstance)getEffected()).stopPhoenixBlessing(this);
  1491. +   }
  1492. +
  1493. +   @Override
  1494. +   public boolean onActionTime()
  1495. +   {
  1496. +       // just stop this effect
  1497. +       return false;
  1498. +   }
  1499. +}
  1500. \ No newline at end of file
  1501. Index: java/net/sf/l2j/gameserver/skills/effects/EffectRemoveTarget.java
  1502. ===================================================================
  1503. --- java/net/sf/l2j/gameserver/skills/effects/EffectRemoveTarget.java   (revision 4415)
  1504. +++ java/net/sf/l2j/gameserver/skills/effects/EffectRemoveTarget.java   (working copy)
  1505. @@ -17,6 +17,7 @@
  1506.   */
  1507.  package net.sf.l2j.gameserver.skills.effects;
  1508.  
  1509. +import net.sf.l2j.gameserver.ai.CtrlIntention;
  1510.  import net.sf.l2j.gameserver.model.L2Effect;
  1511.  import net.sf.l2j.gameserver.skills.Env;
  1512.  
  1513. @@ -32,27 +33,31 @@
  1514.      }
  1515.  
  1516.      @Override
  1517. -   public EffectType getEffectType()
  1518. +    public EffectType getEffectType()
  1519.      {
  1520.          return EffectType.REMOVE_TARGET;
  1521.      }
  1522.  
  1523.      /** Notify started */
  1524.      @Override
  1525. -   public void onStart() {
  1526. +    public boolean onStart()
  1527. +    {
  1528.          getEffected().setTarget(null);
  1529.          getEffected().abortAttack();
  1530.          getEffected().abortCast();
  1531. +        getEffected().getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE, getEffector());
  1532. +        return true;
  1533.      }
  1534.  
  1535.      /** Notify exited */
  1536.      @Override
  1537. -   public void onExit() {
  1538. +    public void onExit()
  1539. +    {
  1540.          //nothing
  1541.      }
  1542.  
  1543.      @Override
  1544. -   public boolean onActionTime()
  1545. +    public boolean onActionTime()
  1546.      {
  1547.         //nothing
  1548.          return false;
  1549. Index: java/net/sf/l2j/gameserver/skills/effects/EffectBestowSkill.java
  1550. ===================================================================
  1551. --- java/net/sf/l2j/gameserver/skills/effects/EffectBestowSkill.java    (revision 0)
  1552. +++ java/net/sf/l2j/gameserver/skills/effects/EffectBestowSkill.java    (revision 0)
  1553. @@ -0,0 +1,77 @@
  1554. +/*
  1555. + * This program is free software: you can redistribute it and/or modify it under
  1556. + * the terms of the GNU General Public License as published by the Free Software
  1557. + * Foundation, either version 3 of the License, or (at your option) any later
  1558. + * version.
  1559. + *
  1560. + * This program is distributed in the hope that it will be useful, but WITHOUT
  1561. + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  1562. + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
  1563. + * details.
  1564. + *
  1565. + * You should have received a copy of the GNU General Public License along with
  1566. + * this program. If not, see <http://www.gnu.org/licenses/>.
  1567. + */
  1568. +package net.sf.l2j.gameserver.skills.effects;
  1569. +
  1570. +import net.sf.l2j.gameserver.datatables.SkillTable;
  1571. +import net.sf.l2j.gameserver.model.L2Effect;
  1572. +import net.sf.l2j.gameserver.model.L2Skill;
  1573. +import net.sf.l2j.gameserver.skills.Env;
  1574. +
  1575. +/**
  1576. + * @author Guma
  1577. + */
  1578. +final class EffectBestowSkill extends L2Effect
  1579. +{
  1580. +   public EffectBestowSkill(Env env, EffectTemplate template)
  1581. +   {
  1582. +       super(env, template);
  1583. +   }
  1584. +  
  1585. +   /**
  1586. +    *
  1587. +    * @see com.it.br.gameserver.model.L2Effect#getEffectType()
  1588. +    */
  1589. +   @Override
  1590. +   public EffectType getEffectType()
  1591. +   {
  1592. +       return EffectType.BUFF;
  1593. +   }
  1594. +  
  1595. +   /**
  1596. +    *
  1597. +    * @see com.it.br.gameserver.model.L2Effect#onStart()
  1598. +    */
  1599. +   @Override
  1600. +   public boolean onStart()
  1601. +   {
  1602. +       L2Skill tempSkill = SkillTable.getInstance().getInfo(getSkill().getTriggeredId(), getSkill().getTriggeredLevel());
  1603. +       if (tempSkill != null)
  1604. +       {
  1605. +           getEffected().addSkill(tempSkill);
  1606. +           return true;
  1607. +       }
  1608. +                return false;
  1609. +   }
  1610. +  
  1611. +   /**
  1612. +    *
  1613. +    * @see com.it.br.gameserver.model.L2Effect#onExit()
  1614. +    */
  1615. +   @Override
  1616. +   public void onExit()
  1617. +   {
  1618. +       getEffected().removeSkill(getSkill().getTriggeredId());
  1619. +   }
  1620. +  
  1621. +   /**
  1622. +    *
  1623. +    * @see com.it.br.gameserver.model.L2Effect#onActionTime()
  1624. +    */
  1625. +   @Override
  1626. +   public boolean onActionTime()
  1627. +   {
  1628. +       return false;
  1629. +   }
  1630. +}
  1631. Index: java/net/sf/l2j/gameserver/skills/effects/EffectNoblesseBless.java
  1632. ===================================================================
  1633. --- java/net/sf/l2j/gameserver/skills/effects/EffectNoblesseBless.java  (revision 4415)
  1634. +++ java/net/sf/l2j/gameserver/skills/effects/EffectNoblesseBless.java  (working copy)
  1635. @@ -28,7 +28,8 @@
  1636.   * TODO To change the template for this generated type comment go to
  1637.   * Window - Preferences - Java - Code Style - Code Templates
  1638.   */
  1639. -final class EffectNoblesseBless extends L2Effect {
  1640. +public class EffectNoblesseBless extends L2Effect
  1641. +{
  1642.  
  1643.     public EffectNoblesseBless(Env env, EffectTemplate template)
  1644.     {
  1645. @@ -43,20 +44,26 @@
  1646.  
  1647.     /** Notify started */
  1648.     @Override
  1649. -   public void onStart() {
  1650. +   public boolean onStart()
  1651. +   {
  1652.         if (getEffected() instanceof L2PlayableInstance)
  1653. -           ((L2PlayableInstance)getEffected()).startNoblesseBlessing();
  1654. +       {
  1655. +           ((L2PlayableInstance) getEffected()).startNoblesseBlessing();
  1656. +           return true;
  1657. +       }
  1658. +       return false;
  1659.     }
  1660.  
  1661.     /** Notify exited */
  1662.     @Override
  1663. -   public void onExit() {
  1664. +   public void onExit()
  1665. +        {
  1666.         if (getEffected() instanceof L2PlayableInstance)
  1667.             ((L2PlayableInstance)getEffected()).stopNoblesseBlessing(this);
  1668.     }
  1669.  
  1670.      @Override
  1671. -   public boolean onActionTime()
  1672. +    public boolean onActionTime()
  1673.      {
  1674.         // just stop this effect
  1675.         return false;
  1676. Index: java/net/sf/l2j/gameserver/skills/effects/EffectSoulOfThePhoenix.java
  1677. ===================================================================
  1678. --- java/net/sf/l2j/gameserver/skills/effects/EffectSoulOfThePhoenix.java   (revision 0)
  1679. +++ java/net/sf/l2j/gameserver/skills/effects/EffectSoulOfThePhoenix.java   (revision 0)
  1680. @@ -0,0 +1,60 @@
  1681. +/*
  1682. + * This program is free software: you can redistribute it and/or modify it under
  1683. + * the terms of the GNU General Public License as published by the Free Software
  1684. + * Foundation, either version 3 of the License, or (at your option) any later
  1685. + * version.
  1686. + *
  1687. + * This program is distributed in the hope that it will be useful, but WITHOUT
  1688. + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  1689. + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
  1690. + * details.
  1691. + *
  1692. + * You should have received a copy of the GNU General Public License along with
  1693. + * this program. If not, see <http://www.gnu.org/licenses/>.
  1694. + */
  1695. +package net.sf.l2j.gameserver.skills.effects;
  1696. +
  1697. +import net.sf.l2j.gameserver.model.L2Effect;
  1698. +import net.sf.l2j.gameserver.model.actor.instance.L2PlayableInstance;
  1699. +import net.sf.l2j.gameserver.skills.Env;
  1700. +
  1701. +/**
  1702. + * @author WhiteMonk Implementation of skill Soul of The Phoenix
  1703. + */
  1704. +public class EffectSoulOfThePhoenix extends L2Effect
  1705. +{
  1706. +   public EffectSoulOfThePhoenix(Env env, EffectTemplate template)
  1707. +   {
  1708. +       super(env, template);
  1709. +   }
  1710. +
  1711. +   @Override
  1712. +   public EffectType getEffectType()
  1713. +   {
  1714. +       return EffectType.SOUL_OF_THE_PHOENIX;
  1715. +   }
  1716. +
  1717. +   /** Notify started */
  1718. +   @Override
  1719. +   public boolean onStart()
  1720. +   {
  1721. +       if (getEffected() instanceof L2PlayableInstance)
  1722. +           ((L2PlayableInstance) getEffected()).startSoulOfThePhoenix();
  1723. +                 return true;
  1724. +   }
  1725. +
  1726. +   /** Notify exited */
  1727. +   @Override
  1728. +   public void onExit()
  1729. +   {
  1730. +       if (getEffected() instanceof L2PlayableInstance)
  1731. +           ((L2PlayableInstance) getEffected()).stopSoulOfThePhoenix(this);
  1732. +   }
  1733. +
  1734. +   @Override
  1735. +   public boolean onActionTime()
  1736. +   {
  1737. +       // just stop this effect
  1738. +       return false;
  1739. +   }
  1740. +}
  1741. Index: java/net/sf/l2j/gameserver/skills/effects/EffectParalyze.java
  1742. ===================================================================
  1743. --- java/net/sf/l2j/gameserver/skills/effects/EffectParalyze.java   (revision 4415)
  1744. +++ java/net/sf/l2j/gameserver/skills/effects/EffectParalyze.java   (working copy)
  1745. @@ -22,7 +22,8 @@
  1746.  import net.sf.l2j.gameserver.model.L2Effect;
  1747.  import net.sf.l2j.gameserver.skills.Env;
  1748.  
  1749. -final class EffectParalyze extends L2Effect {
  1750. +public class EffectParalyze extends L2Effect
  1751. +{
  1752.  
  1753.     public EffectParalyze(Env env, EffectTemplate template)
  1754.     {
  1755. @@ -36,10 +37,11 @@
  1756.     }
  1757.  
  1758.     @Override
  1759. -   public void onStart()
  1760. +   public boolean onStart()
  1761.     {
  1762.         getEffected().startAbnormalEffect(L2Character.ABNORMAL_EFFECT_HOLD_1);
  1763.         getEffected().setIsParalyzed(true);
  1764. +                return true;
  1765.     }
  1766.  
  1767.     @Override
  1768. @@ -50,7 +52,7 @@
  1769.     }
  1770.  
  1771.      @Override
  1772. -   public boolean onActionTime()
  1773. +    public boolean onActionTime()
  1774.      {
  1775.         return false;
  1776.      }
  1777. Index: java/net/sf/l2j/gameserver/skills/effects/EffectTemplate.java
  1778. ===================================================================
  1779. --- java/net/sf/l2j/gameserver/skills/effects/EffectTemplate.java   (revision 4415)
  1780. +++ java/net/sf/l2j/gameserver/skills/effects/EffectTemplate.java   (working copy)
  1781. @@ -29,18 +29,13 @@
  1782.  import net.sf.l2j.gameserver.skills.funcs.Lambda;
  1783.  
  1784.  /**
  1785. - * @author mkizub
  1786. - *
  1787. - * TODO To change the template for this generated type comment go to
  1788. - * Window - Preferences - Java - Code Style - Code Templates
  1789. + * @author mkizub TODO To change the template for this generated type comment go to Window - Preferences - Java - Code Style - Code Templates
  1790.   */
  1791.  public final class EffectTemplate
  1792.  {
  1793. -    static Logger _log = Logger.getLogger(EffectTemplate.class.getName());
  1794. -
  1795. +   static Logger _log = Logger.getLogger(EffectTemplate.class.getName());
  1796.     private final Class<?> _func;
  1797. -   private final Constructor _constructor;
  1798. -
  1799. +   private final Constructor<?> _constructor;
  1800.     public final Condition attachCond;
  1801.     public final Condition applayCond;
  1802.     public final Lambda lambda;
  1803. @@ -48,13 +43,10 @@
  1804.     public final int period; // in seconds
  1805.     public final int abnormalEffect;
  1806.     public FuncTemplate[] funcTemplates;
  1807. -
  1808.     public final String stackType;
  1809.     public final float stackOrder;
  1810.  
  1811. -   public EffectTemplate(Condition pAttachCond, Condition pApplayCond,
  1812. -           String func, Lambda pLambda, int pCounter, int pPeriod,
  1813. -           int pAbnormalEffect, String pStackType, float pStackOrder)
  1814. +   public EffectTemplate(Condition pAttachCond, Condition pApplayCond, String func, Lambda pLambda, int pCounter, int pPeriod, int pAbnormalEffect, String pStackType, float pStackOrder)
  1815.     {
  1816.         attachCond = pAttachCond;
  1817.         applayCond = pApplayCond;
  1818. @@ -64,14 +56,20 @@
  1819.         abnormalEffect = pAbnormalEffect;
  1820.         stackType = pStackType;
  1821.         stackOrder = pStackOrder;
  1822. -       try {
  1823. -           _func = Class.forName("net.sf.l2j.gameserver.skills.effects.Effect"+func);
  1824. -       } catch (ClassNotFoundException e) {
  1825. +       try
  1826. +       {
  1827. +           _func = Class.forName("net.sf.l2j.gameserver.skills.effects.Effect" + func);
  1828. +       }
  1829. +       catch (ClassNotFoundException e)
  1830. +       {
  1831.             throw new RuntimeException(e);
  1832.         }
  1833. -       try {
  1834. +       try
  1835. +       {
  1836.             _constructor = _func.getConstructor(Env.class, EffectTemplate.class);
  1837. -       } catch (NoSuchMethodException e) {
  1838. +       }
  1839. +       catch (NoSuchMethodException e)
  1840. +       {
  1841.             throw new RuntimeException(e);
  1842.         }
  1843.     }
  1844. @@ -80,39 +78,44 @@
  1845.     {
  1846.         if (attachCond != null && !attachCond.test(env))
  1847.             return null;
  1848. -       try {
  1849. -           L2Effect effect = (L2Effect)_constructor.newInstance(env, this);
  1850. -           //if (_applayCond != null)
  1851. -           //  effect.setCondition(_applayCond);
  1852. +       try
  1853. +       {
  1854. +           L2Effect effect = (L2Effect) _constructor.newInstance(env, this);
  1855. +           // if (_applayCond != null)
  1856. +           // effect.setCondition(_applayCond);
  1857.             return effect;
  1858. -       } catch (IllegalAccessException e) {
  1859. +       }
  1860. +       catch (IllegalAccessException e)
  1861. +       {
  1862.             e.printStackTrace();
  1863.             return null;
  1864. -       } catch (InstantiationException e) {
  1865. +       }
  1866. +       catch (InstantiationException e)
  1867. +       {
  1868.             e.printStackTrace();
  1869.             return null;
  1870. -       } catch (InvocationTargetException e) {
  1871. -            _log.warning("Error creating new instance of Class "+_func+" Exception was:");
  1872. +       }
  1873. +       catch (InvocationTargetException e)
  1874. +       {
  1875. +           _log.warning("Error creating new instance of Class " + _func + " Exception was:");
  1876.             e.getTargetException().printStackTrace();
  1877.             return null;
  1878.         }
  1879. +   }
  1880.  
  1881. +   public void attach(FuncTemplate f)
  1882. +   {
  1883. +       if (funcTemplates == null)
  1884. +       {
  1885. +           funcTemplates = new FuncTemplate[] { f };
  1886. +       }
  1887. +       else
  1888. +       {
  1889. +           int len = funcTemplates.length;
  1890. +           FuncTemplate[] tmp = new FuncTemplate[len + 1];
  1891. +           System.arraycopy(funcTemplates, 0, tmp, 0, len);
  1892. +           tmp[len] = f;
  1893. +           funcTemplates = tmp;
  1894. +       }
  1895.     }
  1896. -
  1897. -    public void attach(FuncTemplate f)
  1898. -    {
  1899. -       if (funcTemplates == null)
  1900. -       {
  1901. -           funcTemplates = new FuncTemplate[]{f};
  1902. -       }
  1903. -       else
  1904. -       {
  1905. -           int len = funcTemplates.length;
  1906. -           FuncTemplate[] tmp = new FuncTemplate[len+1];
  1907. -           System.arraycopy(funcTemplates, 0, tmp, 0, len);
  1908. -           tmp[len] = f;
  1909. -           funcTemplates = tmp;
  1910. -       }
  1911. -    }
  1912. -
  1913.  }
  1914. Index: java/net/sf/l2j/gameserver/skills/effects/EffectPetrified.java
  1915. ===================================================================
  1916. --- java/net/sf/l2j/gameserver/skills/effects/EffectPetrified.java  (revision 0)
  1917. +++ java/net/sf/l2j/gameserver/skills/effects/EffectPetrified.java  (revision 0)
  1918. @@ -0,0 +1,67 @@
  1919. +/*
  1920. + * This program is free software; you can redistribute it and/or modify
  1921. + * it under the terms of the GNU General Public License as published by
  1922. + * the Free Software Foundation; either version 2, or (at your option)
  1923. + * any later version.
  1924. + *
  1925. + * This program is distributed in the hope that it will be useful,
  1926. + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  1927. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  1928. + * GNU General Public License for more details.
  1929. + *
  1930. + * You should have received a copy of the GNU General Public License
  1931. + * along with this program; if not, write to the Free Software
  1932. + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  1933. + * 02111-1307, USA.
  1934. + *
  1935. + * http://www.gnu.org/copyleft/gpl.html
  1936. + */
  1937. +
  1938. +/**
  1939. + * @author decad
  1940. + *
  1941. + * Implementation of the Petrified effect
  1942. + */
  1943. +package net.sf.l2j.gameserver.skills.effects;
  1944. +
  1945. +import net.sf.l2j.gameserver.model.L2Character;
  1946. +import net.sf.l2j.gameserver.model.L2Effect;
  1947. +import net.sf.l2j.gameserver.skills.Env;
  1948. +
  1949. +public class EffectPetrified extends L2Effect
  1950. +{
  1951. +
  1952. +    public EffectPetrified(Env env, EffectTemplate template)
  1953. +    {
  1954. +        super(env, template);
  1955. +    }
  1956. +
  1957. +    @Override
  1958. +    public EffectType getEffectType()
  1959. +    {
  1960. +        return EffectType.PETRIFIED;
  1961. +    }
  1962. +    
  1963. +    @Override
  1964. +    public boolean onStart()
  1965. +    {
  1966. +        getEffected().abortAttack();
  1967. +        getEffected().abortCast();
  1968. +        getEffected().startAbnormalEffect(L2Character.ABNORMAL_EFFECT_HOLD_2);
  1969. +        getEffected().setIsParalyzed(true);
  1970. +        return true;
  1971. +    }
  1972. +    
  1973. +    @Override
  1974. +    public void onExit()
  1975. +    {
  1976. +        getEffected().stopAbnormalEffect(L2Character.ABNORMAL_EFFECT_HOLD_2);
  1977. +        getEffected().setIsParalyzed(false);
  1978. +    }
  1979. +    
  1980. +    @Override
  1981. +    public boolean onActionTime()
  1982. +    {
  1983. +        return false;
  1984. +    }
  1985. +}
  1986. Index: java/net/sf/l2j/gameserver/skills/effects/EffectCharge.java
  1987. ===================================================================
  1988. --- java/net/sf/l2j/gameserver/skills/effects/EffectCharge.java (revision 4415)
  1989. +++ java/net/sf/l2j/gameserver/skills/effects/EffectCharge.java (working copy)
  1990. @@ -51,10 +51,10 @@
  1991.  
  1992.     @Override
  1993.     public boolean onActionTime()
  1994. -    {
  1995. -       // ignore
  1996. -       return true;
  1997. -    }
  1998. +        {
  1999. +              // ignore
  2000. +              return true;
  2001. +        }
  2002.  
  2003.     @Override
  2004.     public int getLevel() { return numCharges; }
  2005. Index: java/net/sf/l2j/gameserver/skills/effects/EffectFusion.java
  2006. ===================================================================
  2007. --- java/net/sf/l2j/gameserver/skills/effects/EffectFusion.java (revision 0)
  2008. +++ java/net/sf/l2j/gameserver/skills/effects/EffectFusion.java (revision 0)
  2009. @@ -0,0 +1,71 @@
  2010. +/*
  2011. + * This program is free software: you can redistribute it and/or modify it under
  2012. + * the terms of the GNU General Public License as published by the Free Software
  2013. + * Foundation, either version 3 of the License, or (at your option) any later
  2014. + * version.
  2015. + *
  2016. + * This program is distributed in the hope that it will be useful, but WITHOUT
  2017. + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  2018. + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
  2019. + * details.
  2020. + *
  2021. + * You should have received a copy of the GNU General Public License along with
  2022. + * this program. If not, see <http://www.gnu.org/licenses/>.
  2023. + */
  2024. +package net.sf.l2j.gameserver.skills.effects;
  2025. +
  2026. +import net.sf.l2j.gameserver.datatables.SkillTable;
  2027. +import net.sf.l2j.gameserver.model.L2Effect;
  2028. +import net.sf.l2j.gameserver.skills.Env;
  2029. +/**
  2030. + * @author Guma
  2031. + *
  2032. + */
  2033. +public final class EffectFusion extends L2Effect
  2034. +{
  2035. +   public int _effect;
  2036. +   public int _maxEffect;
  2037. +
  2038. +   public EffectFusion(Env env, EffectTemplate template)
  2039. +   {
  2040. +       super(env, template);
  2041. +       _effect = 1;
  2042. +       _maxEffect = getSkill().getLevel();
  2043. +   }
  2044. +
  2045. +   @Override
  2046. +   public boolean onActionTime()
  2047. +   {
  2048. +       return true;
  2049. +   }
  2050. +
  2051. +   @Override
  2052. +   public EffectType getEffectType()
  2053. +   {
  2054. +       return EffectType.FUSION;
  2055. +   }
  2056. +
  2057. +   public void increaseEffect()
  2058. +   {
  2059. +       if (_effect < _maxEffect)
  2060. +       {
  2061. +           _effect++;
  2062. +           updateBuff();
  2063. +       }
  2064. +   }
  2065. +
  2066. +   public void decreaseForce()
  2067. +   {
  2068. +       _effect--;
  2069. +       if (_effect < 1)
  2070. +           exit();
  2071. +       else
  2072. +           updateBuff();
  2073. +   }
  2074. +
  2075. +   private void updateBuff()
  2076. +   {
  2077. +       exit();
  2078. +       SkillTable.getInstance().getInfo(getSkill().getId(), _effect).getEffects(getEffector(), getEffected());
  2079. +   }
  2080. +}
  2081. \ No newline at end of file
  2082. Index: java/net/sf/l2j/gameserver/skills/effects/EffectSignetMDam.java
  2083. ===================================================================
  2084. --- java/net/sf/l2j/gameserver/skills/effects/EffectSignetMDam.java (revision 0)
  2085. +++ java/net/sf/l2j/gameserver/skills/effects/EffectSignetMDam.java (revision 0)
  2086. @@ -0,0 +1,152 @@
  2087. +/*
  2088. + * This program is free software; you can redistribute it and/or modify
  2089. + * it under the terms of the GNU General Public License as published by
  2090. + * the Free Software Foundation; either version 2, or (at your option)
  2091. + * any later version.
  2092. + *
  2093. + * This program is distributed in the hope that it will be useful,
  2094. + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  2095. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  2096. + * GNU General Public License for more details.
  2097. + *
  2098. + * You should have received a copy of the GNU General Public License
  2099. + * along with this program; if not, write to the Free Software
  2100. + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  2101. + * 02111-1307, USA.
  2102. + *
  2103. + * http://www.gnu.org/copyleft/gpl.html
  2104. + */
  2105. +package net.sf.l2j.gameserver.skills.effects;
  2106. +
  2107. +/**
  2108. + * @author Forsaiken
  2109. + */
  2110. +
  2111. +import javolution.util.FastList;
  2112. +
  2113. +import net.sf.l2j.gameserver.ai.CtrlEvent;
  2114. +import net.sf.l2j.gameserver.model.L2ItemInstance;
  2115. +import net.sf.l2j.gameserver.model.L2Object;
  2116. +import net.sf.l2j.gameserver.model.L2Attackable;
  2117. +import net.sf.l2j.gameserver.model.L2Character;
  2118. +import net.sf.l2j.gameserver.model.actor.instance.L2PlayableInstance;
  2119. +import net.sf.l2j.gameserver.model.L2Summon;
  2120. +import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
  2121. +import net.sf.l2j.gameserver.network.SystemMessageId;
  2122. +import net.sf.l2j.gameserver.serverpackets.MagicSkillLaunched;
  2123. +import net.sf.l2j.gameserver.serverpackets.NpcInfo;
  2124. +import net.sf.l2j.gameserver.serverpackets.SystemMessage;
  2125. +import net.sf.l2j.gameserver.skills.Env;
  2126. +import net.sf.l2j.gameserver.skills.Formulas;
  2127. +
  2128. +public class EffectSignetMDam extends EffectSignet
  2129. +{
  2130. +    private int _state = 0;
  2131. +    public EffectSignetMDam(Env env, EffectTemplate template)
  2132. +    {
  2133. +        super(env, template);
  2134. +    }
  2135. +    
  2136. +    @Override
  2137. +    public EffectType getEffectType()
  2138. +    {
  2139. +        return EffectType.SIGNET_GROUND;
  2140. +    }
  2141. +
  2142. +    @Override
  2143. +    public boolean onActionTime()
  2144. +    {
  2145. +        // on offi the zone get created and the first wave starts later
  2146. +        // there is also an first hit animation to the caster
  2147. +        switch (_state)
  2148. +        {
  2149. +            case 0:
  2150. +            case 2:
  2151. +                _state++;
  2152. +                return true;
  2153. +            case 1:
  2154. +                getEffected().broadcastPacket(new MagicSkillLaunched(getEffected(), getSkill().getId(), getSkill().getLevel(), new L2Object[]{getEffected()}));
  2155. +                _state++;
  2156. +                return true;
  2157. +        }
  2158. +        
  2159. +        int mpConsume = getSkill().getMpConsume();
  2160. +        
  2161. +        L2PcInstance caster = (L2PcInstance)getEffected();
  2162. +        
  2163. +        boolean ss = false;
  2164. +        boolean bss = false;
  2165. +        
  2166. +        L2ItemInstance weaponInst = caster.getActiveWeaponInstance();
  2167. +        if (weaponInst != null)
  2168. +        {
  2169. +            switch (weaponInst.getChargedSpiritshot())
  2170. +            {
  2171. +                case L2ItemInstance.CHARGED_BLESSED_SPIRITSHOT:
  2172. +                        weaponInst.setChargedSpiritshot(L2ItemInstance.CHARGED_NONE);
  2173. +                        bss = true;
  2174. +                    break;
  2175. +                case L2ItemInstance.CHARGED_SPIRITSHOT:
  2176. +                        weaponInst.setChargedSpiritshot(L2ItemInstance.CHARGED_NONE);
  2177. +                        ss = true;
  2178. +                    break;
  2179. +            }
  2180. +        }
  2181. +        
  2182. +        if (!bss && !ss)
  2183. +            caster.rechargeAutoSoulShot(false, true, false);
  2184. +        
  2185. +        FastList<L2Character> targets = new FastList<L2Character>();
  2186. +        
  2187. +        for (L2Character cha : zone.getCharactersInZone())
  2188. +        {
  2189. +            if (cha == null || cha == getEffected())
  2190. +                continue;
  2191. +            
  2192. +            if (cha instanceof L2Attackable || cha instanceof L2PlayableInstance)
  2193. +            {
  2194. +                if (cha.isAlikeDead())
  2195. +                    continue;
  2196. +                
  2197. +                if (mpConsume > caster.getCurrentMp())
  2198. +                {
  2199. +                    caster.sendPacket(new SystemMessage(SystemMessageId.SKILL_REMOVED_DUE_LACK_MP));
  2200. +                    return false;
  2201. +                }
  2202. +                else
  2203. +                    caster.reduceCurrentMp(mpConsume);
  2204. +                
  2205. +                targets.add(cha);
  2206. +            }
  2207. +        }
  2208. +        
  2209. +        if (targets.size() > 0)
  2210. +        {
  2211. +            caster.broadcastPacket(new MagicSkillLaunched(caster, getSkill().getId(), getSkill().getLevel(), targets.toArray(new L2Character[targets.size()])));
  2212. +            for (L2Character target : targets)
  2213. +            {
  2214. +                boolean mcrit = Formulas.getInstance().calcMCrit(caster.getMCriticalHit(target, getSkill()));
  2215. +                int mdam = (int)Formulas.getInstance().calcMagicDam(caster, target, getSkill(), ss, bss, mcrit);
  2216. +                
  2217. +                if (target instanceof L2Summon)
  2218. +                {
  2219. +                    caster.equals(((L2Summon)target).getOwner());
  2220. +                        caster.sendPacket(new NpcInfo((L2Summon)target, caster));
  2221. +                }
  2222. +                
  2223. +                if (mdam > 0)
  2224. +                {
  2225. +                    if (!target.isRaid() && Formulas.getInstance().calcAtkBreak(target, mdam))
  2226. +                    {
  2227. +                        target.breakAttack();
  2228. +                        target.breakCast();
  2229. +                    }
  2230. +                    caster.sendDamageMessage(target, mdam, mcrit, false, false);
  2231. +                    target.reduceCurrentHp(mdam, caster);
  2232. +                }
  2233. +                target.getAI().notifyEvent(CtrlEvent.EVT_ATTACKED, caster);
  2234. +            }
  2235. +        }
  2236. +        return true;
  2237. +    }
  2238. +}
  2239. Index: java/net/sf/l2j/gameserver/skills/effects/EffectMpConsumePerLevel.java
  2240. ===================================================================
  2241. --- java/net/sf/l2j/gameserver/skills/effects/EffectMpConsumePerLevel.java  (revision 0)
  2242. +++ java/net/sf/l2j/gameserver/skills/effects/EffectMpConsumePerLevel.java  (revision 0)
  2243. @@ -0,0 +1,55 @@
  2244. +/*
  2245. + * This program is free software: you can redistribute it and/or modify it under
  2246. + * the terms of the GNU General Public License as published by the Free Software
  2247. + * Foundation, either version 3 of the License, or (at your option) any later
  2248. + * version.
  2249. + *
  2250. + * This program is distributed in the hope that it will be useful, but WITHOUT
  2251. + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  2252. + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
  2253. + * details.
  2254. + *
  2255. + * You should have received a copy of the GNU General Public License along with
  2256. + * this program. If not, see <http://www.gnu.org/licenses/>.
  2257. + */
  2258. +package net.sf.l2j.gameserver.skills.effects;
  2259. +
  2260. +import net.sf.l2j.gameserver.model.L2Effect;
  2261. +import net.sf.l2j.gameserver.network.SystemMessageId;
  2262. +import net.sf.l2j.gameserver.serverpackets.SystemMessage;
  2263. +import net.sf.l2j.gameserver.skills.Env;
  2264. +
  2265. +
  2266. +public class EffectMpConsumePerLevel extends L2Effect
  2267. +{
  2268. +   public EffectMpConsumePerLevel(Env env, EffectTemplate template)
  2269. +   {
  2270. +       super(env, template);
  2271. +   }
  2272. +
  2273. +   @Override
  2274. +   public EffectType getEffectType()
  2275. +   {
  2276. +       return EffectType.MP_CONSUME_PER_LEVEL ;
  2277. +   }
  2278. +
  2279. +   @Override
  2280. +   public boolean onActionTime()
  2281. +   {
  2282. +       if(getEffected().isDead())
  2283. +           return false;
  2284. +
  2285. +       double base = calc();
  2286. +       double consume = (getEffected().getLevel() - 1)/7.5*base*getPeriod();
  2287. +
  2288. +       if(consume > getEffected().getCurrentMp())
  2289. +       {
  2290. +           SystemMessage sm = new SystemMessage(SystemMessageId.SKILL_REMOVED_DUE_LACK_MP);
  2291. +           getEffected().sendPacket(sm);
  2292. +           return false;
  2293. +       }
  2294. +
  2295. +       getEffected().reduceCurrentMp(consume);
  2296. +       return true;
  2297. +   }
  2298. +}
  2299. \ No newline at end of file
  2300. Index: java/net/sf/l2j/gameserver/skills/effects/EffectPetrification.java
  2301. ===================================================================
  2302. --- java/net/sf/l2j/gameserver/skills/effects/EffectPetrification.java  (revision 4415)
  2303. +++ java/net/sf/l2j/gameserver/skills/effects/EffectPetrification.java  (working copy)
  2304. @@ -25,35 +25,36 @@
  2305.  
  2306.  public class EffectPetrification extends L2Effect
  2307.  {
  2308. -   public EffectPetrification(Env env, EffectTemplate template)
  2309. -   {
  2310. +    public EffectPetrification(Env env, EffectTemplate template)
  2311. +    {
  2312.          super(env, template);
  2313.      }
  2314.  
  2315.      @Override
  2316. -   public EffectType getEffectType()
  2317. +    public EffectType getEffectType()
  2318.      {
  2319.          return L2Effect.EffectType.PETRIFICATION;
  2320.      }
  2321.  
  2322.      @Override
  2323. -   public void onStart()
  2324. +    public boolean onStart()
  2325.      {
  2326.         getEffected().startAbnormalEffect(L2Character.ABNORMAL_EFFECT_HOLD_2);
  2327.         getEffected().setIsParalyzed(true);
  2328.         getEffected().setIsInvul(true);
  2329. +        return true;
  2330.      }
  2331.  
  2332.      @Override
  2333. -   public void onExit()
  2334. +    public void onExit()
  2335.      {
  2336. -        getEffected().stopAbnormalEffect(L2Character.ABNORMAL_EFFECT_HOLD_2);
  2337. -        getEffected().setIsParalyzed(false);
  2338. -        getEffected().setIsInvul(false);
  2339. +   getEffected().stopAbnormalEffect(L2Character.ABNORMAL_EFFECT_HOLD_2);
  2340. +   getEffected().setIsParalyzed(false);
  2341. +   getEffected().setIsInvul(false);
  2342.      }
  2343.  
  2344.      @Override
  2345. -   public boolean onActionTime()
  2346. +    public boolean onActionTime()
  2347.      {
  2348.         return false;
  2349.      }
  2350. Index: java/net/sf/l2j/gameserver/skills/effects/EffectSilenceMagicPhysical.java
  2351. ===================================================================
  2352. --- java/net/sf/l2j/gameserver/skills/effects/EffectSilenceMagicPhysical.java   (revision 4415)
  2353. +++ java/net/sf/l2j/gameserver/skills/effects/EffectSilenceMagicPhysical.java   (working copy)
  2354. @@ -20,27 +20,31 @@
  2355.  import net.sf.l2j.gameserver.model.L2Effect;
  2356.  import net.sf.l2j.gameserver.skills.Env;
  2357.  
  2358. -public class EffectSilenceMagicPhysical extends L2Effect {
  2359. +public class EffectSilenceMagicPhysical extends L2Effect
  2360. +{
  2361.  
  2362.  
  2363. -    public EffectSilenceMagicPhysical(Env env, EffectTemplate template) {
  2364. +    public EffectSilenceMagicPhysical(Env env, EffectTemplate template)  
  2365. +    {
  2366.          super(env, template);
  2367.      }
  2368.  
  2369.      @Override
  2370. -   public EffectType getEffectType() {
  2371. +    public EffectType getEffectType()
  2372. +    {
  2373.          return L2Effect.EffectType.SILENCE_MAGIC_PHYSICAL;
  2374.      }
  2375.  
  2376.      @Override
  2377. -   public void onStart()
  2378. +    public boolean onStart()
  2379.      {
  2380.          getEffected().startMuted();
  2381.          getEffected().startPsychicalMuted();
  2382. +        return true;
  2383.      }
  2384.  
  2385.      @Override
  2386. -   public boolean onActionTime()
  2387. +    public boolean onActionTime()
  2388.      {
  2389.          getEffected().stopMuted(this);
  2390.          getEffected().stopPsychicalMuted(this);
  2391. @@ -48,9 +52,9 @@
  2392.      }
  2393.  
  2394.      @Override
  2395. -   public void onExit()
  2396. +    public void onExit()
  2397.      {
  2398.          getEffected().stopMuted(this);
  2399.          getEffected().stopPsychicalMuted(this);
  2400.      }
  2401. -}
  2402. +}
  2403. \ No newline at end of file
  2404. Index: java/net/sf/l2j/gameserver/skills/effects/EffectRelax.java
  2405. ===================================================================
  2406. --- java/net/sf/l2j/gameserver/skills/effects/EffectRelax.java  (revision 4415)
  2407. +++ java/net/sf/l2j/gameserver/skills/effects/EffectRelax.java  (working copy)
  2408. @@ -26,7 +26,7 @@
  2409.  import net.sf.l2j.gameserver.skills.Env;
  2410.  
  2411.  
  2412. -class EffectRelax extends L2Effect
  2413. +public class EffectRelax extends L2Effect
  2414.  {
  2415.     public EffectRelax(Env env, EffectTemplate template)
  2416.     {
  2417. @@ -41,31 +41,33 @@
  2418.  
  2419.     /** Notify started */
  2420.     @Override
  2421. -   public void onStart() {
  2422. +   public boolean onStart()
  2423. +   {
  2424.  
  2425. -        if(getEffected() instanceof L2PcInstance)
  2426. -        {
  2427. -           setRelax(true);
  2428. -           ((L2PcInstance)getEffected()).sitDown();
  2429. -        }
  2430. -        else
  2431. -           getEffected().getAI().setIntention(CtrlIntention.AI_INTENTION_REST);
  2432. -       super.onStart();
  2433. +       if (getEffected() instanceof L2PcInstance)
  2434. +       {
  2435. +           setRelax(true);
  2436. +           ((L2PcInstance) getEffected()).sitDown();
  2437. +       }
  2438. +       else
  2439. +           getEffected().getAI().setIntention(CtrlIntention.AI_INTENTION_REST);
  2440. +       return super.onStart();
  2441.     }
  2442.  
  2443.     /* (non-Javadoc)
  2444. -    * @see net.sf.l2j.gameserver.model.L2Effect#onExit()
  2445. +    * @see com.it.br.gameserver.model.L2Effect#onExit()
  2446.      */
  2447.     @Override
  2448. -   public void onExit() {
  2449. -        setRelax(false);
  2450. -       super.onExit();
  2451. +   public void onExit()
  2452. +        {
  2453. +               setRelax(false);
  2454. +          super.onExit();
  2455.     }
  2456.  
  2457.     @Override
  2458.     public boolean onActionTime()
  2459.     {
  2460. -        boolean retval = true;
  2461. +            boolean retval = true;
  2462.         if(getEffected().isDead())
  2463.              retval = false;
  2464.  
  2465. @@ -75,7 +77,8 @@
  2466.                 retval = false;
  2467.         }
  2468.  
  2469. -       if (getEffected().getCurrentHp()+1 > getEffected().getMaxHp()) {
  2470. +       if (getEffected().getCurrentHp()+1 > getEffected().getMaxHp())
  2471. +                {
  2472.             if(getSkill().isToggle())
  2473.             {
  2474.                 SystemMessage sm = new SystemMessage(SystemMessageId.S1_S2);
  2475. @@ -83,7 +86,7 @@
  2476.                 getEffected().sendPacket(sm);
  2477.                 //if (getEffected() instanceof L2PcInstance)
  2478.                     //((L2PcInstance)getEffected()).standUp();
  2479. -                retval = false;
  2480. +                                retval = false;
  2481.             }
  2482.         }
  2483.  
  2484. @@ -97,7 +100,7 @@
  2485.                 getEffected().sendPacket(sm);
  2486.                 //if (getEffected() instanceof L2PcInstance)
  2487.                     //((L2PcInstance)getEffected()).standUp();
  2488. -                retval = false;
  2489. +                                retval = false;
  2490.             }
  2491.         }
  2492.  
  2493. Index: java/net/sf/l2j/gameserver/skills/effects/EffectBigHead.java
  2494. ===================================================================
  2495. --- java/net/sf/l2j/gameserver/skills/effects/EffectBigHead.java    (revision 4415)
  2496. +++ java/net/sf/l2j/gameserver/skills/effects/EffectBigHead.java    (working copy)
  2497. @@ -21,9 +21,9 @@
  2498.  import net.sf.l2j.gameserver.skills.Env;
  2499.  
  2500.  /**
  2501. - *
  2502. - * @author  LBaldi
  2503. - */
  2504. +*
  2505. +* @author LBaldi
  2506. +*/
  2507.  final class EffectBigHead extends L2Effect
  2508.  {
  2509.  
  2510. @@ -39,12 +39,15 @@
  2511.     }
  2512.  
  2513.     @Override
  2514. -   public void onStart() {
  2515. +   public boolean onStart()
  2516. +   {
  2517.          getEffected().startAbnormalEffect(0x02000);
  2518. +        return true;
  2519.     }
  2520.  
  2521.     @Override
  2522. -   public void onExit() {
  2523. +   public void onExit()
  2524. +   {
  2525.          getEffected().stopAbnormalEffect(0x02000);
  2526.     }
  2527.  
  2528. Index: java/net/sf/l2j/gameserver/skills/effects/EffectHealOverTime.java
  2529. ===================================================================
  2530. --- java/net/sf/l2j/gameserver/skills/effects/EffectHealOverTime.java   (revision 4415)
  2531. +++ java/net/sf/l2j/gameserver/skills/effects/EffectHealOverTime.java   (working copy)
  2532. @@ -24,7 +24,7 @@
  2533.  import net.sf.l2j.gameserver.skills.Env;
  2534.  
  2535.  
  2536. -class EffectHealOverTime extends L2Effect
  2537. +public class EffectHealOverTime extends L2Effect
  2538.  {
  2539.     public EffectHealOverTime(Env env, EffectTemplate template)
  2540.     {
  2541. Index: java/net/sf/l2j/gameserver/skills/effects/EffectSignet.java
  2542. ===================================================================
  2543. --- java/net/sf/l2j/gameserver/skills/effects/EffectSignet.java (revision 0)
  2544. +++ java/net/sf/l2j/gameserver/skills/effects/EffectSignet.java (revision 0)
  2545. @@ -0,0 +1,161 @@
  2546. +/*
  2547. + * This program is free software; you can redistribute it and/or modify
  2548. + * it under the terms of the GNU General Public License as published by
  2549. + * the Free Software Foundation; either version 2, or (at your option)
  2550. + * any later version.
  2551. + *
  2552. + * This program is distributed in the hope that it will be useful,
  2553. + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  2554. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  2555. + * GNU General Public License for more details.
  2556. + *
  2557. + * You should have received a copy of the GNU General Public License
  2558. + * along with this program; if not, write to the Free Software
  2559. + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  2560. + * 02111-1307, USA.
  2561. + *
  2562. + * http://www.gnu.org/copyleft/gpl.html
  2563. + */
  2564. +package net.sf.l2j.gameserver.skills.effects;
  2565. +
  2566. +import java.util.logging.Logger;
  2567. +
  2568. +import net.sf.l2j.gameserver.datatables.NpcTable;
  2569. +import net.sf.l2j.gameserver.datatables.SkillTable;
  2570. +import net.sf.l2j.gameserver.datatables.SpawnTable;
  2571. +import net.sf.l2j.gameserver.model.L2Effect;
  2572. +import net.sf.l2j.gameserver.model.L2Skill;
  2573. +import net.sf.l2j.gameserver.model.L2Spawn;
  2574. +import net.sf.l2j.gameserver.model.L2WorldRegion;
  2575. +import net.sf.l2j.gameserver.model.L2Character;
  2576. +import net.sf.l2j.gameserver.model.L2Skill.SkillTargetType;
  2577. +import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
  2578. +import net.sf.l2j.gameserver.model.zone.form.ZoneCylinder;
  2579. +import net.sf.l2j.gameserver.model.zone.type.L2SignetZone;
  2580. +import net.sf.l2j.gameserver.network.SystemMessageId;
  2581. +import net.sf.l2j.gameserver.serverpackets.SystemMessage;
  2582. +import net.sf.l2j.gameserver.skills.Env;
  2583. +import net.sf.l2j.gameserver.skills.l2skills.L2SkillMagicOnGround;
  2584. +import net.sf.l2j.gameserver.templates.L2NpcTemplate;
  2585. +import net.sf.l2j.util.Point3D;
  2586. +
  2587. +
  2588. +/**
  2589. + * @author Forsaiken
  2590. + */
  2591. +
  2592. +public class EffectSignet extends L2Effect
  2593. +{
  2594. +   static Logger _log = Logger.getLogger(EffectSignet.class.getName());
  2595. +
  2596. +   private L2Spawn _spawn;
  2597. +
  2598. +   protected L2SignetZone zone;
  2599. +
  2600. +   public EffectSignet(Env env, EffectTemplate template)
  2601. +   {
  2602. +       super(env, template);
  2603. +   }
  2604. +
  2605. +   @Override
  2606. +   public boolean onStart()
  2607. +   {
  2608. +       int x = getEffected().getX();
  2609. +       int y = getEffected().getY();
  2610. +       int z = getEffected().getZ();
  2611. +
  2612. +       if (getEffected() instanceof L2PcInstance && getSkill().getTargetType() == L2Skill.SkillTargetType.TARGET_SIGNET_GROUND)
  2613. +       {
  2614. +           Point3D wordPosition = ((L2PcInstance) getEffected()).getCurrentSkillWorldPosition();
  2615. +
  2616. +           if (wordPosition != null)
  2617. +           {
  2618. +               x = wordPosition.getX();
  2619. +               y = wordPosition.getY();
  2620. +               z = wordPosition.getZ();
  2621. +           }
  2622. +       }
  2623. +
  2624. +       L2NpcTemplate template = NpcTable.getInstance().getTemplate(((L2SkillMagicOnGround) getSkill()).effectNpcId);
  2625. +       if (template != null)
  2626. +       {
  2627. +           try
  2628. +           {
  2629. +               _spawn = new L2Spawn(template);
  2630. +               _spawn.setLocx(x);
  2631. +               _spawn.setLocy(y);
  2632. +               _spawn.setLocz(z);
  2633. +               _spawn.setAmount(1);
  2634. +               _spawn.setHeading(getEffector().getHeading());
  2635. +               _spawn.setRespawnDelay(0);
  2636. +               SpawnTable.getInstance().addNewSpawn(_spawn, false);
  2637. +               _spawn.init();
  2638. +               _spawn.stopRespawn();
  2639. +           }
  2640. +           catch (Throwable e)
  2641. +           {
  2642. +               e.printStackTrace();
  2643. +           }
  2644. +       }
  2645. +
  2646. +       L2WorldRegion region = getEffected().getWorldRegion();
  2647. +
  2648. +       L2Skill skill = SkillTable.getInstance().getInfo(((L2SkillMagicOnGround) getSkill()).triggerEffectId, getLevel());
  2649. +
  2650. +       if (skill == null)
  2651. +       {
  2652. +           _log.warning("EffectSignet: Could not get the tigger effect " + ((L2SkillMagicOnGround) getSkill()).triggerEffectId);
  2653. +           onExit();
  2654. +           return false;
  2655. +       }
  2656. +
  2657. +       zone = new L2SignetZone(region, getEffected(), !getSkill().isOffensive(), getSkill().getId(), skill);
  2658. +
  2659. +       zone.setZone(new ZoneCylinder(x, y, z - 200, z + 200, getSkill().getSkillRadius()));
  2660. +
  2661. +       region.addZone(zone);
  2662. +
  2663. +       for (L2Character c : getEffected().getKnownList().getKnownCharacters())
  2664. +           zone.revalidateInZone(c);
  2665. +
  2666. +       zone.revalidateInZone(getEffected());
  2667. +       return true;
  2668. +   }
  2669. +
  2670. +   @Override
  2671. +   public void onExit()
  2672. +   {
  2673. +       if (_spawn != null)
  2674. +       {
  2675. +           _spawn.getLastSpawn().deleteMe();
  2676. +           SpawnTable.getInstance().deleteSpawn(_spawn, false);
  2677. +       }
  2678. +
  2679. +       if (zone != null)
  2680. +           zone.remove();
  2681. +   }
  2682. +
  2683. +   @Override
  2684. +   public EffectType getEffectType()
  2685. +   {
  2686. +       return EffectType.SIGNET;
  2687. +   }
  2688. +
  2689. +   @Override
  2690. +   public boolean onActionTime()
  2691. +   {
  2692. +       int mpConsume = getSkill().getMpConsume();
  2693. +
  2694. +       if (mpConsume > getEffected().getCurrentMp())
  2695. +       {
  2696. +           getEffected()
  2697. +                   .sendPacket(
  2698. +                           new SystemMessage(
  2699. +                                   SystemMessageId.SKILL_REMOVED_DUE_LACK_MP));
  2700. +           return false;
  2701. +       } else
  2702. +           getEffected().reduceCurrentMp(mpConsume);
  2703. +
  2704. +       return true;
  2705. +   }
  2706. +}
  2707. \ No newline at end of file
  2708. Index: java/net/sf/l2j/gameserver/skills/effects/EffectImmobileUntilAttacked.java
  2709. ===================================================================
  2710. --- java/net/sf/l2j/gameserver/skills/effects/EffectImmobileUntilAttacked.java  (revision 0)
  2711. +++ java/net/sf/l2j/gameserver/skills/effects/EffectImmobileUntilAttacked.java  (revision 0)
  2712. @@ -0,0 +1,60 @@
  2713. +/*
  2714. + * This program is free software: you can redistribute it and/or modify it under
  2715. + * the terms of the GNU General Public License as published by the Free Software
  2716. + * Foundation, either version 3 of the License, or (at your option) any later
  2717. + * version.
  2718. + *
  2719. + * This program is distributed in the hope that it will be useful, but WITHOUT
  2720. + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  2721. + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
  2722. + * details.
  2723. + *
  2724. + * You should have received a copy of the GNU General Public License along with
  2725. + * this program. If not, see <http://www.gnu.org/licenses/>.
  2726. + */
  2727. +package net.sf.l2j.gameserver.skills.effects;
  2728. +
  2729. +import net.sf.l2j.gameserver.model.L2Effect;
  2730. +import net.sf.l2j.gameserver.skills.Env;
  2731. +
  2732. +/**
  2733. + * @author Ahmed
  2734. + */
  2735. +public final class EffectImmobileUntilAttacked extends L2Effect
  2736. +{
  2737. +   public EffectImmobileUntilAttacked(Env env, EffectTemplate template)
  2738. +   {
  2739. +       super(env, template);
  2740. +   }
  2741. +  
  2742. +   @Override
  2743. +   public EffectType getEffectType()
  2744. +   {
  2745. +       return EffectType.IMMOBILE_UNTIL_ATTACKED;
  2746. +   }
  2747. +  
  2748. +   /** Notify started */
  2749. +   @Override
  2750. +   public boolean onStart()
  2751. +   {
  2752. +       getEffected().isImmobileUntilAttacked();
  2753. +       return true;
  2754. +   }
  2755. +  
  2756. +   /** Notify exited */
  2757. +   @Override
  2758. +   public void onExit()
  2759. +   {
  2760. +       getEffected().setIsImmobileUntilAttacked(false);
  2761. +   }
  2762. +
  2763. +   /**
  2764. +    * @see com.l2j.gameserver.model.L2Effect#onActionTime()
  2765. +    */
  2766. +   @Override
  2767. +   public boolean onActionTime()
  2768. +   {
  2769. +       // TODO Auto-generated method stub
  2770. +       return false;
  2771. +   }
  2772. +}
  2773. \ No newline at end of file
  2774. Index: java/net/sf/l2j/gameserver/skills/effects/EffectManaHealOverTime.java
  2775. ===================================================================
  2776. --- java/net/sf/l2j/gameserver/skills/effects/EffectManaHealOverTime.java   (revision 4415)
  2777. +++ java/net/sf/l2j/gameserver/skills/effects/EffectManaHealOverTime.java   (working copy)
  2778. @@ -23,7 +23,7 @@
  2779.  import net.sf.l2j.gameserver.skills.Env;
  2780.  
  2781.  
  2782. -class EffectManaHealOverTime extends L2Effect
  2783. +public class EffectManaHealOverTime extends L2Effect
  2784.  {
  2785.     public EffectManaHealOverTime(Env env, EffectTemplate template)
  2786.     {
  2787. Index: java/net/sf/l2j/gameserver/skills/effects/EffectCharmOfLuck.java
  2788. ===================================================================
  2789. --- java/net/sf/l2j/gameserver/skills/effects/EffectCharmOfLuck.java    (revision 4415)
  2790. +++ java/net/sf/l2j/gameserver/skills/effects/EffectCharmOfLuck.java    (working copy)
  2791. @@ -40,22 +40,28 @@
  2792.  
  2793.         /** Notify started */
  2794.         @Override
  2795. -       public void onStart() {
  2796. -              if (getEffected() instanceof L2PlayableInstance)
  2797. -                     ((L2PlayableInstance)getEffected()).startCharmOfLuck();
  2798. +       public boolean onStart()
  2799. +       {
  2800. +       if (getEffected() instanceof L2PlayableInstance)
  2801. +       {
  2802. +           ((L2PlayableInstance) getEffected()).startCharmOfLuck();
  2803. +           return true;
  2804. +       }
  2805. +       return false;
  2806.         }
  2807.  
  2808.         /** Notify exited */
  2809.         @Override
  2810. -       public void onExit() {
  2811. +       public void onExit()
  2812. +       {
  2813.                if (getEffected() instanceof L2PlayableInstance)
  2814.                       ((L2PlayableInstance)getEffected()).stopCharmOfLuck (this);
  2815.         }
  2816.  
  2817.      @Override
  2818. -       public boolean onActionTime()
  2819. +    public boolean onActionTime()
  2820.      {
  2821. -       // just stop this effect
  2822. -       return false;
  2823. +          // just stop this effect
  2824. +          return false;
  2825.      }
  2826.  }
  2827. Index: java/net/sf/l2j/gameserver/skills/effects/EffectImobileBuff.java
  2828. ===================================================================
  2829. --- java/net/sf/l2j/gameserver/skills/effects/EffectImobileBuff.java    (revision 4415)
  2830. +++ java/net/sf/l2j/gameserver/skills/effects/EffectImobileBuff.java    (working copy)
  2831. @@ -27,7 +27,8 @@
  2832.   * TODO To change the template for this generated type comment go to
  2833.   * Window - Preferences - Java - Code Style - Code Templates
  2834.   */
  2835. -final class EffectImobileBuff extends L2Effect {
  2836. +public class EffectImobileBuff extends L2Effect
  2837. +{
  2838.  
  2839.     public EffectImobileBuff(Env env, EffectTemplate template)
  2840.     {
  2841. @@ -42,21 +43,24 @@
  2842.  
  2843.     /** Notify started */
  2844.     @Override
  2845. -   public void onStart() {
  2846. -       getEffector().setIsImobilised(true);
  2847. +   public boolean onStart()
  2848. +   {
  2849. +       getEffector().setIsImmobilized(true);
  2850. +                return true;
  2851.     }
  2852.  
  2853.     /** Notify exited */
  2854.     @Override
  2855. -   public void onExit() {
  2856. -       getEffector().setIsImobilised(false);
  2857. +   public void onExit()
  2858. +        {
  2859. +       getEffector().setIsImmobilized(false);
  2860.     }
  2861.  
  2862.     @Override
  2863.     public boolean onActionTime()
  2864. -    {
  2865. -       // just stop this effect
  2866. -       return false;
  2867. -    }
  2868. +        {
  2869. +              // just stop this effect
  2870. +              return false;
  2871. +        }
  2872.  }
  2873.  
  2874. Index: java/net/sf/l2j/gameserver/skills/effects/EffectImobilePetBuff.java
  2875. ===================================================================
  2876. --- java/net/sf/l2j/gameserver/skills/effects/EffectImobilePetBuff.java (revision 4415)
  2877. +++ java/net/sf/l2j/gameserver/skills/effects/EffectImobilePetBuff.java (working copy)
  2878. @@ -29,7 +29,8 @@
  2879.   * TODO To change the template for this generated type comment go to
  2880.   * Window - Preferences - Java - Code Style - Code Templates
  2881.   */
  2882. -final class EffectImobilePetBuff extends L2Effect {
  2883. +public class EffectImobilePetBuff extends L2Effect
  2884. +{
  2885.       private L2Summon _pet;
  2886.  
  2887.     public EffectImobilePetBuff(Env env, EffectTemplate template)
  2888. @@ -45,29 +46,31 @@
  2889.  
  2890.     /** Notify started */
  2891.     @Override
  2892. -   public void onStart() {
  2893. +   public boolean onStart()
  2894. +   {
  2895.         _pet = null;
  2896.  
  2897. -       if (getEffected() instanceof L2Summon
  2898. -               && getEffector() instanceof L2PcInstance
  2899. -               && ((L2Summon)getEffected()).getOwner() == getEffector())
  2900. +       if (getEffected() instanceof L2Summon && getEffector() instanceof L2PcInstance && ((L2Summon) getEffected()).getOwner() == getEffector())
  2901.         {
  2902.             _pet = (L2Summon)getEffected();
  2903. -           _pet.setIsImobilised(true);
  2904. +           _pet.setIsImmobilized(true);
  2905. +           return true;
  2906.         }
  2907. +       return false;
  2908.     }
  2909.  
  2910.     /** Notify exited */
  2911.     @Override
  2912. -   public void onExit() {
  2913. +   public void onExit()
  2914. +        {
  2915.         if (_pet != null)
  2916. -           _pet.setIsImobilised(false);
  2917. +           _pet.setIsImmobilized(false);
  2918.     }
  2919.  
  2920.     @Override
  2921.     public boolean onActionTime()
  2922. -    {
  2923. -       // just stop this effect
  2924. -       return false;
  2925. -    }
  2926. +        {
  2927. +              // just stop this effect
  2928. +              return false;    
  2929. +        }
  2930.  }
  2931. Index: java/net/sf/l2j/gameserver/skills/effects/EffectSeed.java
  2932. ===================================================================
  2933. --- java/net/sf/l2j/gameserver/skills/effects/EffectSeed.java   (revision 4415)
  2934. +++ java/net/sf/l2j/gameserver/skills/effects/EffectSeed.java   (working copy)
  2935. @@ -21,11 +21,12 @@
  2936.  import net.sf.l2j.gameserver.model.L2Effect;
  2937.  import net.sf.l2j.gameserver.skills.Env;
  2938.  
  2939. -public final class EffectSeed extends L2Effect {
  2940. +public final class EffectSeed extends L2Effect
  2941. +{
  2942.  
  2943.     private int _power = 1;
  2944.  
  2945. -    public EffectSeed(Env env, EffectTemplate template)
  2946. +        public EffectSeed(Env env, EffectTemplate template)
  2947.     {
  2948.         super(env, template);
  2949.     }
  2950. @@ -38,10 +39,10 @@
  2951.  
  2952.     @Override
  2953.     public boolean onActionTime()
  2954. -    {
  2955. -       // just stop this effect
  2956. -       return false;
  2957. -    }
  2958. +        {
  2959. +              // just stop this effect
  2960. +              return false;
  2961. +        }
  2962.  
  2963.      public int getPower()
  2964.      {
  2965. Index: java/net/sf/l2j/gameserver/skills/effects/EffectConfusion.java
  2966. ===================================================================
  2967. --- java/net/sf/l2j/gameserver/skills/effects/EffectConfusion.java  (revision 4415)
  2968. +++ java/net/sf/l2j/gameserver/skills/effects/EffectConfusion.java  (working copy)
  2969. @@ -35,7 +35,8 @@
  2970.   *
  2971.   * Implementation of the Confusion Effect
  2972.   */
  2973. -final class EffectConfusion extends L2Effect {
  2974. +public class EffectConfusion extends L2Effect
  2975. +{
  2976.  
  2977.     public EffectConfusion(Env env, EffectTemplate template)
  2978.     {
  2979. @@ -50,19 +51,22 @@
  2980.  
  2981.     /** Notify started */
  2982.     @Override
  2983. -   public void onStart() {
  2984. +   public boolean onStart()
  2985. +   {
  2986.         getEffected().startConfused();
  2987.         onActionTime();
  2988. +                return true;
  2989.     }
  2990.  
  2991.     /** Notify exited */
  2992.     @Override
  2993. -   public void onExit() {
  2994. +   public void onExit()
  2995. +        {
  2996.         getEffected().stopConfused(this);
  2997.     }
  2998.  
  2999.      @Override
  3000. -   public boolean onActionTime()
  3001. +    public boolean onActionTime()
  3002.      {
  3003.         if (Config.DEBUG)
  3004.             System.out.println(getEffected());
Advertisement
Add Comment
Please, Sign In to add comment