View difference between Paste ID: J2YTZ4sB and 6dRgnSJ9
SHOW: | | - or go back to the newest paste.
1
### Eclipse Workspace Patch 1.0
2
#P aCis_gameserver
3
Index: config/aCis.properties
4
===================================================================
5
--- config/aCis.properties	(revision 117)
6
+++ config/aCis.properties	(working copy)
7
@@ -83,6 +83,13 @@
8
 # Default : False
9
 AnnounceKillPLayers = true
10
 
11
+#------------------------------------------------------------
12
+#                    Hero Aura To pvp
13
+#------------------------------------------------------------
14
+# War Legend Configs
15
+WarLegendAura = true
16
+KillsToGetWarLegendAura = 3
17
+
18
 #---------------------------------------------------------
19
 #                            Limits
20
 #---------------------------------------------------------
21
Index: java/net/sf/l2j/gameserver/network/serverpackets/CharInfo.java
22
===================================================================
23
--- java/net/sf/l2j/gameserver/network/serverpackets/CharInfo.java	(revision 117)
24
+++ java/net/sf/l2j/gameserver/network/serverpackets/CharInfo.java	(working copy)
25
@@ -201,7 +201,7 @@
26
 			
27
 		writeD(_activeChar.getClanCrestLargeId());
28
 		writeC(_activeChar.isNoble() ? 1 : 0); // Symbol on char menu ctrl+I
29
-		writeC((_activeChar.isHero() || (_activeChar.isGM() && Config.GM_HERO_AURA)) ? 1 : 0); // Hero Aura
30
+		writeC((_activeChar.isHero() || (_activeChar.isGM() && Config.GM_HERO_AURA) || _activeChar.getIsPVPHero()) ? 1 : 0); // Hero Aura
31
 		
32
 		writeC(_activeChar.isFishing() ? 1 : 0); // 0x01: Fishing Mode (Cant be undone by setting back to 0)
33
 		
34
Index: java/net/sf/l2j/Config.java
35
===================================================================
36
--- java/net/sf/l2j/Config.java	(revision 117)
37
+++ java/net/sf/l2j/Config.java	(working copy)
38
@@ -404,6 +404,8 @@
39
     public static boolean ENABLE_MODIFY_SKILL_DURATION;
40
     public static Map<Integer, Integer> SKILL_DURATION_LIST;
41
     public static boolean ANNOUNCE_KILL;
42
+    public static boolean WAR_LEGEND_AURA;
43
+    public static int KILLS_TO_GET_WAR_LEGEND_AURA;
44
     /** Limits */
45
     public static int RUN_SPD_BOOST;
46
     public static int MAX_RUN_SPEED;
47
@@ -974,6 +976,8 @@
48
 				}
49
 			}
50
 			ANNOUNCE_KILL = aCis.getProperty("AnnounceKillPLayers", false);
51
+			WAR_LEGEND_AURA = Boolean.parseBoolean(aCis.getProperty("WarLegendAura", "False"));
52
+			KILLS_TO_GET_WAR_LEGEND_AURA = Integer.parseInt(aCis.getProperty("KillsToGetWarLegendAura", "30"));
53
             RUN_SPD_BOOST = aCis.getProperty("RunSpeedBoost", 0);
54
             MAX_RUN_SPEED = aCis.getProperty("MaxRunSpeed", 250);
55
             MAX_PCRIT_RATE = aCis.getProperty("MaxPCritRate", 500);
56
Index: java/net/sf/l2j/gameserver/network/serverpackets/UserInfo.java
57
===================================================================
58
--- java/net/sf/l2j/gameserver/network/serverpackets/UserInfo.java	(revision 117)
59
+++ java/net/sf/l2j/gameserver/network/serverpackets/UserInfo.java	(working copy)
60
@@ -256,7 +256,7 @@
61
 			
62
 		writeD(_activeChar.getClanCrestLargeId());
63
 		writeC(_activeChar.isNoble() ? 1 : 0); // 0x01: symbol on char menu ctrl+I
64
-		writeC(_activeChar.isHero() || (_activeChar.isGM() && Config.GM_HERO_AURA) ? 1 : 0); // 0x01: Hero Aura
65
+		writeC((_activeChar.isHero() || (_activeChar.isGM() && Config.GM_HERO_AURA) || _activeChar.getIsPVPHero()) ? 1 : 0); // 0x01: Hero Aura
66
 		
67
 		writeC(_activeChar.isFishing() ? 1 : 0); // Fishing Mode
68
 		
69
Index: java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java
70
===================================================================
71
--- java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java	(revision 117)
72
+++ java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java	(working copy)
73
@@ -167,6 +167,7 @@
74
 import net.sf.l2j.gameserver.network.serverpackets.ExFishingStart;
75
 import net.sf.l2j.gameserver.network.serverpackets.ExOlympiadMode;
76
 import net.sf.l2j.gameserver.network.serverpackets.ExSetCompassZoneCode;
77
+import net.sf.l2j.gameserver.network.serverpackets.ExShowScreenMessage;
78
 import net.sf.l2j.gameserver.network.serverpackets.ExStorageMaxCount;
79
 import net.sf.l2j.gameserver.network.serverpackets.FriendList;
80
 import net.sf.l2j.gameserver.network.serverpackets.GetOnVehicle;
81
@@ -388,6 +389,10 @@
82
 	private boolean _isInWater;
83
 	private boolean _isIn7sDungeon = false;
84
 	
85
+	/** Aura Hero to PvP. */
86
+	private int heroConsecutiveKillCount = 0;
87
+	private boolean isPVPHero = false;
88
+	
89
 	private PunishLevel _punishLevel = PunishLevel.NONE;
90
 	private long _punishTimer = 0;
91
 	private ScheduledFuture<?> _punishTask;
92
@@ -4083,6 +4088,14 @@
93
 		
94
 		stopWaterTask();
95
 		
96
+		// leave war legend aura if enabled
97
+		heroConsecutiveKillCount = 0;
98
+		if (Config.WAR_LEGEND_AURA && !_hero && isPVPHero)
99
+		{
100
+			setHeroAura(false);
101
+			this.sendMessage("You leaved War Legend State");
102
+		}
103
+		
104
 		if (isPhoenixBlessed() || (isAffected(L2EffectFlag.CHARM_OF_COURAGE) && isInSiege()))
105
 			reviveRequest(this, null, false);
106
 		
107
@@ -4223,6 +4236,17 @@
108
 				// Add PvP point to attacker.
109
 				setPvpKills(getPvpKills() + 1);
110
 				
111
+				// Increase the kill count for a special hero aura
112
+				heroConsecutiveKillCount++;
113
+				
114
+
115
+				if (heroConsecutiveKillCount == Config.KILLS_TO_GET_WAR_LEGEND_AURA && Config.WAR_LEGEND_AURA)
116
+				{
117
+					setHeroAura(true);
118
+					Broadcast.announceToOnlinePlayers("Player " + getName() + " becames War Legend with " + Config.KILLS_TO_GET_WAR_LEGEND_AURA + " PvP!!", true);
119
+					sendPacket(new ExShowScreenMessage("you've earned hero aura", 3000, 2, true));
120
+				}
121
+				
122
                 if (Config.ANNOUNCE_KILL)
123
                      Broadcast.toAllOnlinePlayers(SystemMessage.sendString("Player " +getName()+ " Derrotou Player " + target.getName()));
124
 
125
@@ -8008,6 +8032,17 @@
126
 		return _blockList;
127
 	}
128
 	
129
+	public void setHeroAura(final boolean heroAura)
130
+	{
131
+		isPVPHero = heroAura;
132
+		return;
133
+	}
134
+	
135
+	public boolean getIsPVPHero()
136
+	{
137
+		return isPVPHero;
138
+	}
139
+	
140
 	public void setHero(boolean hero)
141
 	{
142
 		if (hero && _baseClass == _activeClass)