at least these first 2 mods deserve enter ^^
Remove items from subclass:
You are paralized untill your subclass load:
No mastery - no armor equipping:
awaiting response from DNR, hope you like.
Remove items from subclass:
- Code:
--- trunk/gameserver/head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java (revision 910)
+++ trunk/gameserver/head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java (revision 912)
@@ -12563,43 +12579,8 @@
*/
public synchronized boolean addSubClass(int classId, int classIndex)
{
+ //Anti stuck Skills/Augments
+ //Remove Chest
+ L2ItemInstance chest = getInventory().getPaperdollItem(Inventory.PAPERDOLL_CHEST);
+ if (chest != null)
+ {
+
+ L2ItemInstance[] unequipped = getInventory().unEquipItemInBodySlotAndRecord(chest.getItem().getBodyPart());
+ InventoryUpdate iu = new InventoryUpdate();
+ for (L2ItemInstance element : unequipped)
+ iu.addModifiedItem(element);
+ sendPacket(iu);
+
+ }
+ //Remove Item RHAND
+ L2ItemInstance rhand = getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND);
+ if (rhand != null)
+ {
+
+ L2ItemInstance[] unequipped = getInventory().unEquipItemInBodySlotAndRecord(rhand.getItem().getBodyPart());
+ InventoryUpdate iu = new InventoryUpdate();
+ for (L2ItemInstance element : unequipped)
+ iu.addModifiedItem(element);
+ sendPacket(iu);
+
+ }
+ //Remove Item LHAND
+ L2ItemInstance lhand = getInventory().getPaperdollItem(Inventory.PAPERDOLL_LHAND);
+ if (lhand != null)
+ {
+
+ L2ItemInstance[] unequipped = getInventory().unEquipItemInBodySlotAndRecord(lhand.getItem().getBodyPart());
+ InventoryUpdate iu = new InventoryUpdate();
+ for (L2ItemInstance element : unequipped)
+ iu.addModifiedItem(element);
+ sendPacket(iu);
+
+ }
- // Reload skills from armors / jewels / weapons
- getInventory().reloadEquippedItems();
if(getTotalSubClasses() == Config.ALLOWED_SUBCLASS || classIndex == 0)
return false;
@@ -12848,61 +12829,7 @@
sendPacket( ActionFailed.STATIC_PACKET );
return false;
}
+
+ L2ItemInstance rhand = getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND);
+ if(rhand != null)
+ {
+ L2ItemInstance[] unequipped = getInventory().unEquipItemInBodySlotAndRecord(rhand.getItem().getBodyPart());
+ InventoryUpdate iu = new InventoryUpdate();
+
+ for(L2ItemInstance element : unequipped)
+ {
+ iu.addModifiedItem(element);
+ }
+
+ sendPacket(iu);
+ rhand = null;
+ iu = null;
+ unequipped = null;
+ }
+
+ L2ItemInstance lhand = getInventory().getPaperdollItem(Inventory.PAPERDOLL_LHAND);
+
+ if(lhand != null)
+ {
+ L2ItemInstance[] unequipped = getInventory().unEquipItemInBodySlotAndRecord(lhand.getItem().getBodyPart());
+ InventoryUpdate iu = new InventoryUpdate();
+
+ for(L2ItemInstance element : unequipped)
+ {
+ iu.addModifiedItem(element);
+ }
+
+ sendPacket(iu);
+ lhand = null;
+ iu = null;
+ unequipped = null;
+ }
+
+ L2ItemInstance chest = getInventory().getPaperdollItem(Inventory.PAPERDOLL_CHEST);
+
+ if(chest != null)
+ {
+ L2ItemInstance[] unequipped = getInventory().unEquipItemInBodySlotAndRecord(chest.getItem().getBodyPart());
+ InventoryUpdate iu = new InventoryUpdate();
+
+ for(L2ItemInstance element : unequipped)
+ {
+ iu.addModifiedItem(element);
+ }
+
+ sendPacket(iu);
+ chest = null;
+ iu = null;
+ unequipped = null;
+ }
+
// Delete a force buff upon class change.
//thank l2j-arhid
if(_forceBuff != null)
@@ -13019,6 +12946,9 @@
restoreEffects();
}
- // Reload skills from armors / jewels / weapons
- getInventory().reloadEquippedItems();
-
checkAllowedSkills();
sendPacket(new EtcStatusUpdate(this));
You are paralized untill your subclass load:
- Code:
Index: java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java
===================================================================
@@ -8425,4 +8425,6 @@
public boolean addSubClass(int classId, int classIndex)
{
if (getTotalSubClasses() == 3 || classIndex == 0)
return false;
@@ -8430,4 +8432,8 @@
if (getSubClasses().containsKey(classIndex))
return false;
+
+ startAbnormalEffect(L2Character.ABNORMAL_EFFECT_HOLD_1);
+ setIsParalyzed(true);
+ sendMessage("You are paralized untill your subclass load.");
// Note: Never change _classIndex in any method other than setActiveClass().
@@ -8492,4 +8498,8 @@
if (Config.DEBUG)
_log.info(getName() + " was given " + getAllSkills().length + " skills for their new sub class.");
+
+ setIsParalyzed(false);
+ stopAbnormalEffect(L2Character.ABNORMAL_EFFECT_HOLD_1);
+ sendMessage("You are unparalized.");
return true;
No mastery - no armor equipping:
- Code:
Index: java/net/sf/l2j/gameserver/network/clientpackets/UseItem.java
===================================================================
--- java/net/sf/l2j/gameserver/network/clientpackets/UseItem.java (revision 3297)
+++ java/net/sf/l2j/gameserver/network/clientpackets/UseItem.java (working copy)
@@ -326,6 +326,31 @@
activeChar.sendPacket(new SystemMessage(SystemMessageId.CANNOT_EQUIP_ITEM_DUE_TO_BAD_CONDITION));
return;
}
+ if (activeChar.getLevel() >= 40)
+ {
+ if (!(activeChar.getSkillLevel(227) >= 1) || !(activeChar.getSkillLevel(233) >= 1)
+ || !(activeChar.getSkillLevel(236) >= 1) || !(activeChar.getSkillLevel(252) >= 1)
+ || !(activeChar.getSkillLevel(258) >= 1) || !(activeChar.getSkillLevel(465) >= 1) &&
+ (item.getItem().getItemType() == L2ArmorType.LIGHT))
+ {
+ activeChar.sendMessage("You cannot wear this type of armor unless you have a mastery for it.");
+ return;
+ }
+ if (!(activeChar.getSkillLevel(231) >= 1) || !(activeChar.getSkillLevel(232) >= 1)
+ || !(activeChar.getSkillLevel(253) >= 1) || !(activeChar.getSkillLevel(259) >= 1) &&
+ (item.getItem().getItemType() == L2ArmorType.HEAVY))
+ {
+ activeChar.sendMessage("You cannot wear this type of armor unless you have a mastery for it.");
+ return;
+ }
+ if (!(activeChar.getSkillLevel(234) >= 1) || !(activeChar.getSkillLevel(235) >= 1)
+ || !(activeChar.getSkillLevel(251) >= 1) &&
+ (item.getItem().getItemType() == L2ArmorType.MAGIC))
+ {
+ activeChar.sendMessage("You cannot wear this type of armor unless you have a mastery for it.");
+ return;
+ }
+ }
break;
}
case L2Item.SLOT_DECO:
awaiting response from DNR, hope you like.