Secret Experience

Secret Experience (https://secretexperience.net/)
-   [Lineage] Java Mods (https://secretexperience.net/lineage-java-mods/)
-   -   [L2JFree] Restrição de Bow em Class (https://secretexperience.net/lineage-java-mods/33128-restricao-de-bow-em-class.html)

allanalcantara 30-10-2011 02:54 AM

Restrição de Bow em Class
 
Eaew galera belezA? pois é estava ausente aqui de psotar coisas novas pra vocÊs, então estou aqui postando uma coisa bem bacana pra todos. então vamos nos

Citação:

Bom o que esse mod faz, ele faz com que a Class que você escolher não use bows . simples pratico e ÓTIMO de ser usado! :D
Código:

Index: /TrunK/*********_CORE/java/config/Class.properties
===================================================================
--- /TrunK/*********_CORE/java/config/Class.properties (revision 1585)
+++ /TrunK/*********_CORE/java/config/Class.properties (revision 1768)
@@ -136,2 +136,43 @@
 WeaponType = DAGGER
 Damage = 1.5
+
+#Disable Bow for classes: write here classes id
+#that you dnt want allow to use BOW. Class id examples,
+#you can find others into char_templates database table
+#
+# classId      className
+# 88            Duelist
+# 89            DreadNought
+# 90            Phoenix Knight
+# 91            Hell Knight
+# 92            Sagittarius
+# 93            Adventurer
+# 94            Archmage
+# 95            Soultaker
+# 96            Arcana Lord
+# 97            Cardinal
+# 98            Hierophant
+# 99            Eva Templar
+# 100          Sword Muse
+# 101          Wind Rider
+# 102          Moonlight Sentinel
+# 103          Mystic Muse
+# 104          Elemental Master
+# 105          Eva Saint
+# 106          Shillien Templar
+# 107          Spectral Dancer
+# 108          Ghost Hunter
+# 109          Ghost Sentinel
+# 110          Storm Screamer
+# 111          Spectral Master
+# 112          Shillen Saint
+# 113          Titan
+# 114          Grand Khauatari
+# 115          Dominator
+# 116          Doomcryer
+# 117          Fortune Seeker
+# 118          Maestro
+
+# e.g. DisableBowForClasses = 89, 90, 91, 92, 102, 109
+AltDisableBow = False
+DisableBowForClasses =
Index: /TrunK/*********_CORE/java/com/it/br/Config.java
===================================================================
--- /TrunK/*********_CORE/java/com/it/br/Config.java (revision 1744)
+++ /TrunK/*********_CORE/java/com/it/br/Config.java (revision 1768)
@@ -592,4 +592,7 @@
    public static int ALT_CLASSID;
    public static float ALT_DAMAGE;
+    public static boolean ALT_DISABLE_BOW_CLASSES;
+    public static String DISABLE_BOW_CLASSES_STRING;
+    public static FastList<Integer> DISABLE_BOW_CLASSES = new FastList<Integer>();
    public static boolean ESCAPE_INCOMBATE;
    public static boolean ALT_DAGGER;

@@ -1281,6 +1273,10 @@
                    ALT_SWORD = Class.getProperty("WeaponType", "DAGGER").equalsIgnoreCase("SWORD");
                    ALT_POLE = Class.getProperty("WeaponType", "DAGGER").equalsIgnoreCase("POLE");
+                        ALT_DISABLE_BOW_CLASSES = Boolean.parseBoolean(Class.getProperty("AltDisableBow", "False"));
+                        DISABLE_BOW_CLASSES_STRING = Class.getProperty("DisableBowForClasses", "");
+                                DISABLE_BOW_CLASSES = new FastList<Integer>();
+                                for (String class_id : DISABLE_BOW_CLASSES_STRING.split(","))
+                                {
+                                        if(!class_id.equals(""))
+                                                DISABLE_BOW_CLASSES.add(Integer.parseInt(class_id));
+                                }
+
            catch (Exception e)
            {
Index: /TrunK/*********_CORE/java/com/it/br/gameserver/network/clientpackets/UseItem.java
===================================================================
--- /TrunK/*********_CORE/java/com/it/br/gameserver/network/clientpackets/UseItem.java (revision 1752)
+++ /TrunK/*********_CORE/java/com/it/br/gameserver/network/clientpackets/UseItem.java (revision 1768)
@@ -451,4 +451,12 @@
                else
                {
+                        if (Config.ALT_DISABLE_BOW_CLASSES)
+                        {
+                                if(item.getItem() instanceof L2Weapon && ((L2Weapon)item.getItem()).getItemType() == L2WeaponType.BOW)
+                                {
+                                        if(Config.DISABLE_BOW_CLASSES.contains(activeChar.getClassId().getId())){
+                                                activeChar.sendMessage("This item can not be equipped by your class");
+                                                activeChar.sendPacket(ActionFailed.STATIC_PACKET);
+                                                return;
+                                        }
+                                }
+                        }
                        int tempBodyPart = item.getItem().getBodyPart();
                        L2ItemInstance tempItem = activeChar.getInventory().getPaperdollItemByL2ItemId(tempBodyPart);



Horários baseados na GMT -3. Agora são 05:13 AM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0