Jump to content

Recommended Posts

Posted

java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java

+import com.l2jserver.gameserver.datatables.ArmorSetsTable;
import com.l2jserver.gameserver.datatables.ClanTable;

@@ -7458,7 +7482,169 @@

 /** Special hero aura values */
+	 private boolean isHero = false;

+	 public void setHeroAura (boolean heroAura)
+	 {
+		 isHero = heroAura;
+	 }



@@ -7458,7 +7482,169 @@
		checkPetInvItems();
	}
+	
+	public void checkForHeroAura()
+	{
+		
+		boolean getHeroAura = false;
+		try
+		{
+			if (
+					ArmorSetsTable.getInstance().getSet(Armor id).isEnchanted(4, this)
+					|| ArmorSetsTable.getInstance().getSet(Armorid).isEnchanted(4, this)
+					|| ArmorSetsTable.getInstance().getSet(Armorid).isEnchanted(4, this)
+					|| ArmorSetsTable.getInstance().getSet(Armorid).isEnchanted(4, this)
+					|| ArmorSetsTable.getInstance().getSet(Armorid).isEnchanted(4, this)
+					|| ArmorSetsTable.getInstance().getSet(Armorid).isEnchanted(4, this)
+					|| ArmorSetsTable.getInstance().getSet(Armorid).isEnchanted(4, this)
+					|| ArmorSetsTable.getInstance().getSet(Armorid).isEnchanted(4, this)
+					|| ArmorSetsTable.getInstance().getSet(Armorid).isEnchanted(4, this)
+					|| ArmorSetsTable.getInstance().getSet(Armorid).isEnchanted(4, this)
+					|| ArmorSetsTable.getInstance().getSet(Armorid).isEnchanted(4, this)
+					|| ArmorSetsTable.getInstance().getSet(Armorid).isEnchanted(4, this)
+				)
+			{
+				getHeroAura = true;
+			}
+		}
+		catch (Exception e)
+		{
+			_log.log(Level.WARNING,"Armor exception message: " + e.getMessage(),e);
+		
+		}
+		
+		if (getHeroAura)
+		{
+			setHeroAura(true);
+		}
+		else
+		{
+			setHeroAura(false);
+		}
+	}
+		
+		
+	
+	/**
	 * Restore recipe book data for this L2PcInstance.
	 */
	private void restoreRecipeBook(boolean loadCommon)


java/com/l2jserver/gameserver/model/L2ArmorSet.java

		return true;
	}
+	
+		
+	public boolean isEnchanted(int enchantLevel, L2PcInstance player)
+	{
+		if (!containAll(player))
+			return false;
+		
+		Inventory inv = player.getInventory();
+		
+		L2ItemInstance chestItem = inv.getPaperdollItem(Inventory.PAPERDOLL_CHEST);
+		L2ItemInstance legsItem = inv.getPaperdollItem(Inventory.PAPERDOLL_LEGS);
+		L2ItemInstance headItem = inv.getPaperdollItem(Inventory.PAPERDOLL_HEAD);
+		L2ItemInstance glovesItem = inv.getPaperdollItem(Inventory.PAPERDOLL_GLOVES);
+		L2ItemInstance feetItem = inv.getPaperdollItem(Inventory.PAPERDOLL_FEET);
+	
+		if (chestItem == null || chestItem.getEnchantLevel() < enchantLevel)
+			return false;
+				if (_legs != 0 && (legsItem == null || legsItem.getEnchantLevel() < enchantLevel))
+					return false;
+				if (_gloves != 0 && (glovesItem == null || glovesItem.getEnchantLevel() < enchantLevel))
+					return false;
+				if (_head != 0 && (headItem == null || headItem.getEnchantLevel() < enchantLevel))
+					return false;
+				if (_feet != 0 && (feetItem == null || feetItem.getEnchantLevel() < enchantLevel))
+					return false;
+	
+			return true;
+		}
}

java/com/l2jserver/gameserver/model/itemcontainer/Inventory.jav
								_log.warning("Inventory.ArmorSetListener: Incorrect skill: "+armorSet.getEnchant6skillId()+".");
						}
					}
+					player.checkForHeroAura();
				}
			}
			else if (armorSet.containShield(item.getItemId()))

			if (remove)
			{
+				player.checkForHeroAura();
				if (skills != null)
				{
					for (String skillInfo : skills)

hello pedes. ekane ena code pou otan pas olo to set +4 8a exeis hero aura. mporeite na diale3ete se pia armor 8a ginete auta... px an exete balei mia custom armor mporeite na parete to id tis kai na balete na ginete se auth... pws???

|| ArmorSetsTable.getInstance().getSet(Armorid).isEnchanted(4, this) opou armorid-> bazete to id tis armor... kai opou -> isenchanted(4 bazete sta posa 8elete na dinei heroaura. prepei na exete ola ta set +x.

 

credits To Me AbSoLuTePoWeR.

Posted

+ public void setHeroAura (boolean heroAura)

+ {

+ isHero = heroAura;

+ return;

+ }

 

den xreiazesai to return.

Posted

Do not quite understand, can you explain how it works?

you will be able to use this effect when your set is +4...(you will get Hero Aura)  (you can change it --> || ArmorSetsTable.getInstance().getSet(Armorid).isEnchanted(4, this) where armorid you can put your set...) where isEnchanted(4, this) <- you can change the enchant rate.
Posted

you will be able to use this effect when your set is +4...(you will get Hero Aura)  (you can change it --> || ArmorSetsTable.getInstance().getSet(Armorid).isEnchanted(4, this) where armorid you can put your set...) where isEnchanted(4, this) <- you can change the enchant rate.

 

"Armorid" is the chest of the armorset and that "4" is the value of enchant that the whole armor must be (helm, chest, legs, gloves, boots) to get hero aura.

(You will need to add only the chest of the armorset and now the whole armor one-by-one items...)

  • 1 year later...
  • 5 weeks later...
  • 4 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock