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

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...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...