Jump to content

Recommended Posts

Posted

an xrisimoppihseis auto i armor s i epic 8a exei aura apo moni tis

 

ALTER TABLE `armorsets` ADD COLUMN `aurahero` INTEGER NOT NULL DEFAULT 0;


Patch:

Code:

Index: sf/l2j/gameserver/datatables/ArmorSetsTable.java
===================================================================
--- sf/l2j/gameserver/datatables/ArmorSetsTable.java	(revision 4407)
+++ sf/l2j/gameserver/datatables/ArmorSetsTable.java	(working copy)
@@ -62,7 +62,7 @@
		try
		{
			con = L2DatabaseFactory.getInstance().getConnection();
-			PreparedStatement statement = con.prepareStatement("SELECT chest, legs, head, gloves, feet, skill_id, shield, shield_skill_id, enchant6skill FROM armorsets");
+			PreparedStatement statement = con.prepareStatement("SELECT chest, legs, head, gloves, feet, skill_id, shield, shield_skill_id, enchant6skill, aurahero FROM armorsets");
			ResultSet rset = statement.executeQuery();

			while(rset.next())
@@ -76,7 +76,8 @@
				int shield = rset.getInt("shield");
				int shield_skill_id = rset.getInt("shield_skill_id");
				int enchant6skill = rset.getInt("enchant6skill");
-				_armorSets.put(chest, new L2ArmorSet(chest, legs, head, gloves, feet,skill_id, shield, shield_skill_id, enchant6skill));
+				int aurahero = rset.getInt("aurahero");
+				_armorSets.put(chest, new L2ArmorSet(chest, legs, head, gloves, feet,skill_id, shield, shield_skill_id, enchant6skill, aurahero));
			}

			_log.config("ArmorSetsTable: Loaded "+_armorSets.size()+" armor sets.");
Index: sf/l2j/gameserver/model/actor/instance/L2PcInstance.java
===================================================================
--- sf/l2j/gameserver/model/actor/instance/L2PcInstance.java	(revision 4407)
+++ sf/l2j/gameserver/model/actor/instance/L2PcInstance.java	(working copy)
@@ -452,6 +452,7 @@

	private boolean _noble = false;
	private boolean _hero = false;
+	private boolean _epic = false;

	/** The L2FolkInstance corresponding to the last Folk wich one the player talked. */
	private L2FolkInstance _lastFolkNpc = null;
@@ -8114,6 +8115,23 @@
		sendSkillList();
	}

+	public void setEpic(boolean epic)
+	{
+		if (epic)
+		{
+			sendMessage("You wear Epic Set");
+			sendPacket(new UserInfo(this));
+			broadcastUserInfo();
+		}
+		else
+		{
+			sendPacket(new UserInfo(this));
+			broadcastUserInfo();
+		}
+		_epic = epic;
+
+	}	
+	
	public void setIsInOlympiadMode(boolean b)
     {
     	_inOlympiadMode = b;
@@ -8132,7 +8150,12 @@
     {
         return _hero;
     }
-
+	
+	public boolean isEpic()
+	{
+		return _epic;
+	}
+	
     public boolean isInOlympiadMode()
     {
     	return _inOlympiadMode;
Index: sf/l2j/gameserver/model/Inventory.java
===================================================================
--- sf/l2j/gameserver/model/Inventory.java	(revision 4407)
+++ sf/l2j/gameserver/model/Inventory.java	(working copy)
@@ -309,10 +309,17 @@
     	    		L2Skill skill = SkillTable.getInstance().getInfo(armorSet.getSkillId(),1);
     	    		if(skill != null)
     	    		{
-    	    			player.addSkill(skill, false);
-    	    			player.sendSkillList(); 
-    	    		}
-    	    		else
+				int aura = armorSet.getauraHero();
+					if (aura != 0)
+					{ 
+					player.addSkill(skill, false);
+					player.sendSkillList();
+					player.setEpic(true);
+					}
+					player.addSkill(skill, false);
+					player.sendSkillList(); 
+					}
+						else
     	    			_log.warning("Inventory.ArmorSetListener: Incorrect skill: "+armorSet.getSkillId()+".");
     	    		
     	    		if(armorSet.containShield(player)) // has shield from set
@@ -371,42 +378,44 @@
     		int removeSkillId3 = 0; // enchant +6 skill
     		
     		if(slot == PAPERDOLL_CHEST)
+			{
+				L2ArmorSet armorSet = ArmorSetsTable.getInstance().getSet(item.getItemId());
+			if(armorSet == null)
+				return;
+
+				remove = true;
+				removeSkillId1 = armorSet.getSkillId();
+				removeSkillId2 = armorSet.getShieldSkillId();
+				removeSkillId3 = armorSet.getEnchant6skillId();
+				player.setEpic(false);
+				}
+				else
+				{
+				L2ItemInstance chestItem = getPaperdollItem(PAPERDOLL_CHEST); 
+				if(chestItem == null)
+				return;
+
+				L2ArmorSet armorSet = ArmorSetsTable.getInstance().getSet(chestItem.getItemId());
+				if(armorSet == null)
+				return;
+
+				if(armorSet.containItem(slot, item.getItemId())) // removed part of set
+				{
+				remove = true;
+				removeSkillId1 = armorSet.getSkillId();
+				removeSkillId2 = armorSet.getShieldSkillId();
+				removeSkillId3 = armorSet.getEnchant6skillId();
+				player.setEpic(false);
+				}
+				else if(armorSet.containShield(item.getItemId())) // removed shield
+				{
+				remove = true;
+				removeSkillId2 = armorSet.getShieldSkillId();
+				}
+					}
+
+			if(remove)
     		{
-    			L2ArmorSet armorSet = ArmorSetsTable.getInstance().getSet(item.getItemId());
-    			if(armorSet == null)
-    				return;
-    			
-    			remove = true;
-    			removeSkillId1 = armorSet.getSkillId();
-    			removeSkillId2 = armorSet.getShieldSkillId();
-    			removeSkillId3 = armorSet.getEnchant6skillId();
-    		}
-    		else
-    		{
-    			L2ItemInstance chestItem = getPaperdollItem(PAPERDOLL_CHEST); 
-    			if(chestItem == null)
-    				return;
-    			
-    			L2ArmorSet armorSet = ArmorSetsTable.getInstance().getSet(chestItem.getItemId());
-    			if(armorSet == null)
-    				return;
-    			
-    			if(armorSet.containItem(slot, item.getItemId())) // removed part of set
-    			{
-    				remove = true;
-    				removeSkillId1 = armorSet.getSkillId();
-    				removeSkillId2 = armorSet.getShieldSkillId();
-    				removeSkillId3 = armorSet.getEnchant6skillId();
-    			}
-    			else if(armorSet.containShield(item.getItemId())) // removed shield
-    			{
-    				remove = true;
-    				removeSkillId2 = armorSet.getShieldSkillId();
-    			}
-    		}
-    		
-    		if(remove)
-    		{
     			if(removeSkillId1 != 0)
     			{
         			L2Skill skill = SkillTable.getInstance().getInfo(removeSkillId1,1);
Index: sf/l2j/gameserver/model/L2ArmorSet.java
===================================================================
--- sf/l2j/gameserver/model/L2ArmorSet.java	(revision 4407)
+++ sf/l2j/gameserver/model/L2ArmorSet.java	(working copy)
@@ -39,8 +39,9 @@
	private final int _shieldSkillId;

	private final int _enchant6Skill;
+	private final int _auraHero;

-	public L2ArmorSet(int chest, int legs, int head, int gloves, int feet, int skill_id, int shield, int shield_skill_id, int enchant6skill)
+	public L2ArmorSet(int chest, int legs, int head, int gloves, int feet, int skill_id, int shield, int shield_skill_id, int enchant6skill, int auraHero)
	{
		_chest = chest;
		_legs  = legs;
@@ -53,6 +54,7 @@
		_shieldSkillId = shield_skill_id;

		_enchant6Skill = enchant6skill;
+		_auraHero = auraHero;
	}
	/**
	 * Checks if player have equiped all items from set (not checking shield)
@@ -143,6 +145,10 @@
	{
		return _enchant6Skill;
	}
+	public int getauraHero()
+	{
+		return _auraHero;
+	}	
	/**
	 * Checks if all parts of set are enchanted to +6 or more
	 * @param player
Index: sf/l2j/gameserver/serverpackets/CharInfo.java
===================================================================
--- sf/l2j/gameserver/serverpackets/CharInfo.java	(revision 4407)
+++ sf/l2j/gameserver/serverpackets/CharInfo.java	(working copy)
@@ -325,7 +325,7 @@

			writeD(_activeChar.getClanCrestLargeId());
			writeC(_activeChar.isNoble() ? 1 : 0); // Symbol on char menu ctrl+I
-			writeC((_activeChar.isHero() || (_activeChar.isGM() && Config.GM_HERO_AURA)) ? 1 : 0); // Hero Aura
+			writeC((_activeChar.isHero() ||  (_activeChar.isEpic()) || (_activeChar.isGM() && Config.GM_HERO_AURA)) ? 1 : 0); // Hero Aura

			writeC(_activeChar.isFishing() ? 1 : 0); //0x01: Fishing Mode (Cant be undone by setting back to 0)
			writeD(_activeChar.GetFishx());
Index: sf/l2j/gameserver/serverpackets/UserInfo.java
===================================================================
--- sf/l2j/gameserver/serverpackets/UserInfo.java	(revision 4407)
+++ sf/l2j/gameserver/serverpackets/UserInfo.java	(working copy)
@@ -294,7 +294,7 @@

         writeD(_activeChar.getClanCrestLargeId());
         writeC(_activeChar.isNoble() ? 1 : 0); //0x01: symbol on char menu ctrl+I
-        writeC((_activeChar.isHero() || (_activeChar.isGM() && Config.GM_HERO_AURA)) ? 1 : 0); //0x01: Hero Aura
+        writeC((_activeChar.isHero() ||  (_activeChar.isEpic()) || (_activeChar.isGM() && Config.GM_HERO_AURA)) ? 1 : 0); //0x01: Hero Aura

         writeC(_activeChar.isFishing() ? 1 : 0); //Fishing Mode
         writeD(_activeChar.GetFishx()); //fishing x

 

tora gia auto p 8es esi prepei na xrisimopieiseis kai tn me8odo getEnchantLevel ==

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.



  • Posts

    • ElmoreLab Harbor - Eternal C1 x1: ✅ https://harbor.elmorelab.com ElmoreLab Harbor - Eternal C1 x1 - is an exclusive server of the Eternal C1 chronicles from the top project ElmoreLab Harbor.   A unique server of its kind, on which everyone will have maximum pleasure, such as oldschool players who dream of nostalgia and to feel the warmest and classic C1 chronicles, as well as experienced players who are tired of thousands unbalanced servers of late chronicles. Due to the professional corrections of the balance system and the HONEST gameplay system - on this server, EVERY player will feel like in their own, warm and cozy Harbor C1. Let's return to the origins of L2 - back to 2004 in C1! ❤️   ⭐ Server characteristics:   STRICTLY 1 window, NO BOXES Bans for RMT and bots/cheats No donations with benefits Unique and high-quality PTS-build from Master Toma Professional corrections and full class-balance Reworked economy and closed all abuses Improved animations and all aspects of the game Exclusive HD-client with high-quality textures Experienced administration and management Fixed all bugs, geodata, exploits and holes Maximum sociality due to the 1-box system Discovering, exploring and researching Big online International server Nostalgia and oldschool-feelings   Rates: x1 Server start: 14.02.2025   The server is at the final stages of development and preparation for release. Information on the server will be updated, soon the patchnotes and changes/edits will be posted. Don't miss the legendary and epic experience on the best server in the last 20 years! ❤️ Join our C1-forum with a lot of information about server and active discussions.   ⭐ Website: https://harbor.elmorelab.com   ✅ Forum: https://forum-harbor.elmorelab.com   💥 Telegram: https://t.me/l2harbor https://t.me/l2harbor_chat   ⚡ Discord: https://discord.gg/harborelmorelab
    • yeah ok, if you say what is fuctional 100% i can't say something different 😛  but if someone find hard to compile it or get vs and all that things i have here one more simple way here to put overlay in your own server or to change your window name with few money.
    • I've been using this for 2 years now with no issues from Discord. I don't use ogg.dll either. This one works with any l2.exe too; I don’t see any difference between them.
    • hmm.. ok i just see that, is different code first of all. My sources is totally different based in other way, with else libraries.  I have access to modify everything even to make the clock to stop show how many time users play in server. 1) so maybe keep some personal info more hide. 2) i dont use ogg.dll 3) i create it and give it ready + support to install it. Plus what is mine can working with what ever .exe you want not just l2 with same simple method. And i am sure if you try this source to compile it, after 3 hours discord will like shadowban your API too thats my source
  • Topics

×
×
  • Create New...