Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ### Eclipse Workspace Patch 1.0
- #P aCis_gameserver
- Index: config/aCis.properties
- ===================================================================
- --- config/aCis.properties (revision 117)
- +++ config/aCis.properties (working copy)
- @@ -83,6 +83,13 @@
- # Default : False
- AnnounceKillPLayers = true
- +#------------------------------------------------------------
- +# Hero Aura To pvp
- +#------------------------------------------------------------
- +# War Legend Configs
- +WarLegendAura = true
- +KillsToGetWarLegendAura = 3
- +
- #---------------------------------------------------------
- # Limits
- #---------------------------------------------------------
- Index: java/net/sf/l2j/gameserver/network/serverpackets/CharInfo.java
- ===================================================================
- --- java/net/sf/l2j/gameserver/network/serverpackets/CharInfo.java (revision 117)
- +++ java/net/sf/l2j/gameserver/network/serverpackets/CharInfo.java (working copy)
- @@ -201,7 +201,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.isGM() && Config.GM_HERO_AURA) || _activeChar.getIsPVPHero()) ? 1 : 0); // Hero Aura
- writeC(_activeChar.isFishing() ? 1 : 0); // 0x01: Fishing Mode (Cant be undone by setting back to 0)
- Index: java/net/sf/l2j/Config.java
- ===================================================================
- --- java/net/sf/l2j/Config.java (revision 117)
- +++ java/net/sf/l2j/Config.java (working copy)
- @@ -404,6 +404,8 @@
- public static boolean ENABLE_MODIFY_SKILL_DURATION;
- public static Map<Integer, Integer> SKILL_DURATION_LIST;
- public static boolean ANNOUNCE_KILL;
- + public static boolean WAR_LEGEND_AURA;
- + public static int KILLS_TO_GET_WAR_LEGEND_AURA;
- /** Limits */
- public static int RUN_SPD_BOOST;
- public static int MAX_RUN_SPEED;
- @@ -974,6 +976,8 @@
- }
- }
- ANNOUNCE_KILL = aCis.getProperty("AnnounceKillPLayers", false);
- + WAR_LEGEND_AURA = Boolean.parseBoolean(aCis.getProperty("WarLegendAura", "False"));
- + KILLS_TO_GET_WAR_LEGEND_AURA = Integer.parseInt(aCis.getProperty("KillsToGetWarLegendAura", "30"));
- RUN_SPD_BOOST = aCis.getProperty("RunSpeedBoost", 0);
- MAX_RUN_SPEED = aCis.getProperty("MaxRunSpeed", 250);
- MAX_PCRIT_RATE = aCis.getProperty("MaxPCritRate", 500);
- Index: java/net/sf/l2j/gameserver/network/serverpackets/UserInfo.java
- ===================================================================
- --- java/net/sf/l2j/gameserver/network/serverpackets/UserInfo.java (revision 117)
- +++ java/net/sf/l2j/gameserver/network/serverpackets/UserInfo.java (working copy)
- @@ -256,7 +256,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.isGM() && Config.GM_HERO_AURA) || _activeChar.getIsPVPHero()) ? 1 : 0); // 0x01: Hero Aura
- writeC(_activeChar.isFishing() ? 1 : 0); // Fishing Mode
- Index: java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java
- ===================================================================
- --- java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (revision 117)
- +++ java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (working copy)
- @@ -167,6 +167,7 @@
- import net.sf.l2j.gameserver.network.serverpackets.ExFishingStart;
- import net.sf.l2j.gameserver.network.serverpackets.ExOlympiadMode;
- import net.sf.l2j.gameserver.network.serverpackets.ExSetCompassZoneCode;
- +import net.sf.l2j.gameserver.network.serverpackets.ExShowScreenMessage;
- import net.sf.l2j.gameserver.network.serverpackets.ExStorageMaxCount;
- import net.sf.l2j.gameserver.network.serverpackets.FriendList;
- import net.sf.l2j.gameserver.network.serverpackets.GetOnVehicle;
- @@ -388,6 +389,10 @@
- private boolean _isInWater;
- private boolean _isIn7sDungeon = false;
- + /** Aura Hero to PvP. */
- + private int heroConsecutiveKillCount = 0;
- + private boolean isPVPHero = false;
- +
- private PunishLevel _punishLevel = PunishLevel.NONE;
- private long _punishTimer = 0;
- private ScheduledFuture<?> _punishTask;
- @@ -4083,6 +4088,14 @@
- stopWaterTask();
- + // leave war legend aura if enabled
- + heroConsecutiveKillCount = 0;
- + if (Config.WAR_LEGEND_AURA && !_hero && isPVPHero)
- + {
- + setHeroAura(false);
- + this.sendMessage("You leaved War Legend State");
- + }
- +
- if (isPhoenixBlessed() || (isAffected(L2EffectFlag.CHARM_OF_COURAGE) && isInSiege()))
- reviveRequest(this, null, false);
- @@ -4223,6 +4236,17 @@
- // Add PvP point to attacker.
- setPvpKills(getPvpKills() + 1);
- + // Increase the kill count for a special hero aura
- + heroConsecutiveKillCount++;
- +
- +
- + if (heroConsecutiveKillCount == Config.KILLS_TO_GET_WAR_LEGEND_AURA && Config.WAR_LEGEND_AURA)
- + {
- + setHeroAura(true);
- + Broadcast.announceToOnlinePlayers("Player " + getName() + " becames War Legend with " + Config.KILLS_TO_GET_WAR_LEGEND_AURA + " PvP!!", true);
- + sendPacket(new ExShowScreenMessage("you've earned hero aura", 3000, 2, true));
- + }
- +
- if (Config.ANNOUNCE_KILL)
- Broadcast.toAllOnlinePlayers(SystemMessage.sendString("Player " +getName()+ " Derrotou Player " + target.getName()));
- @@ -8008,6 +8032,17 @@
- return _blockList;
- }
- + public void setHeroAura(final boolean heroAura)
- + {
- + isPVPHero = heroAura;
- + return;
- + }
- +
- + public boolean getIsPVPHero()
- + {
- + return isPVPHero;
- + }
- +
- public void setHero(boolean hero)
- {
- if (hero && _baseClass == _activeClass)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement