16-08-2010, 03:33 PM
|
#1 (permalink)
|
|
Membro - Veterano
Registrado em: Dec 2009
Posts: 1,335
Agradecido 803 Vezes em 427 Posts
Achei Ruim:
Acharam ruim Vezes em Posts
Rate
Designer:
Meu Estado:
|
Duvida de RestrictedItems DIFF
E Ae Gente Boa Tarde Queria Tirar Minha Duvid Sobre Essa Diff Ae! Qui Retirei os Codigos...
Se Ta Completa ow Imcompleta ow Ta Faltando Coisa
brigadao Pela Atencao vlw!!
Index: /Trunk/L2JStep_CORE/config/altsettings.properties
===================================================================
--- /Trunk/L2JStep_CORE/config/altsettings.properties (revision 99)
+++ /Trunk/L2JStep_CORE/config/altsettings.properties (revision 100)
@@ -133,2 +133,19 @@
+
+# This is the item restriction for olympiad. if an item is restricted , then a player cannot
+# Use it in olympiad mode. this is a fastlist. so it has to be like (OlyRestrictedItems = 1,2,3)
+OlyRestrictedItems = 0
+
Index: /TrunK/L2JStep_CORE/java/com/l2jstep/Config.java
===================================================================
--- /TrunK/L2JStep_CORE/java/com/l2jstep/Config.java (revision 99)
+++ /TrunK/L2JStep_CORE/java/com/l2jstep/Config.java (revision 100)
@@ -834,4 +834,9 @@
+ public static FastList<Integer> ALT_OLY_RESTRICTED_ITEMS = new FastList<Integer>();
@@ -1984,4 +1989,8 @@
+ ALT_OLY_RESTRICTED_ITEMS = new FastList<Integer>();
+ for (String id : AltSettings.getProperty("OlyRestrictedItems","0").split(","))
+ {
+ ALT_OLY_RESTRICTED_ITEMS.add(Integer.parseInt(id));
+ }
Index: /Trunk/L2JStep_CORE/java/com/l2jstep/gameserver/model/L2ItemInstance.java
===================================================================
--- /Trunk/L2JStep_CORE/java/com/l2jstep/gameserver/model/L2ItemInstance.java (revision 99)
+++ /Trunk/L2JStep_CORE/java/com/l2jstep/gameserver/model/L2ItemInstance.java (revision 100)
@@ -107,4 +107,10 @@
public long getDropTime()
{
return _dropTime;
}
+ public boolean isOlyRestrictedItem()
+ {
+ return (Config.ALT_OLY_RESTRICTED_ITEMS.contains(_itemId));
+ }
Index: /Trunk/L2JStep_CORE/java/com/l2jstep/gameserver/Olympiad.java
===================================================================
--- /Trunk/L2JStep_CORE/java/com/l2jstep/gameserver/Olympiad.java (revision 99)
+++ /Trunk/L2JStep_CORE/java/com/l2jstep/gameserver/Olympiad.java (revision 100)
@@ -107,4 +107,10 @@
+private void checkWeaponArmor(L2PcInstance player, L2ItemInstance wpn)
+ {
+ if (wpn != null && (wpn.isOlyRestrictedItem()))
+ {
+L2ItemInstance wpn;
+
+ if (player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND) != null)
+ {
+ wpn = player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND);
+ checkWeaponArmor(player, wpn);
+ }
+ if(player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_LRHAND) != null)
+ {
+ wpn = player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_LRHAND);
+ checkWeaponArmor(player, wpn);
+ }
+ if(player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_LHAND) != null)
+ {
+ wpn = player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_LHAND);
+ checkWeaponArmor(player, wpn);
+ }
+ if(player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_UNDER) != null)
+ {
+ wpn = player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_UNDER);
+ checkWeaponArmor(player, wpn);
+ }
+ if(player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_LEAR) != null)
+ {
+ wpn = player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_LEAR);
+ checkWeaponArmor(player, wpn);
+ }
+ if(player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_REAR) != null)
+ {
+ wpn = player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_REAR);
+ checkWeaponArmor(player, wpn);
+ }
+ if(player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_NECK) != null)
+ {
+ wpn = player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_NECK);
+ checkWeaponArmor(player, wpn);
+ }
+ if(player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_LFINGER) != null)
+ {
+ wpn = player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_LFINGER);
+ checkWeaponArmor(player, wpn);
+ }
+ if(player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_RFINGER) != null)
+ {
+ wpn = player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_RFINGER);
+ checkWeaponArmor(player, wpn);
+ }
+ if(player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_HEAD) != null)
+ {
+ wpn = player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_HEAD);
+ checkWeaponArmor(player, wpn);
+ }
+ if(player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_GLOVES) != null)
+ {
+ wpn = player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_GLOVES);
+ checkWeaponArmor(player, wpn);
+ }
+ if(player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_CHEST) != null)
+ {
+ wpn = player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_CHEST);
+ checkWeaponArmor(player, wpn);
+ }
+ if(player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_LEGS) != null)
+ {
+ wpn = player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_LEGS);
+ checkWeaponArmor(player, wpn);
+ }
+ if(player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_FEET) != null)
+ {
+ wpn = player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_FEET);
+ checkWeaponArmor(player, wpn);
+ }
+ if(player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_BACK) != null)
+ {
+ wpn = player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_BACK);
+ checkWeaponArmor(player, wpn);
+ }
+ if(player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_FACE) != null)
+ {
+ wpn = player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_FACE);
+ checkWeaponArmor(player, wpn);
+ }
+ if(player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_HAIR) != null)
+ {
+ wpn = player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_HAIR);
+ checkWeaponArmor(player, wpn);
+ }
+ if(player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_DHAIR) != null)
+ {
+ wpn = player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_DHAIR);
+ checkWeaponArmor(player, wpn);
+ }
|
|
|