Advertisement
warc222

Credits: Unknown. Stuck Augments [L2Jfrozen]

Oct 4th, 2015
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.04 KB | None | 0 0
  1. Index: gameserver/config/functions/l2jfrozen.properties
  2. ===================================================================
  3. --- gameserver/config/functions/l2jfrozen.properties (revisão 63)
  4. +++ gameserver/config/functions/l2jfrozen.properties (cópia de trabalho)
  5. @@ -308,4 +308,9 @@
  6.  
  7. ProtectorSkillTime = 600
  8. # Npc Protector Message
  9. -ProtectorMessage = Hey You!, Never Kill On This Area, Go Read The Rules!
  10. \ No newline at end of file
  11. +ProtectorMessage = Hey You!, Never Kill On This Area, Go Read The Rules!
  12. +
  13. +# -----------------------------------------------------
  14. +# Stuck Augments
  15. +# -----------------------------------------------------
  16. +# Enable stuck augments?
  17. +# Default: False
  18. +StuckAugment = True
  19. \ No newline at end of file
  20. Index: D:/L2JFrozen/L2JFrozen/gameserver/head-src/com/l2jfrozen/Config.java
  21. ===================================================================
  22. --- head-src/com/l2jfrozen/Config.java (revisão 71)
  23. +++ head-src/com/l2jfrozen/Config.java (cópia de trabalho)
  24. @@ -163,6 +163,7 @@
  25. public static boolean STRICT_HERO_SYSTEM;
  26. public static boolean REMOVER_ITEMS_SUB;
  27. public static int MANA_POTION_RES;
  28. + public static boolean RETAIL_AUGMENTATIONS;
  29. //============================================================
  30. @@ -390,6 +391,7 @@
  31. STRICT_HERO_SYSTEM = Boolean.parseBoolean(L2JFrozenSettings.getProperty("StrictHeroSystem", "False"));
  32. REMOVER_ITEMS_SUB = Boolean.parseBoolean(L2JFrozenSettings.getProperty("RemoverItemsSubClasse", "False"));
  33. MANA_POTION_RES = Integer.parseInt(L2JFrozenSettings.getProperty("ManaPotionMPRes", "200"));
  34. + STUCK_AUGMENTS = Boolean.parseBoolean(L2JFrozenSettings.getProperty("StuckAugments", "False"));
  35. //============================================================
  36. }
  37. catch(Exception e)
  38. Index: head-src/com/l2jfrozen/gameserver/network/clientpackets/UseItem.java
  39. ===================================================================
  40. --- head-src/com/l2jfrozen/gameserver/network/clientpackets/UseItem.java (revisão 45)
  41. +++ head-src/com/l2jfrozen/gameserver/network/clientpackets/UseItem.java (cópia de trabalho)
  42. import com.l2jfrozen.gameserver.network.serverpackets.ShowCalculator;
  43. import com.l2jfrozen.gameserver.network.serverpackets.SystemMessage;
  44. import com.l2jfrozen.gameserver.network.serverpackets.UserInfo;
  45. +import com.l2jfrozen.gameserver.templates.L2Item;
  46. +import com.l2jfrozen.gameserver.model.L2Skill;
  47. import com.l2jfrozen.gameserver.templates.L2Weapon;
  48.  
  49. @@ -327,7 +327,35 @@
  50. activeChar.sendMessage("This item can not be equipped when you have the flag.");
  51. return;
  52. }
  53. -
  54. +
  55. + if (Config.STUCK_AUGMENTS)
  56. + {
  57. + if (bodyPart == L2Item.SLOT_L_HAND)
  58. + {
  59. + if (activeChar.getInventory().getPaperdollItemByL2ItemId(0x4000) != null && activeChar.getInventory().getPaperdollItemByL2ItemId(0x4000).getAugmentation() !=null)
  60. + {
  61. + activeChar.getInventory().getPaperdollItemByL2ItemId(0x4000).getAugmentation().removeBoni(activeChar);
  62. + }
  63. + }
  64. +
  65. + L2Effect[] effects = activeChar.getAllEffects();
  66. +
  67. + for (L2Effect e : effects)
  68. + {
  69. + if ((e.getSkill().getSkillType() == L2Skill.SkillType.BUFF ||
  70. + e.getSkill().getSkillType() == L2Skill.SkillType.HEAL_PERCENT ||
  71. + e.getSkill().getSkillType() == L2Skill.SkillType.REFLECT)
  72. + && (e.getSkill().getId() >= 3124 && e.getSkill().getId() <= 3259)
  73. + && (bodyPart == L2Item.SLOT_LR_HAND
  74. + || bodyPart == L2Item.SLOT_L_HAND
  75. + || bodyPart == L2Item.SLOT_R_HAND))
  76. + {
  77. + activeChar.stopSkillEffects(e.getSkill().getId());
  78. + break;
  79. + }
  80. + }
  81. + }
  82. +
  83. // Don't allow weapon/shield equipment if wearing formal wear
  84. if(activeChar.isWearingFormalWear() && (bodyPart == L2Item.SLOT_LR_HAND || bodyPart == L2Item.SLOT_L_HAND || bodyPart == L2Item.SLOT_R_HAND))
  85.  
  86. {
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement