Advertisement
hitnar

ArmorBreaker+Fix

Feb 16th, 2016
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 7.65 KB | None | 0 0
  1. Index: trunk/dist/game/data/scripts/handlers/EffectMasterHandler.java
  2. ===================================================================
  3. --- trunk/dist/game/data/scripts/handlers/EffectMasterHandler.java  (revision 1246)
  4. +++ trunk/dist/game/data/scripts/handlers/EffectMasterHandler.java  (working copy)
  5. @@ -79,6 +79,7 @@
  6.         DetectHiddenObjects.class,
  7.         Detection.class,
  8.         Disarm.class,
  9. +       Disbody.class,
  10.         DispelAll.class,
  11.         DispelByCategory.class,
  12.         DispelBySlot.class,
  13. Index: trunk/dist/game/data/scripts/handlers/effecthandlers/Disbody.java
  14. ===================================================================
  15. --- trunk/dist/game/data/scripts/handlers/effecthandlers/Disbody.java   (revision 0)
  16. +++ trunk/dist/game/data/scripts/handlers/effecthandlers/Disbody.java   (revision 0)
  17. @@ -0,0 +1,53 @@
  18. +/*
  19. + * This file is part of the L2J Mobius project.
  20. + *
  21. + * This program is free software: you can redistribute it and/or modify
  22. + * it under the terms of the GNU General Public License as published by
  23. + * the Free Software Foundation, either version 3 of the License, or
  24. + * (at your option) any later version.
  25. + *
  26. + * This program is distributed in the hope that it will be useful,
  27. + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  28. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  29. + * General Public License for more details.
  30. + *
  31. + * You should have received a copy of the GNU General Public License
  32. + * along with this program. If not, see <http://www.gnu.org/licenses/>.
  33. + */
  34. +package handlers.effecthandlers;
  35. +
  36. +import com.l2jmobius.gameserver.model.StatsSet;
  37. +import com.l2jmobius.gameserver.model.conditions.Condition;
  38. +import com.l2jmobius.gameserver.model.effects.AbstractEffect;
  39. +import com.l2jmobius.gameserver.model.effects.EffectFlag;
  40. +import com.l2jmobius.gameserver.model.skills.BuffInfo;
  41. +
  42. +/**
  43. + * Disarm effect implementation.
  44. + * @author nBd
  45. + */
  46. +public final class Disbody extends AbstractEffect
  47. +{
  48. +   public Disbody(Condition attachCond, Condition applyCond, StatsSet set, StatsSet params)
  49. +   {
  50. +       super(attachCond, applyCond, set, params);
  51. +   }
  52. +  
  53. +   @Override
  54. +   public boolean canStart(BuffInfo info)
  55. +   {
  56. +       return info.getEffected().isPlayer();
  57. +   }
  58. +  
  59. +   @Override
  60. +   public int getEffectFlags()
  61. +   {
  62. +       return EffectFlag.DISARMED.getMask();
  63. +   }
  64. +  
  65. +   @Override
  66. +   public void onStart(BuffInfo info)
  67. +   {
  68. +       info.getEffected().getActingPlayer().disarmBody();
  69. +   }
  70. +}
  71. Index: trunk/dist/game/data/stats/skills/10500-10599.xml
  72. ===================================================================
  73. --- trunk/dist/game/data/stats/skills/10500-10599.xml   (revision 1246)
  74. +++ trunk/dist/game/data/stats/skills/10500-10599.xml   (working copy)
  75. @@ -933,7 +933,7 @@
  76.         <set name="reuseDelay" val="60000" />
  77.         <set name="magicLvl" val="#magicLvl" />
  78.         <set name="targetType" val="SELF" />
  79. -       <set name="operateType" val="ACTIVE_INSTANT" />
  80. +       <set name="operateType" val="ACTIVE_CONTINUOUS" />
  81.         <enchant1 name="mpConsume" val="#ench1MpConsume" />
  82.         <enchant2 name="abnormalTime" val="#ench2abnormalTime" />
  83.         <enchant9 name="reuseDelay" val="#ench9Reuse" />
  84. @@ -1877,9 +1877,15 @@
  85.             <using kind="DAGGER, DUALDAGGER" />
  86.         </cond>
  87.         <for>
  88. -           <effect name="Bluff" />
  89. -           <effect  name="Stun" />
  90. -           <effect name="TargetCancel" />
  91. +           <effect name="Bluff">
  92. +               <param chance="80" />
  93. +           </effect>
  94. +           <effect name="TargetCancel">
  95. +               <param chance="80" />
  96. +           </effect>
  97. +           <effect name="DeleteHateOfMe">
  98. +               <param chance="80" />
  99. +           </effect>
  100.             <effect name="TriggerSkillByAttack">
  101.                 <param attackerType="L2Character" minAttackerLevel="1" maxAttackerLevel="100" />
  102.                 <param minDamage="1" chance="70" />
  103. Index: trunk/dist/game/data/stats/skills/10700-10799.xml
  104. ===================================================================
  105. --- trunk/dist/game/data/stats/skills/10700-10799.xml   (revision 1246)
  106. +++ trunk/dist/game/data/stats/skills/10700-10799.xml   (working copy)
  107. @@ -50,10 +50,35 @@
  108.     </skill>
  109.     <!-- Cancels target's armor for $s1. Requires dagger/dual dagger. Consumes $s2 Soulstones. -->
  110.     <skill id="10703" levels="3" name="Armor Breaker">
  111. -       <!-- AUTO GENERATED INFINITE ODYSSEY SKILL TODO: FIX IT -->
  112. -       <set name="icon" val="icon.skill0000" />
  113. -       <set name="operateType" val="ACTIVE_INSTANT" />
  114. -       <set name="targetType" val="SELF" />
  115. +       <!-- FIX CHANCE -->
  116. +       <set name="icon" val="icon.skill10703" />
  117. +       <set name="abnormalLvl" val="1" />
  118. +       <set name="abnormalTime" val="5" />
  119. +       <set name="abnormalType" val="DISBODY" />
  120. +       <set name="abnormalVisualEffect" val="DOT_BLEEDING" />
  121. +       <set name="activateRate" val="90" />
  122. +       <set name="power" val="50" />
  123. +       <set name="basicProperty" val="STR" />
  124. +       <set name="castRange" val="40" />
  125. +       <set name="coolTime" val="500" />
  126. +       <set name="effectPoint" val="-100" />
  127. +       <set name="effectRange" val="200" />
  128. +       <set name="hitTime" val="1000" />
  129. +       <set name="isDebuff" val="true" />
  130. +       <set name="lvlBonusRate" val="1" />
  131. +       <set name="magicLvl" val="99" />
  132. +       <set name="mpConsume" val="77" />
  133. +       <set name="operateType" val="ACTIVE_CONTINUOUS" />
  134. +       <set name="reuseDelay" val="90000" />
  135. +       <set name="rideState" val="NONE" />
  136. +       <set name="targetType" val="ONE" />
  137. +       <set name="itemConsumeCount" val="2" />
  138. +       <set name="itemConsumeId" val="3031" /> <!-- Spirit Ore -->    
  139. +       <for>
  140. +           <effect name="Disbody">
  141. +               <param chance="80" />
  142. +           </effect>
  143. +       </for>
  144.     </skill>
  145.     <!-- Reveals the enemy's back and inflicts Stun for $s1. Requires dagger/dual dagger. Consumes $s2 Soulstones. -->
  146.     <skill id="10704" levels="3" name="Mass Power Bluff">
  147. Index: trunk/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java
  148. ===================================================================
  149. --- trunk/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java  (revision 1246)
  150. +++ trunk/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java  (working copy)
  151. @@ -6614,6 +6614,47 @@
  152.         return true;
  153.     }
  154.    
  155. +   /**
  156. +    * Disarm the player's Body.
  157. +    * @return {@code true}.
  158. +    */
  159. +   public boolean disarmBody()
  160. +   {
  161. +       final L2ItemInstance sld = getInventory().getPaperdollItem(Inventory.PAPERDOLL_CHEST);
  162. +       if (sld != null)
  163. +       {
  164. +           final L2ItemInstance[] unequiped = getInventory().unEquipItemInBodySlotAndRecord(sld.getItem().getBodyPart());
  165. +           final InventoryUpdate iu = new InventoryUpdate();
  166. +           for (L2ItemInstance itm : unequiped)
  167. +           {
  168. +               iu.addModifiedItem(itm);
  169. +           }
  170. +           sendPacket(iu);
  171. +          
  172. +           abortAttack();
  173. +           broadcastUserInfo();
  174. +          
  175. +           // this can be 0 if the user pressed the right mousebutton twice very fast
  176. +           if (unequiped.length > 0)
  177. +           {
  178. +               SystemMessage sm = null;
  179. +               if (unequiped[0].getEnchantLevel() > 0)
  180. +               {
  181. +                   sm = SystemMessage.getSystemMessage(SystemMessageId.THE_EQUIPMENT_S1_S2_HAS_BEEN_REMOVED);
  182. +                   sm.addInt(unequiped[0].getEnchantLevel());
  183. +                   sm.addItemName(unequiped[0]);
  184. +               }
  185. +               else
  186. +               {
  187. +                   sm = SystemMessage.getSystemMessage(SystemMessageId.S1_HAS_BEEN_UNEQUIPPED);
  188. +                   sm.addItemName(unequiped[0]);
  189. +               }
  190. +               sendPacket(sm);
  191. +           }
  192. +       }
  193. +       return true;
  194. +   }
  195. +  
  196.     public boolean mount(L2Summon pet)
  197.     {
  198.         if (!Config.ALLOW_MOUNTS_DURING_SIEGE && isInsideZone(ZoneId.SIEGE))
  199. Index: trunk/java/com/l2jmobius/gameserver/model/skills/AbnormalType.java
  200. ===================================================================
  201. --- trunk/java/com/l2jmobius/gameserver/model/skills/AbnormalType.java  (revision 1246)
  202. +++ trunk/java/com/l2jmobius/gameserver/model/skills/AbnormalType.java  (working copy)
  203. @@ -117,6 +117,7 @@
  204.     DERANGEMENT,
  205.     DETECT_WEAKNESS,
  206.     DISARM,
  207. +   DISBODY,
  208.     DITTY_BUFF,
  209.     DMG_SHIELD,
  210.     DOT_ATTR,
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement