Tópico: [L2JServer] Enchant Protection Packet
Ver um Único Post
Antigo 04-01-2012, 08:11 PM   #1 (permalink)
polarbr
Membro - Recruta
 
Avatar de polarbr
 
Registrado em: Apr 2011
Posts: 1
Agradeceu: 3
Agradecido 0 Vezes em 0 Posts
Achei Ruim:
Acharam ruim Vezes em Posts
Meu Estado:

Inventório de polarbr

Padrão Enchant Protection Packet

Bem pessoal,vim postar pra vocês uma pacote de proteções para enchantar, Meu Primeiro Post

Código: [Somente Usuários Registrados Podem Visualizar os Links Desta PáginaClique aqui para se Registrar]
### Eclipse Workspace Patch 1.0
#P L2JWind_Gameserver
#by BrunoBR
Index: java/net/sf/l2j/gameserver/clientpackets/RequestEnchantItem.java
===================================================================
--- java/net/sf/l2j/gameserver/clientpackets/RequestEnchantItem.java	(revision 5117)
+++ java/net/sf/l2j/gameserver/clientpackets/RequestEnchantItem.java	(working copy)
@@ -69,6 +69,121 @@
         	activeChar.sendPacket(new SystemMessage(SystemMessageId.INAPPROPRIATE_ENCHANT_CONDITION));
             return;
         }
+        if(activeChar.isInCraftMode())
+        {
+             activeChar.setActiveEnchantItem(null);
+             activeChar.sendMessage("Can't enchant while Crafting");
+             return;
+        }
+        if(activeChar.isTeleporting())
+            {
+            activeChar.setActiveEnchantItem(null);
+            activeChar.sendMessage("Can't enchant while You Teleporting");
+            return;
+            }
+        if(activeChar.isDead())
+            {
+            activeChar.setActiveEnchantItem(null);
+            activeChar.sendMessage("Can't enchant while You Are Dead");
+            return;
+            }
+        if(activeChar.isSleeping())
+            {
+            activeChar.setActiveEnchantItem(null);
+            activeChar.sendMessage("Can't enchant while You Are In Sleep");
+            return;
+            }
+        if(activeChar.isParalyzed())
+            {
+            activeChar.setActiveEnchantItem(null);
+            activeChar.sendMessage("Can't enchant while You Are In Para");
+            return;
+            }
+        
+        if(activeChar.isCastingNow())
+            {
+            activeChar.setActiveEnchantItem(null);
+            activeChar.sendMessage("Can't enchant while Casting");
+            return;
+            }
+        
+        if(activeChar.isMoving())
+        {
+        activeChar.setActiveEnchantItem(null);
+        activeChar.sendMessage("Can't enchant while moving");
+        return;
+        }
+
+        if(activeChar.isProcessingTransaction())
+        {
+        activeChar.setActiveEnchantItem(null);
+        activeChar.sendMessage("Can't enchant while trading");
+        return;
+        }
+
+        if(activeChar.isStunned())
+        {
+        activeChar.setActiveEnchantItem(null);
+        activeChar.sendMessage("Can't enchant while stunned");
+        return;
+        }
+
+        if(activeChar.isMounted())
+        {
+        activeChar.setActiveEnchantItem(null);
+        activeChar.sendMessage("Can't enchant while mounted");
+        return;
+        }
+
+        if(activeChar.isFakeDeath())
+        {
+        activeChar.setActiveEnchantItem(null);
+        activeChar.sendMessage("Can't enchant while fake death");
+        return;
+        }
+
+        if(activeChar.isInJail())
+        {
+        activeChar.setActiveEnchantItem(null);
+        activeChar.sendMessage("Can't enchant while in jail");
+        return;
+        }
+
+        if(activeChar.isCursedWeaponEquiped())
+        {
+        activeChar.setActiveEnchantItem(null);
+        activeChar.sendMessage("Can't enchant while cursed weapon");
+        return;
+        }
+
+        if(activeChar.isInWater())
+        {
+        activeChar.setActiveEnchantItem(null);
+        activeChar.sendMessage("Can't enchant while in water");
+        return;
+        }
+
+        if(activeChar.isFlying())
+        {
+        activeChar.setActiveEnchantItem(null);
+        activeChar.sendMessage("Can't enchant while flying");
+        return;
+        }
+
+        if(activeChar.isFishing())
+        {
+        activeChar.setActiveEnchantItem(null);
+        activeChar.sendMessage("Can't enchant while fishing");
+        return;
+        }
+
+        if(activeChar.isSitting()) 
+        { 
+        activeChar.setActiveEnchantItem(null);
+        activeChar.sendMessage("Can't enchant while sitting"); 
+        return; 
+        } 
+        
         if(item.isWear())
         {
             Util.handleIllegalPlayerAction(activeChar,"Player "+activeChar.getName()+" tried to enchant a weared Item", IllegalPlayerAction.PUNISH_KICK);
Creditos: BrunoBR(Eu)

Bom Uso !

polarbr está offline  
Links Patrocinados